text-generation masked-diffusion-models auto-regressive-models token-diversity floating-point-precision generative-perplexity time-agnostic first-hitting-sampler
Abstract
Masked diffusion models (MDMs) have emerged as a popular research topic for generative modeling of discrete data, thanks to their superior performance over other discrete diffusion models, and are rivaling the auto-regressive models (ARMs) for language modeling tasks. The recent effort in simplifying the masked diffusion framework further leads to alignment with continuous-space diffusion models and more principled training and sampling recipes. In this paper, however, we reveal that both training and sampling of MDMs are theoretically free from the time variable, arguably the key signature of diffusion models, and are instead equivalent to masked models. The connection on the sampling aspect is drawn by our proposed first-hitting sampler (FHS). Specifically, we show that the FHS is theoretically equivalent to MDMs' original generation process while significantly alleviating the time-consuming categorical sampling and achieving a 20$\times$ speedup. In addition, our investigation raises doubts about whether MDMs can truly beat ARMs in text generation. We identify, for the first time, an underlying numerical issue, even with the commonly used 32-bit floating-point precision, which results in inaccurate categorical sampling. We show that it lowers the effective temperature both theoretically and empirically, and the resulting decrease in token diversity makes previous evaluations, which assess the generation quality solely through the incomplete generative perplexity metric, somewhat unfair.
한국어 요약
한 줄 요약
마스킹된 확산 모델(MDMs)은 시간 변수와 무관한 마스킹 모델과 동등하며, 범주형 샘플링의 수치적 불안정성으로 인해 성능 평가가 왜곡될 수 있음.
핵심 기여도
- MDMs의 학습 목적은 마스킹 모델과 동등하며, 시간 변수 추가는 실질적 이익이 없음.
- 제안된 First-Hitting Sampler(FHS)는 MDMs의 생성 과정과 이론적으로 동등하면서 20× 가속.
- 32-bit 부동소수점 정밀도에서도 범주형 샘플링 불안정성 발견, 이로 인해 토큰 다양성 감소 및 평가 왜곡.
- MDMs는 ARMs 대비 텍스트 생성에서 진정한 우월성 없음.
핵심 아이디어
MDMs은 확산 모델의 시간 기반 프레임워크를 따르지만, 학습 및 샘플링 과정에서 시간 변수가 실질적으로 무시되는 것으로 밝혀졌다. 이는 MDMs이 사실상 마스킹 모델과 동등하다는 의미이다. 또한, 기존 샘플링 방식은 범주형 확률 분포를 정확히 추정하지 못하며, 이는 토큰 다양성을 낮추고 평가 지표인 generative perplexity를 왜곡한다. 이 연구는 MDMs의 복잡성과 불안정성 대신, 단순한 마스킹 모델이 더 실용적임을 강조한다.
기술적 접근법
- **MDMs 학습 목적**: 마스킹 모델과 동일한 likelihood-based loss를 사용하며, 시간 변수는 실질적 기여 없음.
- **First-Hitting Sampler (FHS)**: MDMs의 샘플링 과정과 이론적으로 동등하면서 20× 가속.
- **Numerical Issue**: 32-bit 부동소수점 정밀도에서도 발생하는 범주형 샘플링 오류로 인해 effective temperature가 낮아짐.
- **KV Caching 불호환**: MDMs는 양방향 어텐션 구조로 인해 KV 캐싱 기법과 호환되지 않아 추론 효율성 저하.
주요 결과
- MDMs의 샘플링 과정은 FHS로 20× 가속됨.
- MDMs는 ARMs 대비 텍스트 생성에서 generative perplexity 기준으로 우월하다고 주장되었으나, 이는 샘플링 과정의 수치적 오류로 인한 평가 왜곡임.
- 토큰 다양성이 낮아져 평가 지표가 부정확함.
의의 및 한계
이 연구는 MDMs의 이론적 기반과 샘플링 과정의 수치적 문제를 명확히 밝혀내어, 기존 연구의 한계를 드러냈다. MDMs는 마스킹 모델과 동일한 성능을 제공하지만, 복잡성과 불안정성으로 인해 실용적 가치가 제한적이다. 또한, 텍스트 생성에서는 ARMs가 자연스러운 순차적 구조를 모델링하는 데 더 적합하다는 점도 지적된다. 한계로는 텍스트 데이터에만 초점을 맞춘 분석이며, 다른 이산 데이터에 대한 일반화 가능성은 명시되지 않음.
실용적 활용
MDMs은 순서와 무관한 데이터 구조가 핵심인 분야(예: 이미지, 비정형 텍스트)에서 활용 가능하나, 텍스트 생성에서는 ARMs 대비 효율성과 안정성에서 열세이다. 따라서, MDMs 대신 단순한 마스킹 모델이 더 실용적일 수 있으며, 대규모 언어 모델 개발에서는 KV 캐싱과 같은 기술적 인프라가 필수적임.