OrangeTree: A Linear and Tree-based Time Series Forecasting Model Supporting Multiple Input and Output Lengths

Yiqi Tang, Zhichen Lai, Yuxuan Yang, Dalin Zhang, Jinpeng Chen, Gang Chen, Huan Li

TL;DR

Modern time series forecasting models are surprisingly brittle: if you train one to predict the next 24 hours using the past 48 hours of data, its internal dimensions are physically locked into that exact shape. OrangeTree breaks this rigidity by arranging simple linear layers into dynamic binary trees that expand or contract on the fly. The result is a single, lightweight "all-around athlete" model that handles multiple input and output lengths simultaneously, beating specialized, fixed-length state-of-the-art architectures without wasting compute on padding or suffering from autoregressive drift.

What Problem Does This Paper Address?

Imagine deploying a weather or energy grid forecaster in the real world. Sometimes you have a short snippet of recent data and need a quick, immediate prediction; other times, you have weeks of historical context and need a long-term horizon.

Surprisingly, today’s dominant Time Series Forecasting (TSF) architectures—both Transformer-based and Linear-based—operate under a strict "One-Size-Fits-One" constraint. Because they rely on fixed-size embeddings, positional encodings, or static linear projection matrices ($\mathbf{Y} = \mathbf{W}\mathbf{X} + \mathbf{B}$), sequence lengths are hard-coded into the model's parameter dimensions at initialization.

Figure 1: Paradigm Shift in TSF: (a) The traditional rigid approach requires training distinct models for each input-output configuration. (b) The proposed ORANGETREE paradigm enables a single model to natively support MIOL during inference.

To support Multiple Input and Output Lengths (MIOL), engineers are forced into ugly compromises:

  1. Model sprawl: Training and maintaining dozens of separate models for every $(L, T)$ input-output pair.
  2. Crude heuristics: Padding or trimming inputs (which wastes compute or throws away history) or running step-by-step autoregression (which snowballs prediction errors over continuous data).

The authors ask: can we decouple a model's parameters from sequence length entirely, training once to natively handle multiple input and output lengths?

Methods

OrangeTree’s core shift is viewing a time series not as a flat vector, but as a hierarchy of sub-ranges ("All Range" $\Rightarrow$ Orange) processed via recursive tree structures. By defining linear weights at the node level rather than the sequence level, the trees can grow or shrink dynamically without changing the parameter count.

The architecture flows through four linear modules:

  • Segment Tree Encoder: Inspired by classic segment trees, each input time step becomes a leaf node. A single, shared linear aggregation layer recursively combines child nodes into parent nodes bottom-up. Using binary lifting (generalizable to $B$-branch trees to prevent vanishing gradients), the tree dynamically adds layers to fit any input length $L$, allowing any sub-range representation $[i:j]$ to be stitched together in $\mathcal{O}(\log L)$ time.
  • Range Weighter: Not all history is equally useful. To score sub-ranges without length-dependent parameters, the model linearly interpolates each channel to $M$ fixed points to get a global embedding, then works top-down—like an inverted Pascal’s Triangle—"shaving off" boundary steps to score the importance of smaller local ranges relative to the broader context.
  • Feature Fuser: Acts as a sparse filter, grabbing the top-$K$ highest-scoring ranges from the Encoder and fusing them into a compact, cross-channel hidden state.
  • Inverse Tree Decoder: Reverses the encoder's trick. Using shared linear splitting layers, a root node recursively splits into child nodes until it reaches $T$ leaves for the desired forecast horizon. It runs two parallel trees: a Main Decoder (cross-channel dynamics) and a Residual Decoder (channel-specific traits), summing their leaves before a final lightweight MLP prediction.
Dynamic tree expansion via binary lifting allows the encoder to scale to longer inputs using the exact same shared weights.

Datasets

The authors evaluate OrangeTree on six standard, publicly available multivariate benchmarks (no new datasets are introduced):

  • Electricity: ETTh1, ETTh2, ETTm1, ETTm2
  • Meteorology: Weather
  • Energy: Solar

