# Oscillation-Reduced MXFP4 Training for Vision Transformers

비전 트랜스포머를 위한 진동 감소 MXFP4 학습

Chen, Yuxiang, Xi, Haocheng, Zhu, Jun, Chen, Jianfei · arXiv · 2025년 2월 28일

- **연구 문제** MXFP4 pre-training은 속도 이점이 크지만 정확도 저하가 커서, 저하 원인과 이를 줄이는 학습 방법이 필요합니다.
- **연구 방법** TetraJet은 모든 선형 계층 텐서를 MXFP4로 양자화하고, Q-EMA와 Q-Ramping으로 가중치 진동을 줄입니다.
- **주요 결과** DeiT-T 기준 TetraJet은 Microscaling 기준선보다 Top-1 Accuracy가 높았고(59.75 대 58.56), Q-EMA와 Q-Ramping을 더하면 추가로 향상되었습니다(60.00, 60.31).

## MXFP4 pre-training의 정확도 저하

MXFP4는 32개 원소 그룹마다 스케일링 인자를 공유하는 Microscaling 데이터 형식의 4비트 부동소수점 형식이며, NVIDIA Blackwell 계열에서 지원됩니다. 그러나 원문은 기존 Microscaling 학습 방법이 활성화와 기울기에 MXFP6를 사용하여 FP8 학습만큼 느리고, 순수 MXFP4 학습은 상당한 정확도 저하를 보인다고 지적합니다. 이 논문은 Vision Transformer pre-training을 대상으로 이 저하의 원인을 각 양자화기별로 분해하고, 이를 줄이는 학습 방법을 제안합니다.

