# Efficient Quantization Training with Stochastic Rounding via Structured Subspace Randomness

구조적 부분공간 무작위성을 통한 확률적 반올림 기반 효율적 양자화 학습

Zeyu Wang, Yiheng Duan, Tao Chen, Donghyun Koo, Sihan Liu, Wenbo Zhang 외 2명 · arXiv · 2026년 10월 27일

- **연구 문제** 독립 난수를 원소마다 뽑는 확률적 반올림은 INT8 학습에서 난수 생성 비용 때문에 BF16보다 느려질 수 있으며, 이 논문은 임계값을 토큰 단위로 공유하는 S3R과 그 공유 오차를 제거하는 S3R-EC를 제안합니다.
- **연구 방법** S3R은 상위 기울기를 한 번만 양자화하고 토큰마다 하나의 임계값을 은닉 차원에 브로드캐스트합니다. S3R-EC는 양자화 오차에서 구조적 평균을 계산하여 활성화 기울기와 가중치 기울기에서 뺍니다.
- **주요 결과** 보정하지 않은 Φ2D 공유는 독립 SR보다 검증 손실이 0.126 높았지만, S3R-EC two-way는 독립 SR과 같은 수준을 보였습니다. TPU v5p의 전체 학습 단계에서는 Llama 3.1-8B 기준으로 S3R-EC two-way가 BF16보다 1.284배 빠릅니다.

## 확률적 반올림의 난수 생성 비용

저정밀도 학습에서 확률적 반올림(Stochastic rounding, SR)은 양자화된 기울기를 비편향으로 유지하고, 작은 갱신이 0으로 사라져 매개변수가 멈추는 기울기 정체(gradient stagnation)를 막는 데 쓰입니다. 표준 SR은 기울기 원소마다 독립적인 균등 임계값을 뽑아야 합니다. 행렬 곱은 행렬 연산 장치(MXU)에서 실행되지만 카운터 기반 난수 생성기는 벡터 처리 장치(VPU)에서 실행되므로, 원소마다 32비트 난수 워드를 만드는 작업이 VPU를 포화시키고 MXU를 기다리게 합니다. 그 결과 INT8 최대 행렬 처리량이 BF16의 두 배라는 이점에도 불구하고, SR을 쓴 INT8 학습은 BF16 학습보다 느려질 수 있습니다.

예를 들어 JAX 기본 Threefry 생성기를 쓴 독립 SR은 TPU v5p에서 작은 모델 차원의 FFN 블록을 BF16의 0.58배 속도로 실행합니다. 이 글은 임계값을 여러 원소가 공유하면 난수 비용이 줄어드는 대신 무엇이 생기는지, 그리고 그 오차를 어떻게 제거하는지를 따라갑니다.

## S3R의 임계값 공유 방식

S3R은 상위 기울기 G를 한 번만 양자화하고, 그 결과를 활성화 기울기 곱과 가중치 기울기 곱이 함께 읽습니다. 기존 구현은 두 곱에 서로 다른 임계값 텐서를 써서 기울기를 두 번 양자화하지만, S3R은 두 곱에 같은 임계값을 써서 양자화를 한 번만 수행하고 INT8 결과를 메모리에 한 번만 기록합니다. 확률적 반올림 규칙은 정규화된 잔차 P = G/∆ − ⌊G/∆⌋가 임계값 R 이상이면 올림하는 형태입니다. 임계값은 두 단계로 줄어듭니다. 먼저 토큰마다 균등 시드 u를 뽑고, 브로드캐스트 함수 Φ로 R = Φ(u)를 만듭니다. 이때 R은 메모리에 실체화되지 않고 VPU 레지스터 안에서 브로드캐스트됩니다.

기본 구조인 Φ2D는 토큰마다 하나의 임계값을 그 토큰의 은닉 차원 전체에 공유합니다. 서로 다른 토큰의 임계값은 독립으로 남습니다. 임계값은 7비트 bf16 값이며, 32비트 Threefry 워드 하나에서 네 개를 잘라 씁니다. 격자 반 단계만큼 이동하므로 편향은 ∆/256 이하로 제한되고, 이 이산화를 반영한 조건에서 비편향성 결과(Lemma 1)가 성립합니다.

