Pith.

Artificial Intelligence · arXiv:2610.32057 v3 · submitted 23 Oct 2026

HyScale: Scaling Long-Context Training for Learned Sparse Attention

Yangshen Deng, Xinjing Huang, Yulong Wang, Yunzhuo Liu, Jun Hu, Shuyong Tan, Chun-Chih Tseng, Mingji Han

show 3 more authors

Ray Ying, Key Zhang, Luo Mai

The paper says

“We present HyScale, a long-context training system for learned sparse attention. Learned sparse attention is a promising architecture for million-token contexts, widely adopted in production since DeepSeek-V3.2. Selection, however, grows into the training bottleneck.”

more of the abstract

For each query, it scores every previous token whereas sparse attention reads only k; worse, current systems materialize a full score table and repeat selection during recomputation. Our key insight is that the output of selection is not an activation, but rather a set of indices. Building on it, HyScale introduces FlashTopK and selection replay. FlashTopK finds each query's exact top-k on the fly without a score table, while selection replay reuses forward-pass selection in recomputation. Together with holistic system optimizations tackling end-to-end challenges, HyScale speeds up GLM-5.1 training on 1M-token sequences by 2.07 × over Megatron-LM on 512 H20 GPUs. It also speeds up the CSA layers of DeepSeek-V4-Flash and the QSA layers of Qwen3.8-Flash-Next by 2.01 × and 1.57 × at 1M tokens on 32 H800 GPUs.

from the abstract

Pith says

Machine review · deepseek-v4-flash · 26 Oct 2026 · of version 1 of the paper; version 3 is newer · what was read was not recorded · not checked by a person

It can be wrong. Challenge this review or reply to it.

The passes disagreed. Reader: holds up. Skeptic: agrees with the reader. Referee: major revision.

A careful, well-executed systems paper with two novel techniques for accelerating learned sparse attention training; the evaluation is thorough and the claims are supported. This line is wrong

1 major objection · 6 minor

How often objections from reviews like this one are right: not yet measured

Are you an author? What you can do.

Not checked: figures, code, what the references say.

The paper says, at §4.6, Fig. 12

The review did not quote this passage.

Pith says: Objection 1 of 1 · major

The failure-rate validation of HyTopK is carried out on a single training step (81.8M queries from 'one GLM-5.1 training step at 1M', Fig. 12 caption). The paper claims that 'no selection in our experiments has more than 4 failed queries' (b304), but this is based on that single snapshot.

more of objection 1

During training, the indexer's score distribution evolves; a checkpoint with different variance or tail behavior could cause more frequent failures, increasing recovery overhead and eroding the claimed speedup. Since the optimistic threshold is a load-bearing assumption for HyTopK's efficiency, the authors should provide evidence of failure-rate stability across multiple training steps or checkpoints, or explicitly discuss why the rate is expected to remain low throughout training.

6 minor objections

The paper says, at §4.2, Fig. 6 caption

Pith says: minor objection 1 of 6

Step times are averaged over steps 4 to 10. Please clarify why only these steps are used and whether steps beyond 10 show similar behavior.

The paper says, at §3.4.1

Pith says: minor objection 2 of 6

The 'decoupled CP overlap' is described qualitatively but its isolated contribution is not shown. In Fig. 9 it is bundled into 'Impl. optimizations'; a separate breakdown would help assess its individual impact.

show 4 more

The paper says, at §3.2, 'Lightweight host-free recovery'

Pith says: minor objection 3 of 6

The term 'host-free recovery' is slightly misleading because the recovery kernels are still launched from the host. Consider clarifying that they avoid host synchronization (e.g., no CPU round-trip) rather than any host involvement.

The paper says, at §4.2, Fig. 7

Pith says: minor objection 4 of 6

The pipeline wait is reduced from 106.6 s to 51.7 s. The paper attributes this to faster attention layers, but the mechanism (earlier pipeline bubble reduction) could be explained more explicitly.

The paper says, at §4.5

Pith says: minor objection 5 of 6

The generality experiments test only one context length (1M) and one GPU count (32). Adding a second context (e.g., 512K) would strengthen the claim of generality.

The paper says, at §1, b26

Pith says: minor objection 6 of 6

The phrase 'decouple whether to retain or discard each score immediately upon computation' is a bit wordy; consider 'decide on the fly whether to keep or discard each score'.

What would settle it

