arXiv:2609.08106cs.LGSep 2026

Manuscript Offprint

arXiv:2609.08106

Nyström Attention Matches Full Attention for Cross-Sectional Stock Prediction

Kunhan Guo

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

Abstract

MASTER's inter-stock multi-head attention—the module responsible for modeling cross-sectional stock relationships—accounts for 42.5% of model parameters and 25% of predictive value. We systematically decompose this module and uncover a surprising structure: the learned attention is near-uniform (perplexity 278/300), yet forcing exact uniformity eliminates all cross-sectional discrimination. Spectral analysis resolves this paradox: the deviation from uniformity is low-rank (effective rank ~65, top-10 modes capture 96.5% of energy), explaining why sparse approximations consistently fail while Nyström low-rank attention (m=32m = 32 landmarks) matches full O(N2)O(N^2) attention at O(mN)O(mN) cost—certified equivalent via TOST at both N=300N = 300 (5 seeds, Rank IC p=0.003p = 0.003) and N=800N = 800 (10 seeds, Rank IC p=0.034p = 0.034). Additional findings include: (i) attention anti-correlates with return similarity (Spearman ρ=−0.614\rho = -0.614; on the industry-labeled subset, −0.645-0.645 unconditionally and −0.627-0.627 after controlling for industry, beta, and volatility), suggesting complementarity-seeking rather than correlation mining; (ii) all graph-based alternatives degrade performance, with hard masking worse than complete module removal; and (iii) at N≈3,500N \approx 3,500 with adapted architectures, no cross-stock module (GCN, Nyström, or MASTER-style pipeline) significantly outperforms a per-stock LSTM baseline (n=4n = 4 seeds), indicating that the benefits observed at smaller scales do not trivially transfer. These results establish that the inter-stock attention's value resides in a compressible, dynamic, near-global redistribution that rewards low-rank approximation but resists sparsification.

1 Introduction

Cross-sectional stock prediction—ranking which stocks will outperform within a universe—is a core task in quantitative finance. Recent Transformer-based models, particularly MASTER (Market-Guided Stock Transformer) [1], have become standard baselines by applying multi-head attention across stocks at each timestep. This inter-stock attention module (Step ③ in MASTER's five-stage pipeline) claims to capture “momentary and cross-time stock correlations,” and subsequent work has sought to enhance it with explicit graph structures drawn from industry membership, supply chains, or return correlations [4, 5, 6, 8, 3, 7, 14].

But what does this module actually learn? And can it be made cheaper? We address both questions through a systematic decomposition combining statistical diagnostics, controlled ablations, spectral analysis, and efficient-attention experiments. Our findings challenge several prevailing assumptions:

  1. The attention is near-uniform but not uniform. Per-stock entropy is within 1.2% of the theoretical maximum, yet forcing exact uniformity eliminates all cross-sectional discrimini-nation. The deviation from uniformity contributes only 1.3% of output energy but is the sole source of cross-sectional variance.

  2. The deviation structure is low-rank. Spectral analysis of the deviation matrix D=A−1N11⊤D = A - \frac{1}{N} \mathbf{1} \mathbf{1}^\top reveals an effective rank of ~65 (out of 300 stocks), with the top-10 singular values capturing 96.5% of the Frobenius norm. This directly predicts that low-rank attention should succeed while sparse attention should fail.

  3. Nyström attention matches full attention at O(mN)O(mN). Replacing full O(N2)O(N^2) attention with Nyström approximation using just m=32m = 32 landmarks produces equivalent Rank IC (TOST p=0.003p = 0.003 within ±0.005\pm 0.005) and equivalent IC within ±0.008\pm 0.008 (TOST p=0.028p = 0.028) across 5 seeds, with lower seed-to-seed variance.

  4. Sparsification consistently fails. Graph-masked, top-KK, and deviation-thresholded variants all degrade performance. Hard masking to correlation-based neighbors is worse than removing the module entirely. A 2×22\times 2 factorial reveals that IC scales with neighbor count while Rank IC scales with weight sharpening—requirements that are mutually exclusive under sparsity.

  5. Large-NN transferability is limited. At N≈3,500N \approx 3,500 (full A-share market) with adapted architectures, no cross-stock module significantly outperforms a per-stock LSTM baseline across multiple seeds (n=4n = 4). The benefits documented at N=300N = 300-800 do not trivially transfer to larger, noisier universes—a finding that itself required multi-seed validation to establish, as single-seed results suggested a spurious trade-off.

Together, these findings establish that MASTER's inter-stock attention implements a compressible, dynamic, complementarity-seeking redistribution of cross-sectional information. Its value is real but resides in a low-rank structure that rewards Nyström approximation and resists sparsification—a distinction with direct implications for scaling stock Transformers, tempered by the observation that scaling benefits are not guaranteed at larger NN.