arXiv:2610.11170cs.LGOct 2026

Manuscript Offprint

arXiv:2610.11170

SACQ: Structured Decoding with Memory-Conditioned Refinement for Long-Horizon Forecasting

Guo Cheng, Zhengzhuo Xu, Chenchen Jing, Jingyi Hou

Guo Cheng 1^{1}, Zhengzhuo Xu 1^{1}, Chenchen Jing 2^{2}, Jingyi Hou 1,3,∗^{1,3,*}

1^{1}University of Science and Technology Beijing, China

2^{2}Zhejiang University of Technology, Hangzhou, China

3^{3}Institution of Artificial Intelligence, University of Science and Technology Beijing, China

Email: {u202343375, u202142443}@xs.ustb.edu.cn, jingchenchen96@163.com, houjingyi@ustb.edu.cn

Abstract—Long-term time series forecasting (LTSF) models predominantly employ patch-based encoders terminated by a flatten readout head that maps the entire encoded historical memory to all future steps through a single shared projection. This implicit coupling of future positions obscures position-specific historical-to-future alignment and amplifies sensitivity to corrupted inputs and extreme supervision noise. We present SACQ, a plug-in structured prediction head that replaces flatten readout while keeping the encoder unchanged. SACQ adopts a two-stage decoding pipeline: it first establishes a coarse patch-grid forecast scaffold, then refines each future position through cross-attention over historical memory and merges the attention-derived correction with the coarse scaffold via a learned per-patch gate. To stabilize optimization under long horizons and noisy labels, we further propose a batch-adaptive scaled log-cosh loss that automatically calibrates robustness to the current residual scale, suppressing outlier gradients while preserving MSE-like sensitivity for typical errors. SACQ attains top-tier test MSE/MAE across PatchTST, DLinear, and patch-Mamba backbones with only modest incremental overhead in parameters and latency. Under inference-time input corruption and training-set label-noise stress tests, SACQ substantially outperforms flatten readouts, with ablation studies validating each architectural component.

Index Terms—Long-term time series forecasting, Prediction head, Structural decoding, Robust loss, Memory-conditioned attention

I. INTRODUCTION

Long-term time series forecasting (LTSF) underpins decision making and planning in domains where forward-looking information is essential, including energy load dispatch [1], traffic flow management [2], and industrial equipment telemetry. The central challenge is to extrapolate reliably over a distant future from a finite history of observations [3]. Recent progress has strengthened encoder-side temporal modeling through strong baselines such as PatchTST, Autoformer, and DLinear, which exploit patch tokenization [4], frequency-domain decomposition [5], and efficient linear baselines [6]. Yet an often overlooked bottleneck remains at the readout stage. Most models still terminate with a lightweight flatten readout that vectorizes encoded historical patch memory and maps it to the entire forecast horizon through one shared dense projection [4], [6]. This design is parameter efficient, but it introduces two deeply coupled limitations that become especially harmful under long horizons and imperfect data.

First, representation coupling. Because all future positions share the same readout parameters, historical-to-future correspondence is compressed into static weights rather than realized through explicit, position-specific retrieval and alignment, unlike decoder-style forecasters that treat multi-step prediction as structured readout [5], [7], [8]. When the input history contains abnormal or corrupted patches, flatten readout cannot apply differentiated readout logic at different future positions, and models therefore degrade quickly under inference-time input perturbations, a pattern also reported under standardized corruption benchmarks [9]. Second, optimization coupling. Under standard mean-squared error (MSE), gradient magnitude scales with residual size, so a small number of extreme supervision steps can dominate updates within a minibatch. The global projection in flatten readout further amplifies this effect, leading to marked test-error increases when training labels contain spikes or tail contamination, with the gap widening as the forecast horizon grows.

To address these limitations systematically, we propose SACQ (Structured Decoding with Memory-Conditioned Refinement), a plug-in structured prediction head that replaces flatten readout without modifying the patch encoder. SACQ recasts long-horizon forecasting as explicit staged decoding. Stage one builds a coarse patch-grid scaffold through a lightweight projection that preserves global structure. Stage two applies cross-attention [10] so each future position queries historical memory to produce a position-specific correction residual. Stage three merges the attention-derived correction with the coarse scaffold through learned per-patch gating. For training under long horizons and noisy labels, we further adopt batch-adaptive scaled log-cosh loss [11], which sets the width of the robust transition region from the batch median residual and dampens gradients from extreme outliers while retaining MSE-like sensitivity for typical errors, without dataset-specific

*Corresponding author.

Code is available at https://github.com/PLACEHOLDER/SACQ.

Figure

Fig. 1. Flatten readout vs. SACQ decoding. Left: flatten maps encoded historical memory to all future steps through one dense projection, sharing readout parameters across the horizon. Right: SACQ initializes coarse future-patch predictions, refines them with cross-self attention over historical memory, and merges a gated residual correction at each future patch. Details are given in Sec. III-C.

calibration.

Our contributions are threefold. First, we characterize flatten-readout limitations as representation and optimization coupling and quantify them with inference-time corruption tests, training-set input masking, and label-noise stress experiments. Second, we design SACQ as a structured decoder that integrates coarse initialization, memory-conditioned cross-attention, concat-linear fusion, gated residual readout, and optional causal self-attention, trained by default with batch-adaptive scaled log-cosh. Third, on standard long-horizon benchmarks and readout swaps across PatchTST, DLinear, and patch-Mamba, SACQ achieves top-tier or near top-tier test MSE and MAE under both clean evaluation and robustness settings, with only moderate parameter and latency overhead. Follow-on ablation studies and efficiency analysis further isolate module contributions and deployment cost.

References (29)