Instrument HyTopK to log per-layer failure counts during 500 training steps of GLM-5.1 at 1M context (same setup as §4.2). Plot max failure count per step; if any step exceeds 64 failures (triggering full fallback) or if the mean recovery overhead exceeds 10% of HyTopK's selection time, the assumption is violated.

from the skeptic's reading

How the review went

4 readings by deepseek-v4-flash · 26 Oct 2026

  1. Reader holds up confidence high
  2. Skeptic partly agrees 33 s · 21,063 tokens read, 3,117 written
  3. Editor wrote the verdict above 24 s · 21,832 tokens read, 1,396 written
  4. Referee major revision: 1 major objection, 6 minor 25 s · 21,352 tokens read, 2,105 written

Not run on this paper: the simulated authors' defence.

Pith did not check this review's objections against the paper.

The review in full

The review in brief, machine-written

HyScale is a solid piece of systems engineering. The core insight—that the output of top-k selection is a set of indices, not activations—is clean and leads to two well-implemented techniques. HyTopK eliminates the materialized score table by using an optimistic strided threshold, and selection replay cuts recomputation cost by rescoring only the k indices from the forward pass. Together they deliver a genuine 2x speedup on GLM-5.1 training at 1M tokens, and the effect generalizes to block-level architectures like CSA and QSA.

What I like most is the empirical discipline. The ablation (Figure 9) attributes speedup to each component. The CP scaling (Figure 8) goes out to 512 GPUs and shows where gains saturate. The sampling efficiency study (Figure 12) compares against LiteTopK and DoSA across four settings and makes a clear case that an optimistic threshold from a query's own context beats guaranteed lower bounds from nearby queries under CP. The gradient derivation in Appendix A is correct and makes explicit why the backward pass never needs the full score table.

There is one soft spot worth flagging. The stress-test note is right: the failure-rate validation of HyTopK (Figure 12) uses data from a single training step and random initialization. The paper does not track how often failures occur over the course of multi-step training. The authors mention that no selection in their experiments had more than 4 failures, but that statistic comes from the same single-step snapshot. If the indexer's score distribution changes significantly during training—say, becomes more peaked—the optimistic threshold could start missing more true top-k entries. That said, I think this is a minor limitation. The threshold is computed from a strided sample of each query's own context, so it depends only on the current scores. As the indexer improves during training, scores become more discriminative and failures likely become rarer, not more frequent. The fallback is also cheap: a few empty kernel launches when failures are zero, and rescoring only failed queries otherwise. The paper reports ≤4.3% overhead even at 64 failures, and the catastrophic fallback (rescore all queries) has never been triggered. So while the one-step snapshot is a gap, it is unlikely to undermine the central speedup claim.

Overall, this paper is ready for peer review. The writing is clear, the math holds, and the experiments are extensive. It advances the state of practice for training learned sparse attention at scale.

Best, [Your name]

The strongest objection

The paper validates HyTopK's failure rate using 81.8M queries from 'one GLM-5.1 training step at 1M' (Figure 12 caption) and random initialization. This is a single snapshot. During training, the indexer's score distribution evolves; if at some checkpoint the strided threshold triggers more frequent failures (e.g., due to changed score variance or tail behavior), recovery overhead could grow and HyTopK's speedup could be eroded. The paper does not provide evidence across multiple training steps or checkpoints. Since the claim that failures are 'rare' (b109–b118) is load-bearing for the claimed speedup (if failures become common, the host-free recovery cost, currently ≤4.3% for up to 64 failures, could become significant, and the fallback to full rescoring for >64 failures would negate savings), this temporal limitation is the weakest point.

The reader's weakest assumption correctly identified the HyTopK thresholding reliability. I refine it by noting that the empirical demonstration only covers a single training step plus random initialization, not the full training trajectory. This is the most load-bearing concern because if failures become widespread during optimization, the core speedup of HyTopK degrades. However, the paper's evidence (very low failure rate at two weight states, cheap recovery, strided sampling being input-independent) strongly suggests robustness; the missing multi-step validation is a gap but not a fatal flaw. The test would settle whether the concern lands. Therefore the verdict remains ACCEPT.

The referee's report

If the reported speedups are robust, HyScale represents a meaningful advance for training long-context models that use learned sparse attention—an architecture already deployed in production. The paper identifies a fundamental inefficiency (treating discrete indices as continuous activations) and exploits it with two well-motivated techniques. The empirical evaluation covers three distinct architectures (DSA, CSA, QSA), strong and weak scaling up to 512 GPUs, and a detailed ablation. The mathematical derivation of the backward pass (Appendix A) confirms that only the k selected scores are needed, supporting the design. The system is deployed in production, adding to credibility.

