arXiv:2609.08554cs.LGSep 2026

Manuscript Offprint

arXiv:2609.08554

Not All Variables Agree: Reliability-Aware Variable-Wise Gradient Surgery for Multivariate Time-Series Forecasting

Jinwoo Park, Hyeongwon Kang, Pilsung Kang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Jinwoo Park

Department of Industrial Engineering Seoul National University Seoul, Republic of Korea jinwoo_park@snu.ac.kr

Hyeongwon Kang

Department of Industrial & Management Engineering Korea University Seoul, Republic of Korea hyeongwon_kang@korea.ac.kr

Pilsung Kang*

Department of Industrial Engineering Seoul National University Seoul, Republic of Korea pilsung_kang@snu.ac.kr

ABSTRACT

In data-driven training, multivariate time-series forecasting is usually optimized with a scalar loss averaged over samples, variables, and horizons. This averaging is convenient, but the optimizer sees only the aggregated gradient, which does not reveal whether the variable-wise contributions align or oppose one another. To quantify how often this disagreement arises, we measure the variable-wise gradients directly and find that 30.6% of their pairwise cosine similarities are negative on average across seven datasets. However, conflict and harm are not the same thing. Under shared training 35 of the 64 variables do worse than a full-input single-target oracle, and the harmed fraction is not reliably predicted by how often gradients conflict. We propose Per-Variable Surgery (PV-Surgery), an optimizer-side training strategy for backbones with cache-compatible layers. One backward pass builds variable-wise gradient proxies from output-side signals and keeps the pointwise forecasting loss. Reliability-aware selection targets layers whose proxy sums closely approximate their shared-gradient slices. Conditional pooling forms anchor and conflict pools without dropping variables. Common-direction surgery aligns variable or pooled gradients with their normalized mean and restores input norms to avoid reweighting. In experiments across five backbones, seven datasets, and four horizons, PV-Surgery lowers MSE by 3.61% and MAE by 2.93% on average. For multivariate forecasting, this indicates that the variable-wise structure hidden by mean-loss training is a usable optimization signal.

1 INTRODUCTION

Multivariate time-series forecasting predicts the future values of multiple variables from a shared history of all variables (Lai et al., 2018; Lim & Zohren, 2020). Forecasting architectures differ widely, but most are trained with a similar mean-loss objective. Prediction errors are averaged over samples, variables, and horizons to form a scalar loss, which is optimized through backpropagation (Nie et al., 2023; Liu et al., 2024; Wang et al., 2024). This objective is convenient and model-agnostic, but it also collapses heterogeneous variable-wise learning signals into one shared update.

The three averages behind this scalarization do not play the same role. Averaging over samples estimates an expectation over the data distribution, whereas averaging over variables and horizons assumes that heterogeneous targets and future steps can be merged into one optimization signal

*Corresponding author

Figure

(a) Variable-specific future corrections.

Figure

(b) Mean-loss gradient averaging.

Figure 1: Conceptual illustration of variable-wise gradient conflict. (a) Different variables can require corrections in different directions over the same forecast horizon. (b) These corrections translate into variable-wise gradients that disagree in parameter space, while the mean-loss update shown here coincides with none of them.

without losing important structure. In practice, however, variables differ in scale, noise, predictability, dynamics, and cross-variable dependency (Lai et al., 2018; Liu et al., 2024; Nochumsohn et al., 2025). Consequently, an update that helps one variable can be neutral or harmful for another, but the mean-loss gradient does not reveal which case holds (Nochumsohn et al., 2025; Liu et al., 2021).

More concretely, let Ld(θ)L_d(\theta) denote the loss induced by variable dd, averaged over samples and horizons. Standard training minimizes Lmean(θ)=D−1∑d=1DLd(θ)L_{\text{mean}}(\theta) = D^{-1} \sum_{d=1}^D L_d(\theta) and updates parameters with gmean=∇θLmean(θ)=D−1∑d=1Dgdg_{\text{mean}} = \nabla_\theta L_{\text{mean}}(\theta) = D^{-1} \sum_{d=1}^D g_d, where gd=∇θLd(θ)g_d = \nabla_\theta L_d(\theta). This aggregation is many-to-one, so different sets of variable-wise gradients can produce the same update. For D=2D=2, g1=u+vg_1 = u + v and g2=u−vg_2 = u - v produce gmean=ug_{\text{mean}} = u, hiding the disagreement component vv. When ∥v∥2>∥u∥2\|v\|_2 > \|u\|_2, the inner product ⟨g1,g2⟩=∥u∥22−∥v∥22\langle g_1, g_2 \rangle = \|u\|_2^2 - \|v\|_2^2 turns negative, so an update along −g1-g_1 reduces L1L_1 but increases L2L_2 to first order. Moreover, under any shared update θ←θ−ηgshared\theta \leftarrow \theta - \eta g_{\text{shared}} with step size η>0\eta > 0, the first-order change of LdL_d is −η⟨gd,gshared⟩-\eta \langle g_d, g_{\text{shared}} \rangle, whose sign cannot be checked from the aggregate alone. The problem is therefore not that mean loss is invalid, but that its single gradient hides the variable-wise directions needed to distinguish disagreement from actual harm.

Figure 1(a) shows three variables requiring corrections in different directions over the same horizon, and Figure 1(b) shows their parameter-space gradients, two of which oppose each other while their mean coincides with none of them. We call this variable-wise gradient conflict, following the view that a negative inner product encodes incompatible descent directions (Yu et al., 2020; Nochumsohn et al., 2025). A natural reaction is to remove every conflict, as in gradient surgery (Yu et al., 2020). In multivariate forecasting, our diagnosis suggests otherwise. Conflicts are common but not uniformly harmful, so intervention should be selective, variable-aware, and anchored to the mean-loss update.

In this paper, we propose PV-Surgery, a reliability-aware optimizer-side framework. At each training step, one backward pass builds variable-wise gradient proxies from output-side signals. PV-Surgery then selects surgery layers based on the normalized error between each proxy sum and its matching reference-gradient slice, conditionally forms anchor and conflict pools without dropping variables, and aligns variable or pooled gradients with the normalized mean of their input directions before restoring their norms to avoid reweighting. PV-Surgery requires no changes to cache-compatible forecasting backbones or per-variable losses. We make the following three contributions:

  • We analyze variable-wise conflict under standard mean-loss training using exact gradients. Although 30.6% of pairwise cosines are negative on average, conflict frequency is weakly related to harm. Shared training underperforms a full-input single-target oracle for 35 of 64 variables, while mean alignment does not reliably identify helpful partners.

  • We propose PV-Surgery, which reconstructs variable-wise gradient proxies in one backward pass, targets reconstruction-consistent layers, pools without dropping variables, and corrects directions while restoring surgery-input norms over the selected subspace.

  • We conduct experiments across five backbones, seven datasets, and four horizons, showing that PV-Surgery lowers MSE by 3.61% and MAE by 2.93% on average and that variable-wise structure hidden by mean-loss training is a usable optimization signal in these settings.

References (49)