![Table 1: Impact analysis on MXFP4 quantizers. We report the top-1 Acc.% after 90-epoch pre-training. Qi means we only activate the i-th quantizer Q(i)](https://refivu.com/papers/6c4185e8-d6ea-457d-92d9-b2402cacc8ac/figures/figure-f4ca2788b866c32c59f8803b2f1ccac7.png?thumb=512)

**Table 1** : Impact analysis on MXFP4 quantizers. We report the top-1 Acc.% after 90-epoch pre-training. Qi means we only activate the i-th quantizer Q(i) .

[원문](https://arxiv.org/abs/2502.20853v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Chen, Yuxiang, Xi, Haocheng, Zhu, Jun, Chen, Jianfei · Oscillation-Reduced MXFP4 Training for Vision Transformers · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.

## TetraJet 선형 계층과 truncation-free 스케일링

TetraJet은 선형 계층의 가중치, 활성화, 기울기 텐서를 모두 MXFP4로 양자화하여 순전파와 역전파의 행렬곱을 수행합니다. 스케일링 인자는 Microscaling처럼 floor를 쓰지 않고 ceiling을 사용하여, 원문 예시에서 M=31일 때 M/S가 표현 범위를 넘어 잘리지 않도록 조정합니다. 순전파는 최근접 반올림을, 기울기 계산은 stochastic rounding을 사용하며, 이중 양자화를 통해 MXFP4가 요구하는 1×32와 32×1 블록 방향을 함께 만족시킵니다.

![Figure 1: Visualization of MXFP4 Linear Layer](https://refivu.com/papers/6c4185e8-d6ea-457d-92d9-b2402cacc8ac/figures/figure-31e2a595b8d5efe0d389437310428bb8.png?thumb=512)

**Figure 1** : Visualization of MXFP4 Linear Layer.

[원문](https://arxiv.org/abs/2502.20853v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Chen, Yuxiang, Xi, Haocheng, Zhu, Jun, Chen, Jianfei · Oscillation-Reduced MXFP4 Training for Vision Transformers · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.

## 진동 현상의 진단과 두 가지 완화 방법

저자들은 MXFP4 학습에서 마스터 가중치가 양자화 경계 근처에서 반복적으로 흔들려 양자화 값이 q1과 q2 사이를 오가는 가중치 진동을 순전파 불안정성의 주요 원인으로 제시합니다. 이를 진단하기 위해 oscillation ratio는 마스터 가중치 이동 거리 대비 양자화 가중치 이동 거리를, quantization confidence는 양자화 임계값으로부터의 정규화된 거리를 사용합니다. Q-EMA는 가중치의 지수 이동 평균과 비교해 두 후보 중 하나를 고르고, Q-Ramping은 진동 가중치를 식별한 뒤 gradient accumulation 단계를 키워 갱신 빈도를 낮춥니다.

![Figure 4: The change of latent weight and quantization con- fidence during 90-epoch pre-training of DeiT-Tiny. The top plot shows the distribution of latent we…](https://refivu.com/papers/6c4185e8-d6ea-457d-92d9-b2402cacc8ac/figures/figure-1c2f578039a56f2b05447a28f35612cb.png?thumb=512)

**Figure 4** : The change of latent weight and quantization con- fidence during 90-epoch pre-training of DeiT-Tiny. The top plot shows the distribution of latent weight, and the bottom plot shows the distribution of quantization confidence.

[원문](https://arxiv.org/abs/2502.20853v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Chen, Yuxiang, Xi, Haocheng, Zhu, Jun, Chen, Jianfei · Oscillation-Reduced MXFP4 Training for Vision Transformers · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

![Figure 6: Q-EMA & Q-Ramping’s effect on oscillatingweights reduction during the whole training process. We present the 90-epoch pre-training of DeiT-T](https://refivu.com/papers/6c4185e8-d6ea-457d-92d9-b2402cacc8ac/figures/figure-59657146d466c1e2d5c998a08fc132af.png?thumb=512)

**Figure 6** : Q-EMA & Q-Ramping’s effect on oscillatingweights reduction during the whole training process. We present the 90-epoch pre-training of DeiT-T.

[원문](https://arxiv.org/abs/2502.20853v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Chen, Yuxiang, Xi, Haocheng, Zhu, Jun, Chen, Jianfei · Oscillation-Reduced MXFP4 Training for Vision Transformers · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

![Table 3: Effect of Q-EMA & Q-Ramping on stabilizing weight and activation at the end of DeiT-T training. r(·) refers to the rate of change for tensors,WQ is th…](https://refivu.com/papers/6c4185e8-d6ea-457d-92d9-b2402cacc8ac/figures/figure-74bf390c361cc204ca938fcdb2f4992e.png?thumb=512)

**Table 3** : Effect of Q-EMA & Q-Ramping on stabilizing weight and activation at the end of DeiT-T training. r(·) refers to the rate of change for tensors,WQ is the quantized weights, and Y is the output of 9th transformer block given fixed input.

[원문](https://arxiv.org/abs/2502.20853v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Chen, Yuxiang, Xi, Haocheng, Zhu, Jun, Chen, Jianfei · Oscillation-Reduced MXFP4 Training for Vision Transformers · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

![Table 4: Comparison of our oscillation reduction methods with other methods for DeiT MXFP4-Pretraining on Ima- geNet Classification. We report the top-1 Acc.%…](https://refivu.com/papers/6c4185e8-d6ea-457d-92d9-b2402cacc8ac/figures/figure-6c5b7b30b0b0ee1576323e966d34dda3.png?thumb=512)

**Table 4** : Comparison of our oscillation reduction methods with other methods for DeiT MXFP4-Pretraining on Ima- geNet Classification. We report the top-1 Acc.% of the final model.

[원문](https://arxiv.org/abs/2502.20853v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Chen, Yuxiang, Xi, Haocheng, Zhu, Jun, Chen, Jianfei · Oscillation-Reduced MXFP4 Training for Vision Transformers · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

## DeiT와 Swin pre-training 비교 결과

ImageNet1K에서 90 epoch 사전학습한 DeiT-T의 Top-1 Accuracy는 TetraJet이 59.75, Microscaling 기준선이 58.56이고, TetraJet에 Q-EMA를 더하면 60.00, Q-Ramping을 더하면 60.31입니다. 원문은 이 세 결과를 같은 DeiT-T 설정의 표 2에서 보고하며, 다른 모델의 결과도 같은 표에 함께 있습니다. 따라서 이 개선 폭은 원문이 보고한 DeiT-T 조건에서 읽어야 합니다.

![Table 2: Results on the 90-epoch pretraining of Vision Transformers. We report the Top-1 Accuracy% on validation dataset](https://refivu.com/papers/6c4185e8-d6ea-457d-92d9-b2402cacc8ac/figures/figure-0789a5866e4ffcc287ec50fb746a1297.png?thumb=512)

**Table 2** : Results on the 90-epoch pretraining of Vision Transformers. We report the Top-1 Accuracy% on validation dataset.

[원문](https://arxiv.org/abs/2502.20853v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Chen, Yuxiang, Xi, Haocheng, Zhu, Jun, Chen, Jianfei · Oscillation-Reduced MXFP4 Training for Vision Transformers · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

![Table 5: Comparison on quantization methods. We report the accuracy on the validation set of 90-epoch DeiT-T pre-training](https://refivu.com/papers/6c4185e8-d6ea-457d-92d9-b2402cacc8ac/figures/figure-a2b2817541b0321e8a7e86eb1bfb402d.png?thumb=512)

**Table 5** : Comparison on quantization methods. We report the accuracy on the validation set of 90-epoch DeiT-T pre-training.

[원문](https://arxiv.org/abs/2502.20853v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Chen, Yuxiang, Xi, Haocheng, Zhu, Jun, Chen, Jianfei · Oscillation-Reduced MXFP4 Training for Vision Transformers · 원문 그림 인용 · 원본 PDF 13쪽에서 그림 영역을 추출했습니다.

## 적용 범위와 결합의 한계

원문은 Q-EMA를 사용하면 두 변수 W와 WEMA가 양자화 결과를 함께 결정하므로 진동 가중치를 식별하고 추적하기가 더 복잡해진다고 설명하며, 두 방법을 단순 결합하는 것은 적절하지 않다고 밝힙니다. 실험은 Vision Transformer와 ImageNet1K pre-training에 한정되며, 다른 모델이나 데이터셋에 대한 결과는 이 논문에서 다루지 않습니다.

## 논문 정보

- **저자**: Chen, Yuxiang, Xi, Haocheng, Zhu, Jun, Chen, Jianfei
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2025년 2월 28일
- **등록일**: 2026년 10월 29일
- **수정일**: 2025년 7월 9일
- **버전**: v2
- **arXiv**: 2502.20853
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

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

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

## 초록

Pre-training Transformers in FP4 precision is becoming a promising approach to gain substantial speedup, but it comes with a considerable loss of accuracy. Microscaling (MX) data format provides a fine-grained per-group quantization method to improve the representation ability of the FP4 format and is supported by the next-generation Blackwell GPU architecture. However, training with MXFP4 data format still results in significant degradation and there is a lack of systematic research on the reason. In this work, we propose a novel training method TetraJet for a more accurate FP4 training. We comprehensively evaluate all of the quantizers involved in the training, and identify the weight oscillation problem in the forward pass as the main source of the degradation in MXFP4 training. Therefore, we introduce two novel methods, EMA Quantizer (Q-EMA) and Adaptive Ramping Optimizer (Q-Ramping), to resolve the oscillation problem. Extensive experiments on Vision Transformers demonstrate that TetraJet consistently outperforms the existing 4-bit training methods, and Q-EMA & Q-Ramping can provide additional enhancement by effectively reducing oscillation. We decreased the accuracy degradation by more than $50\\%$ compared to the baseline, and can even achieve competitive performance compared to full precision training. The codes are available at https://github.com/thu-ml/TetraJet-MXFP4Training

## 원문 인용

Chen, Yuxiang, Xi, Haocheng, Zhu, Jun, Chen, Jianfei (2025). Oscillation-Reduced MXFP4 Training for Vision Transformers. arXiv:2502.20853v2. https://arxiv.org/abs/2502.20853v2

**BibTeX**

```
@misc{yuxiang2025oscillation,
  title = {{Oscillation-Reduced MXFP4 Training for Vision Transformers}},
  author = {Chen, Yuxiang and Xi, Haocheng and Zhu, Jun and Chen, Jianfei},
  year = {2025},
  eprint = {2502.20853},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.20853v2}
}
```

## 이 논문의 용어

- [Top-1 Accuracy](https://refivu.com/terms/653c0b9eaa58-top-1-accuracy)
- [ImageNet1K](https://refivu.com/terms/8cfcb134f1ea-imagenet1k)
- [MXFP4](https://refivu.com/terms/0e807947caf5-mxfp4)
- [stochastic rounding](https://refivu.com/terms/ea7f99517191-stochastic-rounding)
- [Double Quantization](https://refivu.com/terms/2fa6e87e1cac-double-quantization)
- [E2M1](https://refivu.com/terms/60bbae49ef1a-e2m1)
- [Dampen](https://refivu.com/terms/df3799ec9540-dampen)
- [Freeze](https://refivu.com/terms/91a9991ca2ae-freeze)
- [weight oscillation](https://refivu.com/terms/1fdca90b2d9d-weight-oscillation)

## 다른 논문 해설

- [Field Matching: an Electrostatic Paradigm to Generate and Transfer Data](https://refivu.com/papers/e2b68152-3fe1-42d9-9c69-d4a171d6d98a-field-matching-an-electrostatic-paradigm-to-generate-and.md)
- [Harnessing Reasoning Trajectories for Hallucination Detection via Answer-agreement Representation Shaping](https://refivu.com/papers/c696c09b-a923-450b-84c9-4ed941acdded-harnessing-reasoning-trajectories-for-hallucination.md)
- [Beyond Vision-Language Models: Visual-Semantic Affect Graphs for Emotion Recognition in Artworks](https://refivu.com/papers/f68beda4-7f73-4e65-befa-e7c525cf6e6d-beyond-vision-language-models-visual-semantic-affect-graphs.md)
- [Beyond the Timeline: Augmenting Long-Video Memory with Grounded Entity Biographies](https://refivu.com/papers/84056291-c078-4eb3-b655-ba939da0557e-beyond-the-timeline-augmenting-long-video-memory-with.md)
- [Image-to-Image Translation with Conditional Adversarial Networks](https://refivu.com/papers/92d09be2-7a1b-4f53-9d24-569d7cc94149-image-to-image-translation-with-conditional-adversarial.md)
- [What Makes World Action Models Generalize? An Empirical Study of Test-Time Future Modeling](https://refivu.com/papers/d55815ae-6f4a-431f-b6c2-ee38540c883a-what-makes-world-action-models-generalize-an-empirical.md)
- [Open Materials Generation with Stochastic Interpolants](https://refivu.com/papers/8d5533d2-d4cb-4d87-9bf6-440cd9d3d4d7-open-materials-generation-with-stochastic-interpolants.md)
- [ESPFormer: Doubly-Stochastic Attention with Expected Sliced Transport Plans](https://refivu.com/papers/a1464a35-3450-4660-9922-86a321dc3d18-espformer-doubly-stochastic-attention-with-expected-sliced.md)
- [Graph World Model](https://refivu.com/papers/4e037635-f216-4445-ae2e-f2eebc43ac9a-graph-world-model.md)
- [LaCache: Ladder-Shaped KV Caching for Efficient Long-Context Modeling of Large Language Models](https://refivu.com/papers/ab877a62-577c-4a9d-a2f5-5b6f0f04d0cb-lacache-ladder-shaped-kv-caching-for-efficient-long.md)
- [GenMol: A Drug Discovery Generalist with Discrete Diffusion](https://refivu.com/papers/9dd1a77c-1134-4a20-acbe-b4b60c051aff-genmol-a-drug-discovery-generalist-with-discrete-diffusion.md)
- [Continual Generalized Category Discovery: Learning and Forgetting from a Bayesian Perspective](https://refivu.com/papers/8b07e0fa-382b-401b-a813-83f29a7bf339-continual-generalized-category-discovery-learning-and.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/6c4185e8-d6ea-457d-92d9-b2402cacc8ac-oscillation-reduced-mxfp4-training-for-vision-transformers)