Pith's reading of the paper (a machine's summary, not the authors')

The paper introduces HyScale, a training system that accelerates learned sparse attention for million-token contexts. It identifies two key inefficiencies: materializing a full score table during top-k selection and repeating selection during activation recomputation. HyScale's core insight is that selection outputs discrete indices, not continuous activations, enabling two techniques: HyTopK performs top-k selection on the fly without a score table, and selection replay reuses forward-pass selection results in recomputation, scoring only the k selected entries. On 512 H20 GPUs, HyScale speeds up GLM-5.1 training on 1M-token sequences by 2.07× over Megatron-LM and generalizes to other sparse attention architectures like CSA and QSA.

What carries the argument. The two central mechanisms are HyTopK and selection replay. HyTopK fuses scoring and top-k selection using an optimistic threshold estimated from a strided sample of each query's own context, allowing deterministic, exact top-k without writing a score table. When failures occur (candidate overflow or undercount), a lightweight GPU-only recovery rescales only the affected queries. Selection replay stores the selected indices from the forward pass and, during recomputation, gathers and rescales only the k entries those indices point to, cutting recomputation from O(L) to O(k) per query. Supporting system optimizations include decoupled CP overlap, which separately transfers indexer keys and KV states behind disjoint computation, and locality-aware sparse kernels that process two adjacent queries per thread block to share memory loads and atomic updates.

Core claim. The central claim is that the output of top-k selection in learned sparse attention is a set of indices, not a continuous activation, and therefore does not require a materialized score table or repeated selection during recomputation. Exploiting this, HyScale constructs HyTopK, an on-the-fly exact top-k operator using optimistic strided sampling and lightweight host-free recovery, and selection replay, a fine-grained recomputation policy that records forward selection indices and recomputes only the k scores. Combined with decoupled context-parallel overlap and locality-aware sparse kernels, the system achieves up to 2.07× end-to-end training speedup at 1M tokens and scales to block-level architectures.

The premise it rests on. HyTopK's optimistic threshold, estimated from a strided sample with a threefold margin, rarely exceeds the true k-th score, and the few failures that occur can be recovered cheaply on GPU without host synchronization.

If the paper is right (Pith's inferences, not the authors')

Long-context training with learned sparse attention can be significantly cheaper and faster, enabling models to process million-token sequences with lower GPU-hours.

The design generalizes to token-level (DSA), block-level (CSA, QSA), and likely other sparse attention variants, making the system broadly applicable in large-model training.

Operator-level recomputation policies become obsolete for learned sparse attention layers, replaced by cell-level replay that saves orders of magnitude in recomputation time.

Decoupled CP overlap and locality-aware kernels reduce communication and memory bottlenecks, making sparse attention training scalable to thousands of GPUs.

HyScale's speedups grow with context length, reaching 22.3× for a single layer at 8M tokens, suggesting that sparse attention can surpass dense attention in total throughput at extreme contexts.

The optimistic threshold technique (HyTopK) may be adapted to other domains where exact top-k is needed over streaming items, such as training Mixture-of-Experts routing or nearest-neighbor search, wherever failures can be caught cheaply.

Selection replay breaks the assumption that recomputation must rerun entire operators; the same index-as-actor insight could optimize other discrete components in neural networks, e.g., hard attention or Gumbel softmax.

HyScale's decoupled CP overlap, by separating indexer keys from KV states, opens the door to overlapping more fine-grained data transfers in attention, a pattern that might generalize to multi-modal architectures with different data dependencies.

The system is already in production at Tencent; if widely adopted, it could shift the training paradigm toward sparse attention as the default for long-context models, reducing the quadratic barrier in practice.

Check this review

Pith stored no record of this review's passes and took no fingerprint of it. Reviews made by code from 13 Nov 2026 on carry both.

How often reviews like this one are right

Reviews like this one: written by deepseek-v4-flash, where what was read was not recorded.

How often objections from reviews like this one are right: not yet measured

Every value above, in the review's public record (JSON)

Reviews by people

This review was written by a machine. No person has reviewed this paper on Pith yet. A scientist listed on Pith can review it for a fee, and their review is published here whatever it concludes.

Request a human review

How Pith checks papers · The full audit of this paper

The paper

Abstract

