Beyond Autoregression: Diffusion Language Model is All Analog In-Memory Computing Need
Authors: Yuanuo Feng, Yubing Ye, Yizhe Chen, Wenshuai Yao, Ngai Wong, Wenyong Zhou, Wang Kang
Organizations: School of Integrated Circuit Science and Engineering, Beihang University, Beijing, China · Faculty of Engineering, The University of Hong Kong, Hong Kong · School of Integrated Circuits, Peking University, Beijing, China
Analog in-memory computing (AIMC) enables energy-efficient language-model inference, but hardware non-idealities perturb matrix--vector multiplications and degrade generation quality. Autoregressive (AR) models are especially vulnerable: each token is committed to the causal context at birth, so perturbation-induced errors cascade. We study diffusion language models (DLMs), which iteratively refine a masked sequence, as an alternative paradigm. Across scale-matched model pairs and open checkpoints, DLMs degrade more gracefully than AR counterparts under persistent weight perturbations. Controlled analyses rule out cross-round noise averaging and support delayed token commitment and progressive context resolution as the mechanism. A larger denoising-step budget further shrinks the clean--noisy gap, a DLM-specific latency--robustness knob. We perform large-scale simulation tests across diverse datasets and models using a noise model calibrated from real silicon measurements. Furthermore, on a 16-chip 28nm eFlash AIMC cluster, hybrid on-board measurements show DLMs tolerate 1.4--3× larger weight noise, making diffusion-based generation a promising paradigm for noise-resilient AIMC inference.
Figures & tables
Fig. 1: Comparison of two 8B-scale language models under weight perturbations. LLaDA-8B and Llama-3-8B share depth (32 layers), width (4096), and vocabulary size ( ≈ 128k).
Fig. 2: Commitment timing under weight noise: the reason behind the robust behavior in Fig. 1 , as identified by the controlled analyses in Sec. III-B and Sec. III-C . An AR decoder (top row) commits each token immediately at birth, so an early noise-induced flip ( water → wine ) enters the causal context and cascades through subsequent predictions. A masked DLM (bottom rows) commits confident positions first and keeps uncertain positions masked or revisable; as more context is resolved, the prediction margin at the critical position recovers and the flip is blocked.
Fig. 3: Robustness of open DLM checkpoints on PIQA under weight perturbations. Left: accuracy as a function of perturbation strength σ . Right: accuracy differences at σ=0.2 , decomposed into differences already present under clean weights and the additional degradation induced by perturbations.
Fig. 4: Controlled comparison between matched AR and MDLM models under weight perturbations. Left: relative validation-loss increase as a function of perturbation strength σ . Right: the excess relative loss increase of the AR model over the MDLM model.
Fig. 5: Effect of perturbation scheduling during DLM generation. In the shared-noise condition, one weight perturbation is retained across all denoising rounds; in the resampled-noise condition, perturbations are independently redrawn at each round. Left: forced-token margin across commitment rounds. Right: generation accuracy across commitment rounds.
Fig. 6: GSM8K accuracy under different diffusion-step budgets K and weight perturbation strengths σ . Increasing the denoising budget reduces the clean–noisy performance gap.
Fig. 7: Resolved-context analysis under weight perturbations. Left: reference-token log-probability margin as a function of the resolved-context fraction. Right: the margin shift induced by weight perturbations relative to the clean condition ( σ=0 ).
Fig. 8: The 28nm eFlash-based AIMC prototype. (a) AIMC die with four cores, each integrating weight-stationary arrays with DAC and ADC/PGA peripherals. (b) Logic die layout integrating PCIe/DDR, video, management, and MPU/NoC subsystems. (c) TEM cross-section of the hybrid-bonded 3D stack (12nm logic die, TSV layer, and 28nm eFlash die). (d) Assembled single-card prototype.
Fig. 9: Model deployment on the AIMC cluster. (a) Linear layers as mapping targets. (b) Array-block tiling and remapping around defective columns. (c) Cluster database for layer-to-board routing. (d) Sixteen-chip cluster with an NVLink-like AIMC link and PCIe host.
Fig. 10: Weight-perturbation model calibrated against measured on-chip MVM errors (KL =0.003 ), versus an uncalibrated Gaussian (KL =0.246 ).
Fig. 11: Calibrated weight-noise sweep on an 8 × L20 GPU server. Rows sweep σ∈{0,0.1,0.2,0.3} ; bars report two DLMs (LLaDA-8B, Dream-7B), two AR models (Qwen2.5-7B, Llama-3.1-8B), and group means. Δ : DLM-mean advantage, reaching +0.20 – +0.45 at σ=0.3 on all eight benchmarks.
Scale
Model
Quality
Δrel
Max σeff
Digital
On-chip
45M
AR
3.412
3.451
+1.14%
0.19
MDLM
3.465
3.494
+0.84%
0.27
125M
AR
3.183
3.207
+0.75%
0.28
MDLM
3.236
3.242
+0.19%
0.58
8B (open)
Llama-3
0.748
0.512
−31.6%
0.03
TABLE I: Hybrid quality at σeff=0.15 (DLMs: 256 steps). Attention/FFN MVMs: AIMC; other computation: digital. 45M/125M: loss ( ↓ ); 8B: GSM8K accuracy ( ↑ ). Max σeff : provisional 2% relative-loss thresholds
Model
Steps
Quality
Cost / gen.
Digital
On-chip
Δrel
Lat. (s)
Energy (mJ)
LLaDA-8B
64
0.381
0.227
−40.4%
0.73
410
128
0.642
0.503
−21.7%
1.42
801
256
0.702
0.628
−10.5%
2.81
1590
512
0.741
0.712
−3.9%
5.58
3150
MDLM-125M
32
3.251
3.297
+1.42%
0.06
28
TABLE II: Step–quality–cost trade-off at σeff=0.15 , with metrics and hybrid boundary as in Table I .
Diffusion language models promise parallel generation, yet still lag behind autoregressive (AR) models in quality. We stem this gap to a failure of introspective consistency: AR models agree with their own generations, while DLMs often do not. We define the introspective acceptance rate, which measures whether a model accepts its previously generated tokens. This reveals why AR training has a structural advantage: causal masking and logit shifting implicitly enforce introspective consistency. Motivated by this observation, we introduce Introspective Diffusion Language Model (I-DLM), a paradigm that retains diffusion-style parallel decoding while inheriting the introspective consistency of AR training. I-DLM uses a novel introspective strided decoding (ISD) algorithm, which enables the model to verify previously generated tokens while advancing new ones in the same forward pass. From a systems standpoint, we build I-DLM inference engine on AR-inherited optimizations and further customize it with a stationary-batch scheduler. To the best of our knowledge, I-DLM is the first DLM to match the quality of its same-scale AR counterpart while outperforming prior DLMs in both model quality and practical serving efficiency across 15 benchmarks. It reaches 69.6 on AIME-24 and 45.7 on LiveCodeBench-v6, exceeding LLaDA-2.1-mini (16B) by more than 26 and 15 points, respectively. Beyond quality, I-DLM is designed for the growing demand of large-concurrency serving, delivering about 3x higher throughput than prior state-of-the-art DLMs.
Yifan Yu, Yuqing Jian, Junxiong Wang +12
Together AI · University of Illinois Urbana-Champaign · Princeton University +2
We present a controlled empirical comparison between autoregressive (AR) and masked diffusion (MDLM) language models. Both models are trained on identical data (50M tokens from TinyStories), identical compute budget (20,000 steps, batch size 32, sequence length 512), and identical hardware (NVIDIA H100 80GB), isolating the generation paradigm as the sole variable. We report three findings. First, both paradigms achieve comparable training throughput (~50K tokens/second), with MDLM requiring only 4.7% more wall-clock time. Second, AR converges faster and begins overfitting by step 14,000, while MDLM converges more slowly and is still improving at step 20,000, suggesting different compute-optimal training regimes. Third, quantitative diversity analysis over 1,000 generated samples reveals a structural diversity-fluency trade-off: AR produces fluent but repetitive outputs (99.8% begin with the same word), while MDLM generates more diverse narratives (93.4% unique 5-word openings, higher Distinct-n, lower Self-BLEU), at the cost of occasional grammatical inconsistencies. All code, trained checkpoints, and data pipelines are released for reproducibility.
Diffusion language models (DLMs) enable fast generation by predicting multiple tokens in parallel, but their practical adoption remains limited by a persistent quality gap relative to comparably sized autoregressive (AR) models. We attribute this gap to a computation-difficulty mismatch: within a partially observed sequence, some unknown tokens are easy to predict, while others require substantially more computation. Existing DLMs nevertheless apply uniform computational depth to all unknown positions at each denoising step. We introduce ALoDLM, which replaces uniform computation with token-adaptive latent recurrence. At each denoising step, ALoDLM iteratively refines latent representations and allocates computation according to token difficulty. Tokens ready to commit are fed back as discrete context, while unresolved tokens retain and further refine their latent states through additional recurrent passes. To learn token prediction and computation allocation jointly, we formulate token-wise computation schedules as latent variables and derive a conditional negative evidence lower bound (NELBO). We train ALoDLM at 1.7B and 8B parameter scales. Across eleven benchmarks, ALoDLM outperforms all evaluated DLMs and the corresponding AR baselines in average benchmark score at both scales. ALoDLM also retains fast parallel decoding, yielding a strong quality-efficiency trade-off among evaluated autoregressive and diffusion models under optimized inference engines.
Liancheng Fang, Zhuowei Li, Youngeun Kim +10
University of Illinois Chicago · Amazon AGI · Korea University