Dataset Viewer
Auto-converted to Parquet Duplicate
input
stringclasses
17 values
timeseries
listlengths
12
12
output
stringlengths
580
1.48k
original_trace
stringlengths
1.06k
10.4k
_uid
stringlengths
14
35
"You are an expert cardiologist analyzing an ECG (electrocardiogram).\n\nClinical Context: 12-lead E(...TRUNCATED)
[[-1.0601862668991089,-1.1910250186920166,-1.3218637704849243,-1.5835411548614502,-1.191025018692016(...TRUNCATED)
"To evaluate for first-degree AV block, I first assessed the rhythm for consistent 1:1 atrioventricu(...TRUNCATED)
"[{\"criterion_selection\": {\"question\": \"To accurately diagnose first degree AV block, which of (...TRUNCATED)
mimic_iv_ecg|41084804|19729398|0
"You are an expert cardiologist analyzing an ECG (electrocardiogram).\n\nClinical Context: 12-lead E(...TRUNCATED)
[[-0.12532848119735718,-0.12532848119735718,-0.43747907876968384,-0.12532848119735718,-0.12532848119(...TRUNCATED)
"To evaluate for first-degree AV block, I first confirmed the presence of consistent 1:1 atrioventri(...TRUNCATED)
"[{\"criterion_selection\": {\"question\": \"To accurately diagnose first degree AV block, which of (...TRUNCATED)
mimic_iv_ecg|40878480|18790815|1
"You are an expert cardiologist analyzing an ECG (electrocardiogram).\n\nClinical Context: 12-lead E(...TRUNCATED)
[[-0.33915990591049194,-0.2665502429008484,-0.33915990591049194,-0.4117696285247803,-0.3028550744056(...TRUNCATED)
"To evaluate for first-degree AV block, I first assessed whether there is consistent 1:1 atrioventri(...TRUNCATED)
"[{\"criterion_selection\": {\"question\": \"To accurately diagnose first degree AV block, which of (...TRUNCATED)
mimic_iv_ecg|43741786|19738521|2
"You are an expert cardiologist analyzing an ECG (electrocardiogram).\n\nClinical Context: 12-lead E(...TRUNCATED)
[[0.2136726677417755,0.14960289001464844,0.2136726677417755,0.2136726677417755,0.2136726677417755,0.(...TRUNCATED)
"To evaluate for first-degree AV block, I first assessed whether there is evidence of consistent 1:1(...TRUNCATED)
"[{\"criterion_selection\": {\"question\": \"To accurately diagnose first degree AV block, which of (...TRUNCATED)
mimic_iv_ecg|47868975|11945171|3
"You are an expert cardiologist analyzing an ECG (electrocardiogram).\n\nClinical Context: 12-lead E(...TRUNCATED)
[[-0.5046933889389038,0.05658729001879692,0.31171488761901855,-0.5046933889389038,0.1076128184795379(...TRUNCATED)
"To evaluate for first-degree AV block, I first assessed whether there is consistent 1:1 atrioventri(...TRUNCATED)
"[{\"criterion_selection\": {\"question\": \"To accurately diagnose first degree AV block, which of (...TRUNCATED)
mimic_iv_ecg|49323131|14283370|4
"You are an expert cardiologist analyzing an ECG (electrocardiogram).\n\nClinical Context: 12-lead E(...TRUNCATED)
[[-0.043421875685453415,-0.15605966746807098,-0.043421875685453415,-0.043421875685453415,-0.26869747(...TRUNCATED)
"To evaluate for first-degree AV block, I first assessed whether there is consistent 1:1 atrioventri(...TRUNCATED)
"[{\"criterion_selection\": {\"question\": \"To accurately diagnose first degree AV block, which of (...TRUNCATED)
mimic_iv_ecg|47491924|11564894|5
"You are an expert cardiologist analyzing an ECG (electrocardiogram).\n\nClinical Context: 12-lead E(...TRUNCATED)
[[-0.4839986562728882,-0.4839986562728882,-0.5948126316070557,-0.5948126316070557,-0.483998656272888(...TRUNCATED)
"To evaluate for first-degree AV block, I first assessed whether there is evidence of consistent 1:1(...TRUNCATED)
"[{\"criterion_selection\": {\"question\": \"To accurately diagnose first degree AV block, which of (...TRUNCATED)
mimic_iv_ecg|49725401|19395626|6
"You are an expert cardiologist analyzing an ECG (electrocardiogram).\n\nClinical Context: 12-lead E(...TRUNCATED)
[[-0.17788748443126678,-0.17788748443126678,-0.030461827293038368,-0.030461827293038368,-0.085746452(...TRUNCATED)
"To evaluate for first-degree AV block, I first confirmed the presence of consistent 1:1 atrioventri(...TRUNCATED)
"[{\"criterion_selection\": {\"question\": \"To accurately diagnose first degree AV block, which of (...TRUNCATED)
mimic_iv_ecg|40577974|10930646|7
"You are an expert cardiologist analyzing an ECG (electrocardiogram).\n\nClinical Context: 12-lead E(...TRUNCATED)
[[0.12947823107242584,0.10911361873149872,0.1702074557542801,0.10911361873149872,0.0887490063905716,(...TRUNCATED)
"To evaluate for first-degree AV block, I first assessed the rhythm for consistent 1:1 atrioventricu(...TRUNCATED)
"[{\"criterion_selection\": {\"question\": \"To accurately diagnose first degree AV block, which of (...TRUNCATED)
mimic_iv_ecg|40469060|17191670|8
"You are an expert cardiologist analyzing an ECG (electrocardiogram).\n\nClinical Context: 12-lead E(...TRUNCATED)
[[-0.41458064317703247,-0.6810361742973328,-0.6810361742973328,-0.5114735960960388,-0.51147359609603(...TRUNCATED)
"To evaluate for first-degree AV block, I first assessed whether there is consistent 1:1 atrioventri(...TRUNCATED)
"[{\"criterion_selection\": {\"question\": \"To accurately diagnose first degree AV block, which of (...TRUNCATED)
mimic_iv_ecg|40953060|11023709|9
End of preview. Expand in Data Studio

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)
  • Language(s) (NLP): English
  • License: per subset (see Data Sources)

Links

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.
huggingface-cli download leochen085/Lapras-Reasoning-Datasets --repo-type dataset --include "*.jsonl" --local-dir dataset

Quick start

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 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.

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

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

Citation

@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}
}
Downloads last month
52

Models trained or fine-tuned on leochen085/Lapras-Reasoning-Datasets

Paper for leochen085/Lapras-Reasoning-Datasets