Datasets:

File size: 1,697 Bytes
367e9d0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a7dd375
367e9d0
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
license: cc-by-4.0
task_categories:
- time-series-forecasting
tags:
- time-series
- forecasting
- anomaly-detection
- classification
- TSLib
- tsfile
- modality:timeseries
- timeseries
- format:tsfile
pretty_name: SWaT (TsFile)
size_categories:
- 1M<n<10M
configs:
- config_name: default
  data_files:
  - split: train
    path: SWaT_train.tsfile
  - split: test
    path: SWaT_test.tsfile
modality:
- timeseries
- tabular
- text
language:
- en
---

# SWaT (TsFile)

Apache TsFile version of the `SWaT` anomaly-detection subset of
[`thuml/Time-Series-Library`](https://huggingface.co/datasets/thuml/Time-Series-Library).

## Overview

Secure Water Treatment testbed: 51 sensor/actuator channels with labelled cyber-attacks.

- **Train:** 495,000 rows (all normal).
- **Test:** 449,919 rows (with per-timestep 0/1 anomaly labels).
- **Channels:** 51.

The train and test segments are stored as two separate TsFiles
(`SWaT_train.tsfile` / `SWaT_test.tsfile`), preserving the original split.

## Schema (TsFile structure)

- **Time** (INT64, milliseconds) — row index * 1000 ms (the source has no timestamp; SWaT was recorded at 1 Hz).
- **FIELD** (51 channels, FLOAT) — the sensor/metric channels.
- **label** (INT64) — per-timestep anomaly flag (0/1). The train file is all 0
  (no ground-truth labels); the test file carries the anomaly labels.

No channels or rows are dropped.

## Usage

Read the `.tsfile` files with the Apache TsFile Java or Python SDK.

## Source & license

- Original dataset: https://huggingface.co/datasets/thuml/Time-Series-Library (subset `SWaT`)
- Author / publisher: thuml (Tsinghua University)
- Paper: https://arxiv.org/abs/2407.13278
- License: CC BY 4.0