We present HyScale, a long-context training system for learned sparse attention. Learned sparse attention is a promising architecture for million-token contexts, widely adopted in production since DeepSeek-V3.2. Selection, however, grows into the training bottleneck. For each query, it scores every previous token whereas sparse attention reads only k; worse, current systems materialize a full score table and repeat selection during recomputation. Our key insight is that the output of selection is not an activation, but rather a set of indices. Building on it, HyScale introduces FlashTopK and selection replay. FlashTopK finds each query's exact top-k on the fly without a score table, while selection replay reuses forward-pass selection in recomputation. Together with holistic system optimizations tackling end-to-end challenges, HyScale speeds up GLM-5.1 training on 1M-token sequences by 2.07 × over Megatron-LM on 512 H20 GPUs. It also speeds up the CSA layers of DeepSeek-V4-Flash and the QSA layers of Qwen3.8-Flash-Next by 2.01 × and 1.57 × at 1M tokens on 32 H800 GPUs.

The paper's own sentences, arranged, kept beside the review and separate from it. Each label is drawn from a closed vocabulary; the number beside it is the probability the classifier gave that label. No sentence in this record was written by a model.

abstract compiled · 2026-10-26

The authors' main claim, as the classifier picked it out 1.00

“Together with holistic system optimizations tackling end-to-end training challenges, HyScale speeds up GLM-5.1 training on 1M-token sequences by 2.07$\times$ over Megatron-LM on 512 H20 GPUs.”

How the main claim is stated: asserted 1.00

What the abstract itself states, as probabilities: claims first 0.06 · states limitation 0.11 · human participants 0.02 · controlled comparison 0.87 · randomized assignment 0.01 · states quantitative result 0.99 · compares with prior results 0.97 · mentions code or data availability 0.03

The abstract, sentence by sentence

This table labels the abstract only (arXiv listing abstract v1). The number is the probability the classifier gave the label.

SentenceRoleThe authors' own workStates the main conclusionStrength
We present HyScale, a long-context training system for learned sparse attention. contribution 1.00 0.91 0.07 asserted 0.99
Learned sparse attention is a promising architecture for million-token contexts, widely adopted in production since DeepSeek-V3.2. background 1.00 0.05 0.04 asserted 0.97
Selection, however, grows into the training bottleneck. background 0.64 0.19 0.03 asserted 1.00
For each query, it scores every previous token whereas sparse attention reads only $k$; worse, current systems materialize a full score table and repeat selection during recomputation. background 0.85 0.13 0.03 asserted 1.00
Our key insight is that the output of selection is not an activation, but rather a set of indices. contribution 0.59 0.72 0.12 asserted 1.00
Building on it, HyScale introduces HyTopK and selection replay. contribution 0.84 0.89 0.08 asserted 0.99
HyTopK finds each query's exact top-$k$ on the fly without a score table, while selection replay reuses forward-pass selection in recomputation. method 0.81 0.93 0.14 asserted 1.00
Together with holistic system optimizations tackling end-to-end training challenges, HyScale speeds up GLM-5.1 training on 1M-token sequences by 2.07$\times$ over Megatron-LM on 512 H20 GPUs. result 1.00 0.95 0.57 asserted 1.00
It also speeds up the CSA layers of DeepSeek-V4-Flash and the QSA layers of Qwen3.8-Flash-Next by 2.01$\times$ and 1.57$\times$ at 1M tokens on 32 H800 GPUs. result 1.00 0.91 0.15 asserted 1.00

What kind of paper the classifier reports this is: method or tool 1.00 · evidence from observation or experiment 0.94

What was examined, and what was not

Sources read

  • arXiv listing abstract v1

Not examined

  • full text
  • figures and tables
  • references and citing sentences
  • relations to other papers

Levels run

  • P abstract

Not run

  • S sections
  • T body sentences
  • C citations
  • R cross-paper relations

How the labels were made

Compiled by classifier-1.13.0 via TypeSafe API, question bank abstract-p1-20260923, 2026-10-26: 1 request, 6,940 input tokens.

Every quoted sentence on this record is the authors'. Every label is from Pith's closed vocabulary, with the probability shown beside it. This record as JSON