## 공유 임계값이 만드는 공분산

임계값을 공유해도 기대값은 바뀌지 않습니다. 각 임계값이 주변적으로 균등하면 선형 연산에서 기울기의 기대값은 원래 기울기와 같습니다. 문제는 같은 임계값을 쓰는 원소들의 반올림 오차가 서로 묶인다는 점입니다. 같은 임계값을 공유하는 두 원소 i와 k의 오차 공분산은 ∆²(min(P\_i, P\_k) − P\_i P\_k)이며, 이 값은 0 이상 ∆²/4 이하입니다. 독립 임계값에서는 이 공분산이 0입니다. 잔차가 \[0, 1)에 고르게 퍼져 있으면 각 오차의 분산은 약 ∆²/6이고 쌍별 공분산은 약 ∆²/12입니다. 가중합인 역전파에서 결과의 분산은 개별 분산의 합과 모든 쌍별 공분산의 합으로 구성되므로, 같은 토큰 안의 양의 공분산은 활성화 기울기의 오차 분산을 키웁니다.

가중치 기울기의 오차 분산은 독립 SR과 같게 유지되지만, 활성화 기울기 오차에는 W\_ij W\_ik Cov 항이 추가됩니다. 저자들은 이 공유 오차가 상위 층의 기울기를 통해 아래 층으로 전파되고, 아래 층은 자신의 독립 반올림 오차로 이를 상쇄하지 못한다고 해석합니다.

## S3R-EC의 평균 제거 보정

S3R-EC는 양자화기가 알고 있는 반올림 오차 E = ĝ − G를 이용합니다. 각 토큰의 채널 평균과 각 채널의 토큰 평균을 계산한 뒤, 이 구조적 평균 오차를 활성화 기울기와 가중치 기울기에서 빼는 방식입니다. 임의의 n개 오차에 대해 평균을 빼면 평균 쌍별 공분산은 c̄ − Var(X̄) = −(1/n)(σ̄² − c̄)만큼 낮아져 0 이하가 됩니다. 여기서 σ̄²는 평균 분산이고 c̄는 평균 쌍별 공분산입니다. 등가 공분산인 경우에는 공유된 부분이 제거되고 개별 부분만 남습니다. 두 방향 보정(two-way)은 토큰 평균에 해당하는 항을 활성화 기울기에서 빼고, 채널 평균에 해당하는 항을 가중치 기울기에서 뺍니다.

이 보정은 추가 난수를 쓰지 않고 옵티마이저 AdamW를 바꾸지 않습니다. Φ2D에서는 서로 다른 토큰의 오차가 독립이므로 토큰 방향 중심화가 거의 제거할 공분산을 찾지 못하고, 주된 작업은 토큰 내 채널 평균 제거가 맡습니다. 그래서 활성화 기울기 쪽만 보정하는 dX 전용 변형도 같은 수준의 이득을 냅니다. 보정항은 비용이 들지만 두 방향 보정은 S3R 단계 시간에 2.2–4.5%, dX 전용은 1.1–1.8%를 더합니다.

