TSAE: Structured Sparse Autoencoders for Interpreting Time-Series Forecasting Models
Abstract
Time-series forecasting informs critical decisions in energy dispatch, industrial operations, and environmental monitoring; understanding the patterns models rely on is essential for assessing reliability and identifying failures. Input attribution identifies important variables and time segments but offers limited insight into internal features, while standard sparse autoencoder (SAE) objectives do not directly constrain cross-variable structure or temporal continuity. We introduce TSAE, a structured sparse autoencoder for forecasting representations that decomposes hidden states into individually inspectable features. TSAE organizes cross-variable structure through shared and variable-routed private dictionaries, separates feature detection from magnitude estimation with gated encoding, and constrains neighboring sparse-code changes according to raw-segment similarity. These mechanisms support analysis of variable context, activation strength, and temporal evolution. Forecast-consistency fine-tuning further improves preservation of the frozen forecaster's outputs. The accompanying TSEVAL protocol separately audits fidelity, feature coherence, and physical calibration to ground feature interpretation. In three-seed experiments with frozen PatchTST on ETTh1, ETTh2, and ETTm1, TSAE achieves the lowest hidden-state reconstruction error, normalized forecast-reconstruction error (NFRE), and feature transition rate among five SAEs at comparable per-token activity. NFRE decreases by 4.3-26.4% relative to the next-best mean. Dataset-dependent tradeoffs in selectivity, physical correlation, and calibration show that fidelity and temporal-stability gains require independent semantic validation to support feature interpretation.
Figures & tables
| Diagnostic | Question |
|---|---|
| Fidelity | Does the sparse reconstruction preserve the original hidden state? |
| Coherence | Are activations concentrated in coherent variable and temporal contexts? |
| Calibration | Do feature activations track independently measurable signal motifs? |
| Forecast sensitivity | How sensitive is the forecast to a specified sparse-feature intervention? |
| Hidden control | Is the effect specific to the SAE decoder path rather than a generic hidden-space perturbation? |
| Input baselines | Do hidden sparse features provide information beyond saliency and occlusion? |
| Setting | Operating point | Evaluation metrics | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Data | Method | Active | Recon. | NFRE | Dead | Trans. | Sel. | Phys. | Calib. |
| ETTh1 | TSAE | 231.4 2.7 | 13.44 0.57 | 5.10 0.25 | 0.080 0.025 | 0.073 0.005 | 0.639 0.007 | 0.541 0.106 | 0.624 0.049 |
| L1 | 252.8 10.3 | 13.59 0.45 | 5.33 0.27 | 0.000 0.000 | 0.181 0.006 | 0.570 0.023 | 0.653 0.047 | 0.567 0.022 | |
| Gated | 244.4 7.4 | 16.39 0.75 | 6.39 0.22 | 0.000 0.000 | 0.144 0.005 | 0.573 0.020 | 0.523 0.060 | 0.681 0.024 | |
| TopK | 264.9 5.7 | 30.54 2.00 | 10.84 0.75 | 0.001 0.001 | 0.143 0.002 | 0.592 0.007 | 0.622 0.047 | 0.587 0.043 | |
| JumpReLU | 269.8 11.4 | 20.69 0.88 | 8.09 0.37 | 0.000 0.000 | 0.156 0.007 | 0.612 0.066 | 0.587 0.017 | 0.657 0.002 | |
| Backbone | Method | Active | Recon. | NFRE |
|---|---|---|---|---|
| PatchTST | TSAE | 231.4 2.7 | 13.44 0.57 | 5.10 0.25 |
| Gated | 244.4 7.4 | 16.39 0.75 | 6.39 0.22 | |
| L1 | 252.8 10.3 | 13.59 0.45 | 5.33 0.27 | |
| TopK | 264.9 5.7 | 30.54 2.00 | 10.84 0.75 | |
| JumpReLU | 269.8 11.4 | 20.69 0.88 | 8.09 0.37 | |
| iTransformer | TSAE | 253.1 2.5 | 14.48 0.23 | 3.01 0.06 |
| Data | Variant | Active | Recon. | NFRE | Dead | Trans. |
|---|---|---|---|---|---|---|
| ETTh1 | Full | 268 | 11.7 | 4.9 | 6.3 | 0.086 |
| No routing | 252 | 13.4 | 5.5 | 0.0 | 0.145 | |
| No gating | 108 | 18.1 | 7.9 | 0.0 | 0.083 | |
| No temporal | 279 | 12.3 | 5.1 | 6.3 | 0.091 | |
| ETTh2 | Full | 203 | 2.2 | 3.4 | 10.9 | 0.036 |
| No routing | 178 | 2.4 | 3.6 | 13.1 | 0.050 |
Appendix figures & tables17 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | L1 SAE Jaccard | TSAE Jaccard | Difference |
|---|---|---|---|
| ETTh1 | 0.184 | 0.257 | +0.073 |
| ETTh2 | 0.456 | 0.676 | +0.220 |
| ETTm1 | 0.424 | 0.540 | +0.116 |
| Dataset | Method | Selected setting | Test Active |
|---|---|---|---|
| ETTh1 | TSAE | shared , private | 231.4 2.7 |
| L1 | 252.8 10.3 | ||
| Gated | 244.4 7.4 | ||
| TopK | 264.9 5.7 | ||
| JumpReLU | , threshold | 269.8 11.4 | |
| ETTh2 | TSAE | shared , private | 250.9 13.6 |
| Active | Recon. | NFRE | Trans. | |
|---|---|---|---|---|
| 0 | 280 | 12.3 | 5.1 | 0.0908 |
| 0.0001 | 280 | 12.3 | 5.1 | 0.0909 |
| 0.001 | 280 | 12.3 | 5.1 | 0.0908 |
| 0.01 | 278 | 12.3 | 5.1 | 0.0901 |
| 0.05 | 276 | 12.2 | 5.1 | 0.0903 |
| 0.1 | 273 | 12.2 | 5.1 | 0.0895 |
| Active | Recon. | NFRE | Dead% | |
|---|---|---|---|---|
| 0.02 | 500 | 10.7 | 4.4 | 6.2 |
| 0.05 | 489 | 9.4 | 3.8 | 2.3 |
| 0.1 | 456 | 9.5 | 3.9 | 0.6 |
| 0.2 | 416 | 10.2 | 4.2 | 1.0 |
| 0.5 | 392 | 11.0 | 4.4 | 7.0 |
| 1.0 | 386 | 11.3 | 4.5 | 13.8 |
| Method | Active | In 192–320? | Recon. | NFRE | Dead% | Trans. |
|---|---|---|---|---|---|---|
| TSAE | 231 3 | ✓ | 13.4 | 5.10 | 8.0 | 0.073 |
| L1 | 253 10 | ✓ | 13.6 | 5.33 | 0.0 | 0.181 |
| Gated | 244 7 | ✓ | 16.4 | 6.39 | 0.0 | 0.144 |
| TopK | 265 6 | ✓ | 30.5 | 10.84 | 0.1 | 0.143 |
| JumpReLU | 270 11 | ✓ | 20.7 | 8.09 | 0.0 | 0.156 |
| Method | Active | In 192–320? | Recon. | NFRE | Dead% | Trans. |
|---|---|---|---|---|---|---|
| TSAE | 251 14 | ✓ | 6.04 | 2.70 | 4.3 | 0.050 |
| L1 | 195 11 | ✓ | 7.99 | 3.66 | 2.5 | 0.106 |
| Gated | 213 6 | ✓ | 8.19 | 3.76 | 10.3 | 0.055 |
| TopK | 218 1 | ✓ | 9.88 | 4.56 | 14.3 | 0.063 |
| JumpReLU | 311 40 | ✓ | 10.9 | 4.79 | 4.1 | 0.064 |
| Method | Active | In 192–320? | Recon. | NFRE | Dead% | Trans. |
|---|---|---|---|---|---|---|
| TSAE | 205 12 | ✓ | 10.4 | 5.00 | 3.1 | 0.047 |
| L1 | 258 12 | ✓ | 11.4 | 5.50 | 0.0 | 0.135 |
| Gated | 247 6 | ✓ | 13.5 | 6.58 | 0.0 | 0.089 |
| TopK | 224 2 | ✓ | 19.9 | 8.02 | 0.6 | 0.083 |
| JumpReLU | 270 13 | ✓ | 17.1 | 8.63 | 0.0 | 0.092 |
| Method | Active | In 192–320? | Recon. | NFRE | Dead% | Trans. |
|---|---|---|---|---|---|---|
| TSAE | 217 3 | ✓ | 1.70 | 2.52 | 19.5 | 0.019 |
| L1 | 188 16 | 1.85 | 3.37 | 0.0 | 0.055 | |
| Gated | 285 9 | ✓ | 2.10 | 2.84 | 0.0 | 0.046 |
| TopK | 261 14 | ✓ | 3.84 | 4.64 | 7.3 | 0.038 |
| JumpReLU | 236 1 | ✓ | 4.49 | 6.21 | 0.1 | 0.031 |
| Method | Active | Recon. | NFRE |
|---|---|---|---|
| TSAE | 253 3 | 14.5 | 3.01 |
| L1 | 282 1 | 18.1 | 4.14 |
| Gated | 316 1 | 17.3 | 3.20 |
| TopK | 212 0 | 30.1 | 5.24 |
| JumpReLU | 269 3 | 18.8 | 3.44 |
| Method | Active | Recon. | NFRE |
|---|---|---|---|
| TSAE | 215 10 | 9.09 | 7.91 |
| L1 | 250 1 | 9.17 | 8.74 |
| Gated | 314 1 | 7.71 | 6.88 |
| TopK | 256 0 | 9.90 | 8.27 |
| JumpReLU | 266 4 | 7.99 | 7.02 |
| Data | Variant | Active | Recon. | NFRE | Dead% | Trans. |
|---|---|---|---|---|---|---|
| ETTh1 | Full | 268 | 11.7 | 4.9 | 6.3 | 0.086 |
| No routing | 252 | 13.4 | 5.5 | 0.0 | 0.145 | |
| No gating | 108 | 18.1 | 7.9 | 0.0 | 0.083 | |
| No temporal | 279 | 12.3 | 5.1 | 6.3 | 0.091 | |
| ETTh2 | Full | 203 | 2.2 | 3.4 | 10.9 | 0.036 |
| No routing | 178 | 2.4 | 3.6 | 13.1 | 0.050 |
| Data | Variant | Active | Recon. | NFRE | Dead% |
|---|---|---|---|---|---|
| ETTh1 | Full | 399 | 13.7 | 3.3 | 0.0 |
| No routing | 309 | 23.3 | 4.3 | 0.0 | |
| No gating | 188 | 34.7 | 7.8 | 0.0 | |
| ETTh2 | Full | 360 | 22.9 | 1.1 | 0.0 |
| No routing | 284 | 31.6 | 1.4 | 0.0 | |
| No gating | 187 | 45.7 | 1.9 | 0.0 |
| Data | Variant | Active | Recon. | NFRE | Dead% |
|---|---|---|---|---|---|
| ETTh1 | Full | 219 | 21.3 | 9.8 | 2.4 |
| No routing | 165 | 25.7 | 11.6 | 0.0 | |
| No gating | 121 | 43.5 | 21.9 | 0.0 | |
| ETTh2 | Full | 153 | 7.9 | 7.3 | 5.9 |
| No routing | 117 | 8.0 | 7.2 | 0.0 | |
| No gating | 87 | 15.0 | 13.2 | 0.0 |
| Data | Variant | Active | Recon. | NFRE | Dead% |
|---|---|---|---|---|---|
| ETTh1 | Full | 322 | 13.6 | 3.5 | 3.2 |
| No routing | 281 | 18.7 | 5.0 | 0.0 | |
| No gating | 126 | 38.1 | 12.8 | 0.0 | |
| ETTh2 | Full | 287 | 4.2 | 4.6 | 8.3 |
| No routing | 221 | 5.6 | 6.1 | 8.7 | |
| No gating | 74 | 12.7 | 15.8 | 0.0 |
Explainable Time Series Forecasting
Explainable time series forecasting makes predictions over time interpretable through attributions, structured models, causal reasoning, and counterfactuals.
See all 61 papers