Figures (12)
Figure 1 of the paper
Figure 1. One training step of GLM-5.1 in Megatron-LM on 512 H20 GPUs (PP8×CP32×DP2 at 256K, PP8×CP64 at 512K, PP4×CP128 at 1M) with 8K tokens per GPU and full activation recomputation of every layer (Korthikanti et al., 2023), first pipeline stage. Step times exclude the pipeline wait, with the attention layer in color and the rest of the step in gray. 2.2 Long-Context Training Context parallelism. To train on sequences that are too long for one GPU, context parallelism (CP) splits a sequence of length L across a group of P GPUs, so each GPU holds only n = L/P queries. Ring Atten￾tion (Liu…
Figure 3 of the paper
Figure 3. A learned sparse attention layer in HyScale, drawn in the same lanes as
Figure 4 of the paper
Figure 4. Costs of the policies in
Figure 5 of the paper
Figure 5. Locality-aware sparse kernels. Existing kernels (a) assign each thread block a single query; HyScale (b) processes two adjacent queries in one thread block over the union of their selections. Each row in a block marks the keys that one query uses. DeepSpeed-Ulysses (Jacobs et al., 2023) saves communi￾cation by splitting attention across GPUs by heads, so that each GPU gathers only the KV of its own heads. In DSA, however, all attention heads read the same KV latent and all indexer heads read the same indexer key, so each GPU would still gather the whole latent and key of every…
Figure 6 of the paper
Figure 6. Full GLM-5.1 on 512 H20 GPUs from its released weights, with 8K tokens per GPU and 4M tokens per step; each sample is one sequence. The runs use PP8×CP32×DP2×EP64 at 256K, PP8×CP64×EP64 at 512K, and PP4×CP128×EP128 at 1M. Both systems force balanced MoE routing and use momentum-free SGD with Megatron￾LM’s distributed optimizer. Step times average steps 4 to 10. 0 50 100 150 200 250 300 Profiled step at 1M (s) 125 s HyScale 264 s Megatron-LM Selection (fwd, recomp., bwd) Exposed CP transfer Pipeline wait Sparse attention Rest of the step
Figure 7 of the paper
Figure 7. Breakdown of one training step of the full GLM￾5.1 at 1M, first pipeline stage. (2) Sequence boundaries cache: similarly, Megatron-LM’s RoPE synchronizes with the host in every call to read the sequence boundaries. HyScale copies these boundaries to the host once per micro-batch. The other two techniques remove wasted GPU work. (3) Kernel fusion: HyScale fuses chains of elementwise operators, such as the indexer’s KL loss, normalizations, and RoPE. Fusion saves kernel launches and memory traffic. (4) Permutation-free KV gather: Megatron-LM reorders the gathered KV states into token…
Figure 8 of the paper
Figure 8. CP scaling of one GLM-5.1 attention layer on H20. Panels (a) and (b) show strong scaling at 256K and 512K context, and (c) and (d) weak scaling at 8K and 16K queries per GPU. Layer time includes the forward pass, the recomputation, and the backward pass on the slowest rank. selection replay cuts the recomputed selection from 37.0 s to 1.0 s. The faster attention layers also halve the pipeline wait, from 106.6 s to 51.7 s. 4.3 Context-Parallel Scalability This experiment evaluates how well each system’s CP scales. We benchmark a single GLM-5.1 attention layer on 8 to 512 H20 GPUs,…
Figure 9 of the paper
Figure 9. Cumulative ablation of one GLM-5.1 layer on H20 at 8K queries per GPU. 4.4 Ablation Study We measure the layer time of one GLM-5.1 attention layer at 256K context on 32 GPUs and at 1M on 128 GPUs, with the CP size equal to the GPU count and 8K queries per GPU (
Figure 11 of the paper
Figure 11. End-to-end efficiency of HyTopK’s top-k selec￾tion for GLM-5.1 on one H20 GPU. Labels in (a) give Hy￾TopK’s speedup over Megatron-LM with its default 1 GiB memory limit on the score table, and (b) is relative to Hy￾TopK’s base selection time. at only 1.5–1.9 GiB per layer, almost flat as the context grows. Megatron-LM must instead trade memory for time. With its default 1 GiB memory limit on the score table, it peaks at 3.1 GiB but runs 1.22–1.71× slower than HyTopK. With the whole score table, it runs faster but needs 12– 48 GiB, 8–26× HyTopK’s peak. Even then, it runs 3–10%…
Figure 12 of the paper
Figure 12. Sampling efficiency: share of failed queries at each buffer size. Labels count failures at HyTopK’s default 16K-slot buffer (red line). 8K to 64K slots (

Showing 10 of the paper's 12 figures. Figures are the authors', reproduced from the paper.

Challenges and discussion

Disagree with the review, or know something it missed? Leave a comment, or challenge this review formally: a challenge becomes a permanent entry in this paper's record, and its decision is published here.

No comments yet.

Sign in to comment