Key Insights and Ideas

  • Generalists don't have to lose to specialists: Usually, forcing one parameter set to juggle multiple sequence lengths degrades accuracy. Yet OrangeTree trained jointly across multiple lengths rivals—and occasionally beats—identical OrangeTree models trained specifically for single lengths. Sharing node-level weights across scales appears to act as healthy regularization.
  • Balancing channel independence and mixing: Ablation studies show that dropping either the cross-channel tree representations or the channel-independent residual branch hurts accuracy (increasing MSE by ~5–6% on ETTh1/ETTm1), confirming that time series benefit from separating shared global trends from local channel quirks.
  • Free inference-time representation reuse: If you want 96-, 192-, and 720-step forecasts from the same 96-step input, standard baselines require running three separate full models. OrangeTree runs its Encoder/Fuser once and simply expands the Decoder tree to different depths.

Key Results

  • Fixed-Input SOTA: With input $L=96$ averaged across four output horizons ($T \in \{96, 192, 336, 720\}$), the horizon-specific OrangeTree-IS achieves the best MSE on 5 of 6 benchmarks (e.g., 0.365 on ETTm1 vs. 0.377 for TQNet; 0.234 on Weather vs. 0.242 for TQNet). Crucially, the single unified model (OrangeTree-HU) practically ties it (e.g., 0.366 MSE on ETTm1, 0.428 on ETTh1).
  • Parameter Efficiency: Covering all four horizons on ETTm1 requires 41.48M total parameters for CASA and 33.54M for PatchTST, whereas a single OrangeTree-HU model does it with better accuracy using just 1.68M parameters.
  • Crushing Heuristics in Full MIOL: Across varying $(L, T)$ pairs in $\{48, 96\}$, unified OrangeTree-MIOL matches specialized models (e.g., 0.147 vs. 0.145 MSE on Weather at 0.252s latency). Meanwhile, trimming heuristics wreck accuracy (Solar MSE jumps from 0.240 to 0.602), and padding heuristics bloat latency and memory (Weather latency jumps ~60% to 0.400s and VRAM rises from 13.97 GB to 18.64 GB).

Limitations and Future Work

While the authors note that a dedicated Limitations and Future Work discussion is deferred to Appendix E (not included in the main text), one clear design constraint is explicitly discussed in Section 2.2: OrangeTree’s MIOL training objective is restricted to a discrete set of $(L, T)$ configurations rather than a continuous spectrum of arbitrary lengths, as the authors found that training over continuous lengths introduces excessive variance that hinders convergence.

Summary updated

Abstract

Time series forecasting (TSF) models suffer from a critical rigidity: the inability to handle Multiple Input and Output Lengths (MIOL) within a single architecture. Current workarounds, such as padding or autoregression, often incur computational redundancy or suffer from error accumulation. We propose OrangeTree, a linear and tree-based architecture that decouples model parameters from sequence lengths. It employs a Segment Tree Encoder and an Inverse Tree Decoder to translate multi-length input history into multi-length output predictions within a unified framework. Crucially, a Range Weighter and a Feature Fuser bridge these components, dynamically selecting and fusing relevant ranges into optimal contexts for forecasting. Experiments on six benchmarks confirm OrangeTree achieves the SOTA performance. In MIOL settings, it matches the accuracy of length-fixed models without substantial accuracy degradation or a substantial increase in inference latency typical of heuristic methods. Code is available at https://github.com/Tang-Yiqi/OrangeTree.
BibTeX
@inproceedings{tang2026orangetree,
  author = {Yiqi Tang and Zhichen Lai and Yuxuan Yang and Dalin Zhang and Jinpeng Chen and Gang Chen and Huan Li},
  title = {{OrangeTree: A Linear and Tree-based Time Series Forecasting Model Supporting Multiple Input and Output Lengths}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=bkKbLYspXv},
}
Figure