![Figure 2: Worked example of S3R-EC (two tokens, four channels, units of ∆). Left: one shared threshold per token ( r1 = 0.85, r2 = 0.10) rounds all channels of…](https://refivu.com/papers/dd1ff416-5a97-4796-abca-ffb646fab63f/figures/figure-9a793508e36ffd535938ae58693a86e5.png?thumb=512)

**Fig. 2** . Worked example of S3R-EC (two tokens, four channels, units of ∆). Left: one shared threshold per token ( r1 = 0.85, r2 = 0.10) rounds all channels of token 1 up and all of token 2 down; the known errorE=q−ssplits intoE str and a residualNwith zero row and column sums. HereE str reduces to one offset ε per token (in general it also has a per-channel term). Right: both variants subtract εW i1 from the activation gradient (row Wi of W); two-way also subtractsx ⊤Estr from the weight gradient (input featurex), which dX-only leaves unchanged.

[원문](https://arxiv.org/abs/2610.36587v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Zeyu Wang, Yiheng Duan, Tao Chen, Donghyun Koo, Sihan Liu, Wenbo Zhang, Chuan He, Liang Liu · Efficient Quantization Training with Stochastic Rounding via Structured Subspace Randomness · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.

## 수렴 실험과 진단 결과

수렴 실험은 12층 Llama 계열 디코더를 영어 C4 데이터에서 2000 스텝 학습하며, 시퀀스 길이 S는 2048, 배치 B는 8, 총 32.8M 토큰을 사용합니다. 각 설정은 시드 0에서 고른 최적 학습률을 쓰고, 세 시드의 최종 검증 손실 평균과 표본 표준편차를 보고합니다. 보정하지 않은 Φ2D 공유는 5.055±0.017로 독립 SR의 4.929±0.019보다 0.126 높습니다. 반면 two-way 보정을 적용한 S3R-EC(Φ2D)는 4.919±0.022로, 독립 SR과 같은 수준이라고 저자들은 해석합니다. 수치상 평균은 독립 SR보다 낮지만, 세 시드로 구분할 수 있는 차이가 약 0.05 이상이므로 이 차이는 확정되지 않습니다.

dX 전용 보정은 4.924±0.021입니다. 예제마다 하나의 임계값을 쓰는 Φbcast는 two-way 보정을 적용해도 5.002±0.024에 머물고, 보정하지 않으면 6.239±0.026으로 유용하게 학습되지 않습니다. BF16 체크포인트의 스텝 1000에서 측정한 Table II 진단은 하단 층 활성화 기울기 오차를 독립 SR 0.572, S3R(Φ2D) 0.877, S3R-EC two-way(Φ2D) 0.476으로 보고합니다. 즉 Φ2D의 보정 후 오차는 독립 SR보다 작습니다. 같은 진단에서 Φbcast 보정 전 하단 층 오차는 3.157이고 보정 후에는 0.521입니다. 이 진단은 고정된 학습 배치 4–9개에 대한 평균입니다.

![Figure 3: Validation loss versus training step for all configurations of Table I, each at its best learning rate. Lines show the mean over 3 seeds, and shaded…](https://refivu.com/papers/dd1ff416-5a97-4796-abca-ffb646fab63f/figures/figure-522b2f77865bfb2ce165179eafdcfb8d.png?thumb=512)

**Fig. 3** . Validation loss versus training step for all configurations of Table I, each at its best learning rate. Lines show the mean over 3 seeds, and shaded bands span the seed minimum to maximum. The bottom panel enlarges the last 25% of steps. S3R (Φ bcast) lies off this scale (final loss 6.24).

[원문](https://arxiv.org/abs/2610.36587v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Zeyu Wang, Yiheng Duan, Tao Chen, Donghyun Koo, Sihan Liu, Wenbo Zhang, Chuan He, Liang Liu · Efficient Quantization Training with Stochastic Rounding via Structured Subspace Randomness · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

## TPU v5p의 학습 단계 속도

단일 FFN 블록에서 독립 SR은 BF16 대비 작은 형상에서 느리지만, S3R(Φ2D)은 형상에 따라 BF16 대비 1.08–1.92배 빠릅니다. 전체 학습 단계 실험은 Llama 3.1-8B, Qwen3-8B, Gemma 3-12B의 세 밀집 모델과 Qwen3-30B-A3B, DeepSeek-V2-Lite의 두 혼합 전문가 모델에서 TPU v5p의 JAX/XLA 환경으로 측정했습니다. Llama 3.1-8B에서 BF16은 3862 ms, INT8 RTNE는 2926 ms(1.320배), 독립 SR은 3350 ms(1.153배), S3R(Φ2D)은 2903 ms(1.331배), S3R-EC two-way는 3008 ms(1.284배), dX 전용은 2935 ms(1.316배)입니다.

밀집 모델에서 S3R-EC two-way는 BF16보다 1.24–1.32배 빠르고 독립 SR보다 약 1.11배 빠릅니다. MoE 모델에서는 이득이 더 작아, S3R(Φ2D)이 독립 SR보다 1.09–1.11배 빠르고 S3R-EC two-way는 1.04–1.06배 빠릅니다. 측정 단위는 중앙값 단계 시간이며, 장치당 4개의 4096 토큰 합성 시퀀스를 사용했습니다.

## 적용 범위와 한계

세 시드는 약 0.05 이상의 차이를 구분할 수 있으므로, 독립 SR과 S3R-EC two-way(Φ2D) 사이의 작은 차이는 이 실험으로 결론을 내리기 어렵습니다. 각 설정의 학습률은 시드 0에서 고르고 그 시드도 평균에 포함되므로, 최종 손실 차이를 해석할 때 이 선택 과정을 함께 봐야 합니다. Φbcast 실험에서는 낮은 학습률까지 손실이 계속 개선되지만, 시험한 가장 낮은 학습률에서도 유용한 학습으로 이어지지 않았습니다. 따라서 이 결과는 Φbcast가 본질적으로 학습할 수 없다는 증명이 아니라 시험한 범위에서의 관찰입니다. 속도 결과는 TPU v5p와 JAX/XLA 구현, 지정한 모델과 장치 구성에서 얻은 것입니다.

단일 FFN 블록에서 S3R-EC two-way는 W1 형상에서 BF16보다 느리며, 그 비율은 0.94–0.96배입니다. Lemma 1의 비편향성은 임계값 이산화의 편향을 반영한 조건에서 성립하며, S3R-EC의 보정 효과는 제시된 다섯 형태의 실험 범위 밖으로 일반화되지 않습니다.

## 논문 정보

- **저자**: Zeyu Wang, Yiheng Duan, Tao Chen, Donghyun Koo, Sihan Liu, Wenbo Zhang, Chuan He, Liang Liu
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2026년 10월 27일
- **등록일**: 2026년 11월 1일
- **수정일**: 2026년 10월 27일
- **버전**: v1
- **arXiv**: 2610.36587
- **분류**: cs.LG
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2610.36587v1) · [원문 PDF ↗](https://arxiv.org/pdf/2610.36587v1)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

Low-precision training often relies on stochastic rounding (SR) to keep quantized gradients unbiased and prevent small updates from rounding to zero. Standard SR draws an independent random threshold for every gradient element. However, accelerators generate random numbers on vector units whose throughput lags far behind their matrix units. Drawing one threshold per element saturates the vector unit and can make INT8 training with SR slower than BF16 training. Sharing random thresholds across tensor elements removes this cost but forces those elements to round in the same direction and shifts their rounding errors by a common offset. We find that this offset degrades training primarily through the activation gradient, which propagates the error backward into earlier layers. Because earlier layers cannot cancel an incoming offset using their own local rounding errors, the offset must be removed at the layer where it originates. We propose Structured Subspace Stochastic Rounding (S3R), which quantizes each upstream gradient once for both the activation and weight gradient matrix multiplications and shares a single threshold per token across the hidden dimension. Its error correction, S3R-EC, subtracts the structured mean rounding error from the activation and weight gradients while leaving the optimizer unchanged. In LLM pre-training experiments, uncorrected threshold sharing degrades convergence, whereas S3R-EC eliminates this degradation and matches the validation loss of independent SR. Furthermore, S3R-EC accelerates full INT8 training steps of dense LLMs on TPU v5p by 1.24x to 1.32x over BF16 and by 1.11x over independent SR.

## 원문 인용

Zeyu Wang, Yiheng Duan, Tao Chen, Donghyun Koo, Sihan Liu, Wenbo Zhang, Chuan He, Liang Liu (2026). Efficient Quantization Training with Stochastic Rounding via Structured Subspace Randomness. arXiv:2610.36587v1. https://arxiv.org/abs/2610.36587v1

**BibTeX**

```
@misc{wang2026efficient,
  title = {{Efficient Quantization Training with Stochastic Rounding via Structured Subspace Randomness}},
  author = {Zeyu Wang and Yiheng Duan and Tao Chen and Donghyun Koo and Sihan Liu and Wenbo Zhang and Chuan He and Liang Liu},
  year = {2026},
  eprint = {2610.36587},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.36587v1}
}
```

## 이 논문의 용어

- [AdamW](https://refivu.com/terms/3228299bf379-adamw)
- [C4](https://refivu.com/terms/87725552ed79-c4)
- [Mixture-of-Experts](https://refivu.com/terms/2e4496944f4c-mixture-of-experts)
- [validation loss](https://refivu.com/terms/3fadf1366c80-validation-loss)
- [Proposition 2](https://refivu.com/terms/fddaec7b2e7a-proposition-2)
- [Qwen3-30B-A3B](https://refivu.com/terms/23b7b0cc48f6-qwen3-30b-a3b)
- [Corollary 1](https://refivu.com/terms/1f6a2f98a6b9-corollary-1)
- [stochastic rounding](https://refivu.com/terms/ea7f99517191-stochastic-rounding)
- [control variate](https://refivu.com/terms/f83f7e8c3378-control-variate)
- [DeepSeek-V2-Lite](https://refivu.com/terms/88b79fa27e82-deepseek-v2-lite)

## 다른 논문 해설

- [Optimal Regret for Communication-Efficient Decentralized Online Learning](https://refivu.com/papers/0a7cc72f-1a1d-4a04-921a-f0715cb84e1c-optimal-regret-for-communication-efficient-decentralized.md)
- [Addressing Imbalanced Domain-Incremental Learning through Dual-Balance Collaborative Experts](https://refivu.com/papers/67007668-b220-4a2a-94e9-d2cb4c1d6646-addressing-imbalanced-domain-incremental-learning-through.md)
- [Sparse Causal Discovery with Generative Intervention for Unsupervised Graph Domain Adaptation](https://refivu.com/papers/d8a2312a-d929-4f6e-9670-27e7b383b111-sparse-causal-discovery-with-generative-intervention-for.md)
- [Improving Transformer World Models for Data-Efficient RL](https://refivu.com/papers/bf0a569b-7476-4cd0-91b8-a28e0935c805-improving-transformer-world-models-for-data-efficient-rl.md)
- [Beyond Self-Repellent Kernels: History-Driven Target Towards Efficient Nonlinear MCMC on General Graphs](https://refivu.com/papers/d16c4679-29d3-4e63-a1e7-44b911331f3f-beyond-self-repellent-kernels-history-driven-target-towards.md)
- [Lightweight Online Adaption for Time Series Foundation Model Forecasts](https://refivu.com/papers/c00f0a05-872f-48a7-b6ca-19b0ce066ed1-lightweight-online-adaption-for-time-series-foundation-model.md)
- [CASEL: Consequence-Aware Selective Execution for Reliable Long-Horizon Tool-Using Agents](https://refivu.com/papers/f4fa59b0-5b55-4c7e-820d-3967901b7969-casel-consequence-aware-selective-execution-for-reliable.md)
- [Identity or Evidence? Auditing Evidence Dependence in Agentic Life-Science Benchmarks](https://refivu.com/papers/692f40ea-7124-41e5-834a-8c5d6466cf20-identity-or-evidence-auditing-evidence-dependence-in-agentic.md)
- [Causal Localization of Evidence Effects in Transformers](https://refivu.com/papers/f96b5a12-0c53-49d2-8d6f-292224474229-causal-localization-of-evidence-effects-in-transformers.md)
- [Do We Need an LLM to Know Why Sources Conflict? Decision Models for Knowledge-Conflict Typing in RAG](https://refivu.com/papers/bc8c66ac-7198-48c3-981e-48e9519fd03c-do-we-need-an-llm-to-know-why.md)
- [Forget the Data, Keep the Capability: Switchable Unlearning for Retrieval](https://refivu.com/papers/9888943b-1ac0-4684-9f27-2cb66c2bf5f6-forget-the-data-keep-the-capability-switchable-unlearning.md)
- [LLM knowledge for improved Out-of-Distribution Tabular Prediction - A Cross-Validated Regularisation Approach](https://refivu.com/papers/8091b095-825b-455d-8191-b6b34cfb2d10-llm-knowledge-for-improved-out-of-distribution-tabular.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/dd1ff416-5a97-4796-abca-ffb646fab63f-efficient-quantization-training-with-stochastic-rounding-via)
