|
Download README.md from leochen085/Lapras-Reasoning-Datasets: direct link, hf CLI and curl.
- Browser
- Download file 8.59 kB
-
https://huggingface.co/datasets/leochen085/Lapras-Reasoning-Datasets/resolve/main/README.md
- Command line
-
hf download hf://datasets/leochen085/Lapras-Reasoning-Datasets/README.md
-
curl -L -o README.md https://huggingface.co/datasets/leochen085/Lapras-Reasoning-Datasets/resolve/main/README.md
8.59 kB
| pretty_name: Lapras Reasoning Datasets | |
| license: other | |
| language: | |
| - en | |
| task_categories: | |
| - question-answering | |
| - text-generation | |
| tags: | |
| - time-series | |
| - reasoning | |
| - chain-of-thought | |
| - latent-reasoning | |
| - ecg | |
| - sleep-staging | |
| - human-activity-recognition | |
| size_categories: | |
| - 100K<n<1M | |
| configs: | |
| - config_name: ecg | |
| data_files: | |
| - split: train | |
| path: ecg/train.jsonl | |
| - split: test | |
| path: ecg/test.jsonl | |
| - config_name: ecg_ts_tags | |
| data_files: | |
| - split: train | |
| path: ecg/train_with_ts_tags.jsonl | |
| - split: test | |
| path: ecg/test_with_ts_tags.jsonl | |
| - config_name: sleep | |
| data_files: | |
| - split: train | |
| path: sleep/train.jsonl | |
| - split: test | |
| path: sleep/test.jsonl | |
| - config_name: sleep_ts_tags | |
| data_files: | |
| - split: train | |
| path: sleep/train_with_ts_tags.jsonl | |
| - split: test | |
| path: sleep/test_with_ts_tags.jsonl | |
| - config_name: har | |
| data_files: | |
| - split: train | |
| path: har/train.jsonl | |
| - split: test | |
| path: har/test.jsonl | |
| - config_name: har_ts_tags | |
| data_files: | |
| - split: train | |
| path: har/train_with_ts_tags.jsonl | |
| - split: test | |
| path: har/test_with_ts_tags.jsonl | |
| - config_name: tsr | |
| data_files: | |
| - split: train | |
| path: tsr/train.jsonl | |
| - split: test | |
| path: tsr/test.jsonl | |
| - config_name: tsr_ts_tags | |
| data_files: | |
| - split: train | |
| path: tsr/train_with_ts_tags.jsonl | |
| - split: test | |
| path: tsr/test_with_ts_tags.jsonl | |
| - config_name: engine | |
| data_files: | |
| - split: train | |
| path: engine/train.jsonl | |
| - split: test | |
| path: engine/test.jsonl | |
| - config_name: engine_ts_tags | |
| data_files: | |
| - split: train | |
| path: engine/train_with_ts_tags.jsonl | |
| - split: test | |
| path: engine/test_with_ts_tags.jsonl | |
| # Dataset Card for Lapras Reasoning Datasets | |
| Five time series question answering datasets with reference reasoning traces, used to train and evaluate | |
| **Lapras** (latent reasoning for time series language models) and its No-CoT, CoT, iCoT and COCONUT baselines. | |
| ## Dataset Details | |
| ### Dataset Description | |
| Each example pairs a natural-language question with a multichannel time series and a reference reasoning | |
| trace that ends in `Answer: <label>`. The five tasks cover cardiological diagnosis (ECG), sleep-stage | |
| classification (Sleep), human activity recognition (HAR), counterfactual consequence prediction (TSR) and | |
| aero-engine fault diagnosis (Engine). Every task ships in two prompt variants with identical rows: a plain | |
| prompt, and a `*_with_ts_tags` prompt with one `<name> (length L): <ts><ts/>` placeholder line per channel. | |
| - **Curated by:** the Lapras authors (Yuliang Chen et al., see [Citation](#citation)) | |
| - **Language(s) (NLP):** English | |
| - **License:** per subset (see [Data Sources](#data-sources)) | |
| ### Links | |
| - **Repository:** https://github.com/yuc0805/Lapras | |
| - **Paper:** https://arxiv.org/abs/2610.11111 | |
| - **Checkpoints:** https://huggingface.co/leochen085/Lapras | |
| ## Uses | |
| ### Direct Use | |
| - Supervised finetuning and evaluation of time series language models, with or without reasoning traces. | |
| - Reproducing the Lapras experiments: download into the `dataset/` folder of the code repository. | |
| ```bash | |
| huggingface-cli download leochen085/Lapras-Reasoning-Datasets --repo-type dataset --include "*.jsonl" --local-dir dataset | |
| ``` | |
| ### Quick start | |
| ```python | |
| from datasets import load_dataset | |
| ds = load_dataset("leochen085/Lapras-Reasoning-Datasets", "har") | |
| print(ds) | |
| ``` | |
| ``` | |
| DatasetDict({ | |
| train: Dataset({ | |
| features: ['input', 'timeseries', 'output'], | |
| num_rows: 68542 | |
| }) | |
| test: Dataset({ | |
| features: ['input', 'timeseries', 'output'], | |
| num_rows: 8222 | |
| }) | |
| }) | |
| ``` | |
| Each row is a dict with `input` (str), `timeseries` (list of channels, each a list of floats) and `output` (str). | |
| ### Processor, collator and DataLoader | |
| [`lapras_dataloader.py`](lapras_dataloader.py) holds a standard multimodal processor and collator, as for | |
| vision-language models: the processor tokenizes the text and packs the time series into a tensor, and the | |
| collator builds training batches in which only the response is supervised. | |
| ```python | |
| from huggingface_hub import hf_hub_download | |
| hf_hub_download("leochen085/Lapras-Reasoning-Datasets", "lapras_dataloader.py", repo_type="dataset", local_dir=".") | |
| from torch.utils.data import DataLoader | |
| from transformers import AutoTokenizer | |
| from lapras_dataloader import TimeSeriesProcessor, TimeSeriesCollator | |
| processor = TimeSeriesProcessor(AutoTokenizer.from_pretrained("Qwen/Qwen3-8B")) | |
| loader = DataLoader(ds["train"], batch_size=4, shuffle=True, collate_fn=TimeSeriesCollator(processor)) | |
| batch = next(iter(loader)) | |
| ``` | |
| ``` | |
| input_ids (4, 514) torch.int64 # length varies by batch | |
| attention_mask (4, 514) torch.int64 | |
| timeseries (4, 3, 128) torch.float32 # (batch, channels, length), zero-padded | |
| timeseries_mask (4, 3, 128) torch.bool # True on real samples | |
| labels (4, 514) torch.int64 # -100 on the prompt and padding | |
| ``` | |
| Series of different lengths (TSR) are zero-padded to the longest in the batch and marked in `timeseries_mask`. | |
| ### Decoding back | |
| ```python | |
| tok = processor.tokenizer | |
| ids = batch["input_ids"][0][batch["attention_mask"][0].bool()] | |
| tok.decode(ids) | |
| # '<|im_start|>user\nYou are given accelerometer data in all three dimensions. ... <|eot|>\nAnswer: sitting<|im_end|>' | |
| target = tok.decode(batch["labels"][0][batch["labels"][0] != -100], skip_special_tokens=True) | |
| target # the example's `output`, character for character | |
| target.rsplit("Answer:", 1)[1].strip() # e.g. 'sitting' | |
| n_ch = batch["timeseries_mask"][0].any(-1).sum() | |
| batch["timeseries"][0][batch["timeseries_mask"][0]].view(n_ch, -1).tolist() # the example's `timeseries` | |
| ``` | |
| ## Dataset Structure | |
| ``` | |
| ecg/ train.jsonl test.jsonl train_with_ts_tags.jsonl test_with_ts_tags.jsonl | |
| sleep/ ... | |
| har/ ... | |
| tsr/ ... | |
| engine/ ... | |
| ``` | |
| | Config | Task | Train | Test | Channels | Length | Answer | | |
| |---|---|---:|---:|---:|---:|---| | |
| | `ecg` | cardiological diagnosis | 5,800 | 643 | 12 | 1000 | `Yes` / `No` | | |
| | `sleep` | sleep-stage classification | 7,413 | 923 | 1 | 1500 | `Wake`, `Non-REM stage 1`, `Non-REM stage 2`, `Non-REM stage 3`, `REM sleep` | | |
| | `har` | human activity recognition | 68,542 | 8,222 | 3 | 128 | `biking`, `lying`, `running`, `sitting`, `standing`, `walking`, `walking_down`, `walking_up` | | |
| | `tsr` | counterfactual consequence prediction | 22,566 | 4,094 | 1 | 128–1020 | option letter + text (`A`–`D`) | | |
| | `engine` | aero-engine fault diagnosis | 2,305 | 193 | 33 | 600 | option letter + text (`A`–`D`) | | |
| ### Data Fields | |
| - `input` (string): the prompt (question, instructions and, for multiple choice, the options). | |
| - `timeseries` (list of list of float): one list per channel. ECG and Sleep series are z-normalized per | |
| channel; HAR, TSR and Engine series keep the scale of their source release. | |
| - `output` (string): the reference trace. Except for ECG, reasoning steps are delimited by `<|bot|>` and | |
| `<|eot|>`; HAR, Sleep and TSR traces also contain segment-selection calls | |
| `<timeseries_selection_tool> [channel, start, end] </timeseries_selection_tool>` (Sleep: `[start, end]`; | |
| inclusive sample indices). ECG traces are a single paragraph. Every trace ends with `Answer: <label>`. | |
| - `ecg` plain files only: `_uid` (identifier of the source ECG-Reasoning-Benchmark sample, prefixed | |
| `mimic_iv_ecg|` or `ptbxl|`) and `original_trace` (the source's multi-stage annotation, JSON string). | |
| The `*_with_ts_tags` files contain the same rows in the same order; only `input` differs, by the | |
| placeholder lines prepended to the prompt. | |
| ## Data Sources | |
| | Subset | Source | | |
| |---|---| | |
| | ECG | [ECG-Reasoning-Benchmark](https://huggingface.co/datasets/Jwoo5/ECG-Reasoning-Benchmark) | | |
| | Sleep | [OpenTSLM SleepEDF-CoT](https://github.com/StanfordBDHG/OpenTSLM) | | |
| | HAR | [OpenTSLM HAR-CoT](https://github.com/StanfordBDHG/OpenTSLM) | | |
| | TSR | [Merrill et al. (2024)](https://huggingface.co/datasets/mikeam/time-series-reasoning) | | |
| | Engine | [EngineMT-QA](https://huggingface.co/datasets/pandalin98/EngineMT-QA) | | |
| ## Citation | |
| ```bibtex | |
| @article{chen2026lapras, | |
| title = {Lapras: Latent Reasoning for Time Series Language Models}, | |
| author = {Chen, Yuliang and Wu, Yu Yvonne and Langer, Patrick and Pillai, Arvind and Regmi, Sudarshan and | |
| Maritsch, Martin and Liu, Juncheng and Jakob, Robert and Kaar, Thomas and Griffin, Tess Z. and | |
| Marsch, Lisa and Heinz, Michael V. and Jacobson, Nicholas C. and Campbell, Andrew}, | |
| journal = {arXiv preprint arXiv:2610.11111}, | |
| year = {2026} | |
| } | |
| ``` | |