EvalData commited on
Commit
57456cb
·
verified ·
1 Parent(s): 493d913

Point review URL to anonymous.4open.science

Browse files
Files changed (1) hide show
  1. README.md +197 -123
README.md CHANGED
@@ -1,160 +1,234 @@
1
- ---
2
- license: apache-2.0
3
- language:
4
- - en
5
- size_categories:
6
- - 1K<n<10K
7
- task_categories:
8
- - time-series-forecasting
9
- tags:
10
- - benchmark
11
- - peft
12
- - foundation-models
13
- - evaluation
14
- - algorithm-selection
15
- - domain-shift
16
- pretty_name: TSFM-PEFT-Bench
17
- configs:
18
- - config_name: domain
19
- data_files:
20
- - split: runs
21
- path: results/expansion/domain/*.json
22
- - config_name: rank
23
- data_files:
24
- - split: runs
25
- path: results/expansion/rank/*.json
26
- - config_name: locus
27
- data_files:
28
- - split: runs
29
- path: results/expansion/locus/*.json
30
- ---
31
-
32
  # TSFM-PEFT-Bench
33
 
34
  A cross-architecture benchmark for evaluating Parameter-Efficient Fine-Tuning
35
  (PEFT) recommendation reliability in Time Series Foundation Models (TSFMs).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
- This dataset accompanies the paper *"TSFM-PEFT-Bench: A Cross-Architecture
38
- Benchmark for PEFT Selection in Time Series Foundation Models"* (under
39
- double-blind review at NeurIPS 2026 Datasets & Benchmarks Track).
40
 
41
- ## Scale
42
 
43
- - **882 paper-included primary-model runs** (3 architectures × 4 domains × 6 main methods + rank/locus sweeps)
44
- - **+90 TimesFM descriptive runs** = **972 total**
45
- - **5 seeds** per cell (Chronos, MOMENT full coverage; Moirai partial: LoRA 15/20, IA³ 13/20)
46
- - **~2,250 GPU-hours** of compute on RTX 3090 + RTX 3060 cluster
47
 
48
- ## Architectures × Domains × Methods
 
 
 
 
 
 
49
 
50
- | Axis | Members |
51
- |---|---|
52
- | **Architectures** | Chronos (T5 encoder–decoder), MOMENT (T5 masked encoder), Moirai (any-variate transformer), TimesFM (decoder-only, descriptive) |
53
- | **Domains** | ETTm1 (energy), Finance/exchange_rate, SMD (industrial), PhysioNet 2012 (clinical HR) |
54
- | **Methods** | Zero-shot, Head-only, LoRA, DoRA, IA³ (Adapter), Full-FT |
55
- | **Sweeps** | LoRA rank ∈ {4, 8, 16, 32}; locus ∈ {attn_qv, attn_all, ffn, attn_qv_ffn, early_layers, late_layers} |
56
 
57
- ## Croissant Metadata
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
 
59
- This dataset ships an MLCommons Croissant 1.0 manifest at
60
- `tsfm_peft_bench.croissant.json` with mandatory **Responsible-AI fields**:
61
- data limitations, biases, sensitive information, intended use, social impact,
62
- source datasets, preprocessing, release/maintenance plan.
63
 
64
- ## Headline Findings (paper)
65
 
66
- 1. **Method × Domain interaction is significant in every architecture**
67
- (Chronos η²ᵢₙₜ = 0.225, Moirai 0.207, MOMENT ≈ 0).
68
- 2. **Naive LODO majority transfer is surprisingly effective**: 41.7% top-1,
69
- mean regret 0.015, 17× over random — IA³ is plurality-dominant.
70
- 3. **Granular features do not improve over plurality at this scale**
71
- (Arch-Default, Regret-W NN, learned classifiers all underperform LODO on regret).
72
- 4. **Architecture-dependent efficiency frontier**: IA³ for encoder–decoder,
73
- LoRA / Full-FT for any-variate, near-uniformity for encoder-only.
74
 
75
- ## File Layout
 
 
 
76
 
 
 
77
  ```
78
- results/
79
- ├── paper_manifest.json # 882 paper-included runs (single source of truth)
80
- ├── paper_numbers.{json,tex} # headline numbers / LaTeX macros
81
- ├── selector_evaluation.json # LOOCV selector results (8 strategies + Random + Oracle)
82
- ├── selector_per_cell_detail.json
83
- ├── selector_table.tex
84
- ├── expansion_analysis_canonical/anova_primary_main_kept.json
85
- ├── expansion_analysis_v2/domain_shift_profiles.json # 5-dim shift profile per domain
86
- ├── expansion/
87
- │ ├── domain/ *.json # 398 per-run JSONs (domain mode)
88
- │ ├── rank/ *.json # 238 (rank sweep)
89
- │ └── locus/ *.json # 336 (locus sweep)
90
- └── gradient_analysis/ # per-cell gradient norms (12 JSONs)
91
  ```
92
 
93
- Each `*.json` per-run record contains: `experiment_id`, `model`, `method`,
94
- `domain`, `seed`, `rank`, `locus`, `metrics.{mae,mse,mase}`,
95
- `trainable_params`, `total_params`, `train_time_seconds`, etc.
 
96
 
97
- ## Loading
98
 
99
- ```python
100
- from huggingface_hub import snapshot_download
101
- import json
102
- from pathlib import Path
103
 
104
- local_dir = snapshot_download(
105
- "EvalData/tsfm-peft-bench",
106
- repo_type="dataset",
107
- )
108
 
109
- # Load the manifest
110
- manifest = json.load(open(Path(local_dir) / "results/paper_manifest.json"))
111
- print(manifest["totals"]) # {'paper_included_primary_runs': 882, ...}
112
 
113
- # Iterate per-run records
114
- for f in (Path(local_dir) / "results/expansion/domain").glob("*.json"):
115
- rec = json.load(open(f))
116
- print(rec["model"], rec["method"], rec["domain"], rec["metrics"]["mae"])
117
  ```
118
 
119
- ## Reproducing the Paper
 
 
120
 
121
- The companion code repository
122
- [evaldataset/tsfm-peft-bench](https://github.com/evaldataset/tsfm-peft-bench)
123
- contains all training/analysis pipelines:
124
 
125
  ```bash
126
- git clone https://github.com/evaldataset/tsfm-peft-bench
127
- cd tsfm-peft-bench
128
- python -m pip install -r requirements-lock.txt
129
- python -m pip install -e .
130
 
131
- # Single-command headline regeneration
132
- python scripts/reproduce_paper_tables.py # manifest + paper_numbers + per-arch ANOVA
133
- python scripts/build_selector.py # selector evaluation
 
 
 
 
 
 
 
134
  ```
135
 
136
- ## Citation
 
 
 
137
 
138
- ```bibtex
139
- @misc{tsfm-peft-bench,
140
- title = {TSFM-PEFT-Bench: A Cross-Architecture Benchmark for PEFT Selection in Time Series Foundation Models},
141
- author = {Anonymous},
142
- year = {2026},
143
- note = {Under double-blind review at NeurIPS 2026 Datasets and Benchmarks Track},
144
- url = {https://huggingface.co/datasets/EvalData/tsfm-peft-bench}
145
- }
146
  ```
147
 
148
- ## License
 
 
 
 
149
 
150
- Apache-2.0 (see `LICENSE`). Downstream uses must respect the licenses of the
151
- upstream pre-trained checkpoints (Chronos Apache-2.0, MOMENT MIT, Moirai
152
- CC-BY-NC-4.0, TimesFM Apache-2.0) and source domain datasets (ETTm1
153
- CC-BY-ND-4.0; Exchange Rate and SMD have license caveats — see the paper's
154
- Reproducibility Statement).
155
 
156
- ## Disclaimer
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
 
158
- This dataset is released as part of a NeurIPS 2026 D&B Track submission under
159
- double-blind review. The author identity is anonymized at the dataset level
160
- during review and will be revealed in the camera-ready version.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # TSFM-PEFT-Bench
2
 
3
  A cross-architecture benchmark for evaluating Parameter-Efficient Fine-Tuning
4
  (PEFT) recommendation reliability in Time Series Foundation Models (TSFMs).
5
+ Companion code and artifacts for the paper "TSFM-PEFT-Bench: A
6
+ Cross-Architecture Benchmark for PEFT Selection in Time Series Foundation
7
+ Models" (under double-blind review at NeurIPS 2026 Datasets and Benchmarks
8
+ Track).
9
+
10
+ **Quick metadata:**
11
+ - **License:** Apache-2.0 (`LICENSE`)
12
+ - **Croissant manifest:** `tsfm_peft_bench.croissant.json`
13
+ (MLCommons Croissant 1.0 with mandatory RAI fields)
14
+ - **Headline scale:** 882 paper-included primary-model runs
15
+ (3 architectures × 4 domains × 6 main methods + rank/locus sweeps)
16
+ - **Reproduction in one command:**
17
+ `python scripts/reproduce_paper_tables.py`
18
+ - **Code repository (anonymous review):** [https://anonymous.4open.science/r/tsfm-peft-bench](https://anonymous.4open.science/r/tsfm-peft-bench)
19
+ - **Dataset (Hugging Face):** [EvalData/tsfm-peft-bench](https://huggingface.co/datasets/EvalData/tsfm-peft-bench) — 972 run records + Croissant 1.0
20
 
21
+ ---
 
 
22
 
23
+ ## Hosting and accessibility (NeurIPS 2026 D&B Track)
24
 
25
+ Per the NeurIPS 2026 Evaluations & Datasets hosting policy, this artifact will
26
+ be hosted at:
 
 
27
 
28
+ | Asset | Platform | Notes |
29
+ |---|---|---|
30
+ | Code (frozen at submission) | Anonymous-4-Open-Science (review) → Hugging Face Spaces (camera-ready) | All scripts, configs, src/ |
31
+ | Run manifest + headline numbers | Hugging Face Datasets `tsfm-peft-bench/runs` | `paper_manifest.json`, `paper_numbers.{json,tex}`, `selector_evaluation.json` |
32
+ | Per-run JSON files (full grid) | Hugging Face Datasets `tsfm-peft-bench/runs` | `results/expansion/{domain,rank,locus}/*.json` (~50–200 MB total) |
33
+ | Domain shift profiles | Hugging Face Datasets `tsfm-peft-bench/runs` | `domain_shift_profiles.json` |
34
+ | Croissant metadata | top-level `tsfm_peft_bench.croissant.json` | Auto-validated against MLCommons spec 1.0 |
35
 
36
+ The Croissant file is the canonical machine-readable description of the
37
+ benchmark. RAI fields (limitations, biases, sensitive information, intended
38
+ use, social impact, sources, preprocessing, release plan) are populated.
 
 
 
39
 
40
+ ---
41
+
42
+ ## What's in here
43
+
44
+ - `src/` — model wrappers (Chronos, MOMENT, Moirai, TimesFM), PEFT
45
+ adaptations (LoRA / DoRA / IA³ / Adapter / Prefix / Head-only / Full-FT),
46
+ dataset loaders, and evaluation utilities.
47
+ - `scripts/` — Hydra-based single-run trainer (`train.py`), full benchmark
48
+ driver (`run_expansion.py`), analysis pipeline (`analyze_expansion_v2.py`,
49
+ `reproduce_paper_tables.py`), selector (`build_selector.py`), and
50
+ mechanism probes (`subspace_probe.py`, `gradient_probe.py`).
51
+ - `configs/` — Hydra YAML configs for models, adaptations, and data; zero
52
+ hard-coded hyperparameters.
53
+ - `tests/` — pytest suite (100 tests) covering data loaders, adaptations,
54
+ metrics, shift profiles, and analysis utilities.
55
+ - `results/` — paper artifacts (manifest, ANOVA, selector tables, paper
56
+ numbers). `paper_manifest.json` is the single source of truth for
57
+ paper-included runs.
58
+ - `paper_submission.tex`, `paper_appendix.tex`, `paper_supplementary.tex`,
59
+ `neurips_checklist.tex` — the manuscript and supplementary materials.
60
 
61
+ ---
 
 
 
62
 
63
+ ## Setup
64
 
65
+ The repository targets **Python 3.10–3.12**.
 
 
 
 
 
 
 
66
 
67
+ ```bash
68
+ # Recommended (exact reproduction): pin every transitive dep
69
+ python -m pip install -r requirements-lock.txt
70
+ python -m pip install -e .
71
 
72
+ # Lighter (looser bounds): top-level constraints only
73
+ python -m pip install -e ".[dev]"
74
  ```
75
+
76
+ `requirements-lock.txt` is captured by `pip freeze` from the environment that
77
+ produced the released results (PyTorch 2.11, chronos-forecasting 2.2.2,
78
+ uni2ts 2.0.0, momentfm @ upstream commit `38f7310a`).
79
+
80
+ TimesFM is optional and conflicts with Python 3.12 (paxml/lingvo
81
+ dependencies). Install only on Python 3.10/3.11:
82
+
83
+ ```bash
84
+ python -m pip install -e ".[timesfm]"
 
 
 
85
  ```
86
 
87
+ GPU: experiments were run on RTX 3090 (cluster) and 1–4× RTX 3060 nodes.
88
+ Mixed-precision (FP16/BF16) is always enabled; FP32 is unsupported.
89
+
90
+ ---
91
 
92
+ ## Reproducing the paper
93
 
94
+ ### Headline tables
 
 
 
95
 
96
+ ```bash
97
+ # Re-derive paper_manifest.json + paper_numbers.{json,tex} from raw runs
98
+ python scripts/reproduce_paper_tables.py \
99
+ --input_dir results/expansion --output_dir results
100
 
101
+ # ANOVA / outlier filtering / per-architecture statistics (v2)
102
+ python scripts/analyze_expansion_v2.py
 
103
 
104
+ # Selector evaluation (LOOCV, 12 held-out cells)
105
+ python scripts/build_selector.py
 
 
106
  ```
107
 
108
+ These three commands regenerate every numerical claim in
109
+ `paper_submission.tex` from raw run JSON. Latex macros for the headline
110
+ numbers are emitted to `results/paper_numbers.tex`.
111
 
112
+ ### Single-run training
 
 
113
 
114
  ```bash
115
+ python scripts/train.py model=chronos adaptation=lora data=ett_m1
116
+ python scripts/train.py model=chronos adaptation=lora data=ett_h1 \
117
+ adaptation.rank=16 training.lr=1e-4 training.epochs=50
118
+ ```
119
 
120
+ ### Full benchmark grid
121
+
122
+ ```bash
123
+ # 3 primary models × 4 domains × 7 main methods × 5 seeds = 882 paper-included runs
124
+ python scripts/run_expansion.py \
125
+ --models chronos,moment,moirai \
126
+ --mode domain \
127
+ --seeds 42,123,7,2024,3407 \
128
+ --save_checkpoints \
129
+ --checkpoint_dir checkpoints/expansion
130
  ```
131
 
132
+ `scripts/run_benchmark.sh` wraps the full sweep across the three modes
133
+ (domain / rank / locus).
134
+
135
+ ### Evaluation from a checkpoint
136
 
137
+ ```bash
138
+ python scripts/evaluate.py \
139
+ --checkpoint checkpoints/expansion/chronos/<experiment_id>.pt \
140
+ --model chronos --data ett_m1
 
 
 
 
141
  ```
142
 
143
+ Both `train.py` and `run_expansion.py` save checkpoints in a unified schema
144
+ (`backbone_state_dict` + `adaptation_method` + `adaptation_config` +
145
+ `prediction_length` / `context_length`). `evaluate.py` accepts either
146
+ `backbone_state_dict` or the legacy `state_dict` key for backward
147
+ compatibility with pre-2026-04-27 checkpoints.
148
 
149
+ ---
 
 
 
 
150
 
151
+ ## Repository conventions
152
+
153
+ - **Docstrings and error messages are written in Korean**; identifiers and
154
+ paper-facing artifacts are in English. See `CLAUDE.md` for full coding
155
+ standards.
156
+ - All hyperparameters live in `configs/`; do not hard-code values in scripts.
157
+ - External libraries (chronos, peft, transformers, wandb) are imported
158
+ dynamically via `importlib` and accessed through `Protocol` types in
159
+ `src/`. Direct imports in `scripts/` and `tests/` are fine.
160
+ - `from __future__ import annotations` at the top of every module.
161
+
162
+ ---
163
+
164
+ ## Data and checkpoints
165
+
166
+ `data/` is `.gitignore`d. Public datasets used:
167
+
168
+ - **ETTm1**: standard ETT benchmark (Zhou et al., 2021).
169
+ - **Exchange-rate ("Finance")**: Lai et al., 2017.
170
+ - **SMD**: Server Machine Dataset (Su et al., 2019), entity boundaries
171
+ preserved during splitting (`src/data/smd.py`).
172
+ - **PhysioNet**: subset processed in `src/data/physionet.py`, subject IDs
173
+ preserved across splits to prevent leakage.
174
+
175
+ `checkpoints/` is a local symlink to NAS storage on the maintainer's
176
+ machine. Downstream users should either remove the symlink and create a
177
+ local directory, or override the path with `checkpoint_dir=...` /
178
+ `--checkpoint_dir <path>` on the command line.
179
+
180
+ ---
181
+
182
+ ## Layout
183
+
184
+ ```
185
+ src/
186
+ ├── adaptation/ # LoRA / DoRA / IA3 / Adapter / Prefix / Head / Full
187
+ ├── data/ # ETT, finance, SMD, PhysioNet, shift metrics
188
+ ├── evaluation/ # MAE / MSE / MASE / CRPS / CKA
189
+ ├── models/ # Chronos / MOMENT / Moirai / TimesFM wrappers
190
+ └── utils/ # Seeds, device, logging
191
+ scripts/
192
+ ├── train.py # single-run Hydra entry point
193
+ ├── run_expansion.py # full benchmark grid
194
+ ├── reproduce_paper_tables.py # SoT manifest + paper_numbers regenerator
195
+ ├── analyze_expansion_v2.py # ANOVA / outlier policy
196
+ ├── build_selector.py # selector LOOCV evaluation
197
+ ├── subspace_probe.py # mechanism probe (representation)
198
+ └── gradient_probe.py # mechanism probe (gradient flow)
199
+ configs/
200
+ ├── model/ chronos.yaml | moment.yaml | moirai.yaml | timesfm.yaml
201
+ ├── adaptation/ lora | dora | ia3 | adapter | prefix | head_only | full_ft
202
+ └── data/ ett_m1 | ett_h1 | finance | smd | physionet | ...
203
+ results/
204
+ ├── paper_manifest.json # SoT: 882 paper-included primary-model runs
205
+ ├── paper_numbers.{json,tex} # auto-generated latex macros
206
+ ├── selector_evaluation.json # selector LOOCV results
207
+ ├── expansion_analysis_canonical/ # canonical ANOVA outputs
208
+ └── expansion_analysis_v3/ # v3 (current) analysis outputs
209
+ ```
210
+
211
+ ---
212
+
213
+ ## Quality gates
214
+
215
+ ```bash
216
+ # Tests (100 tests, ~3s on CPU)
217
+ pytest tests/ -v
218
+
219
+ # Lint / format
220
+ ruff check src/ scripts/ tests/
221
+ black --check src/ scripts/ tests/
222
+ isort --check-only src/ scripts/ tests/
223
+ mypy src/
224
+ ```
225
+
226
+ ---
227
+
228
+ ## Citation
229
+
230
+ Anonymous under review. Citation will be added on publication.
231
+
232
+ ## License
233
 
234
+ Apache 2.0 (see `LICENSE` once added).