MADI: Masking-Augmented Diffusion Scaling
- The paper introduces a framework that integrates masking during training with extra computation at inference to boost controllability and fidelity.
- Visual MADI leverages pause tokens for extended prompt context, while language MADI employs masked diffusion paired with verifier-guided candidate selection.
- Empirical evaluations show notable improvements, including enhanced CLIP-DIR metrics in image editing and up to +2.8 BLEU gains in text style transfer.
Searching arXiv for MADI and closely related diffusion/inference-time scaling papers. Masking-Augmented Diffusion with Inference-Time Scaling (MADI) denotes a family of diffusion-based methods that combine masking-based training with extra inference-time computation to improve controllability, fidelity, or quality. In 2025, the acronym was used in two closely related but domain-specific settings: a visual-editing framework that couples Masking-Augmented Gaussian Diffusion (MAgD) with inference-time Pause Tokens for grounded image editing (Kadambi et al., 16 Jul 2025), and a text-style-transfer framework built on masked diffusion LLMs (MDMs) with seq2seq masking augmentation and verifier-based inference-time scaling during denoising (Padole et al., 14 Aug 2025). Across both usages, the common design pattern is to expose the model to structured missingness during training and then exploit the iterative nature of diffusion at inference to allocate additional compute in a targeted manner.
1. Scope, nomenclature, and shared design pattern
The label MADI is not a single canonical algorithm. In the visual-editing literature, MADI names a framework for controllable image editing based on diffusion training with a dual corruption process and inference-time prompt expansion through Pause Tokens (Kadambi et al., 16 Jul 2025). In the language-modeling literature, MADI refers to masked diffusion LLMs with inference-time scaling for text style transfer, where the scaling mechanism is a verifier-guided candidate search layered on top of the reverse diffusion process (Padole et al., 14 Aug 2025).
Despite the difference in modality, the two formulations share a structural template. First, masking is introduced as an auxiliary corruption or augmentation mechanism during training. Second, inference-time quality is improved by spending additional computation during sampling rather than retraining a larger model. In the visual case, the extra compute is realized through longer prompt context induced by repeated special tokens. In the language case, it is realized through classifier-free guidance (CFG), more denoising steps, and soft-value diffusion decoding (SVDD) over multiple sampled candidates.
| Variant | Training-side masking | Inference-time scaling |
|---|---|---|
| Visual MADI | MAgD with masked noisy image inputs | Pause Tokens inserted into the prompt |
| Language MADI | Target-side masking during seq2seq MDM fine-tuning | CFG and SVDD candidate selection |
A common misconception is that inference-time scaling in MADI always means increasing the number of denoising steps. The two 2025 uses of the term show otherwise: visual MADI scales conditional computation through prompt-side capacity, whereas language MADI scales through guided search over denoising candidates (Kadambi et al., 16 Jul 2025).
2. Visual MADI: Masking-Augmented Gaussian Diffusion
The visual-editing formulation of MADI is centered on Masking-Augmented Gaussian Diffusion (MAgD), a training strategy that overlays masking onto a standard DDPM-style forward process. For a clean image , the standard Gaussian corruption is
or equivalently
After sampling , MAgD applies a random spatial mask with masking rate , producing
where is either the zero-tensor or a learned mask token embedding (Kadambi et al., 16 Jul 2025).
Training alternates between conventional denoising score matching and a masked-denoising variant. With , the masked loss is used when and 0:
1
otherwise the usual DSM objective is applied:
2
The resulting per-step loss is
3
The intended effect of masking noisy inputs at high-noise timesteps is explicitly described as improved locality, compositionality, and vision-language grounding. Because the model must predict noise when part of the noisy image is absent, it is trained to rely on contextual and semantic cues rather than only on dense local evidence (Kadambi et al., 16 Jul 2025). This suggests that the method is not merely a robustness regularizer; it also functions as a representation-shaping mechanism for localized editing.
The reported implementation uses an OmniGen transformer with causal attention over interleaved image and text tokens. The mask token embedding is produced by a small two-layer MLP mapping a mask identifier to a 256-dim vector, with a pool of 1024 learnable mask embeddings. Training uses AdamW with initial learning rate 4, cosine decay, 800-step linear warmup, batch size 128 on 5 A100 GPUs, total gradient steps 6, image resolution 7, diffusion timesteps 8, masking rate 9, masking probability 0, and noise-threshold 1; classifier-free guidance is trained with 2 prompt dropping (Kadambi et al., 16 Jul 2025).
3. Pause Tokens and inference-time capacity scaling in visual editing
The inference-time component of visual MADI is based on Pause Tokens, denoted 3. These are special placeholder tokens inserted only at inference time. Given an edit prompt 4 and optional reference image embedding 5, the paused prompt is
6
with the pause token repeated 7 times (Kadambi et al., 16 Jul 2025).
The sampling loop is otherwise standard: initialize 8, run the pretrained MAgD-finetuned model 9 over 0, and decode 1. The key claim is that increasing 2 grows prompt length, so cross-attention and self-attention attend over more tokens, and each diffusion step allocates more computation to reasoning under the conditioning. No retraining is required; Pause Tokens are treated as extra context vectors (Kadambi et al., 16 Jul 2025).
This mechanism is qualitatively different from increasing the number of diffusion steps. The denoising schedule can remain unchanged while the conditional pathway becomes more expressive. In the reported workflow, candidate pause lengths 3 are evaluated, faithfulness is filtered by a DINO threshold, and the surviving candidate with maximal CLIP-DIR is selected. The examples provided include local edits such as “replace the net with a brick wall,” global edits such as “look like it is floating among white fluffy clouds,” and attribute edits such as “Change her hair color to white” (Kadambi et al., 16 Jul 2025).
The paper also reports that adopting expressive and dense prompts during training further enhances performance, particularly for MAgD. A plausible implication is that Pause Tokens are most effective when the model has already learned to extract structured conditioning signals from rich prompt contexts.
4. Language MADI: masked diffusion LLMs for text style transfer
The language formulation of MADI builds on masked diffusion LLMs operating directly on discrete token sequences. Let 4 be a length-5 sentence, and let 6 denote the special mask token. Continuous time is indexed by 7, with 8 as the mask retention probability. The forward process independently keeps or masks each token:
9
The joint corruption factorizes across positions, while the reverse process is defined through 0 for 1 and uses a neural denoiser 2 to approximate the intractable posterior 3 (Padole et al., 14 Aug 2025).
A simplified variational bound yields a continuous-time masked-language-modeling objective:
4
For seq2seq style transfer, fine-tuning uses an input concatenation
5
where 6 is the source sentence in style 7 and 8 is the target sentence in style 9. The forward masking process is applied only to the target half 0, leaving 1 intact. At each training step, 2 is sampled, 3 is set, and each target token is independently replaced by 4 with probability 5. The transformer denoiser 6 predicts the original target tokens at masked positions via cross-entropy. No explicit time embeddings are required, because the masking schedule is said to be known to the network implicitly by the fraction of masked tokens (Padole et al., 14 Aug 2025).
The denoiser is a 12-layer Transformer encoder with hidden size 768, 12 heads, FFN 3072, and approximately 167M total parameters. Optimization uses AdamW with 7, 8, 9, weight decay 0, 1K warmup steps, and inverse-square-root decay (Padole et al., 14 Aug 2025).
5. Verifier-based inference-time scaling in language MADI
The inference-time scaling mechanism in language MADI is soft-value diffusion decoding (SVDD), a derivative-free verifier-based procedure using an off-the-shelf sentence embedding model 1. For a candidate denoised sequence 2 at an intermediate step, the reward is defined as cosine similarity to the source sentence embedding:
3
The soft value at time 4 is approximated by
5
where 6 is sampled once to approximate the expectation (Padole et al., 14 Aug 2025).
At each reverse step from 7 to 8, the model computes the usual denoising kernel, draws 9 independent candidates, evaluates a soft value for each candidate, and keeps the maximizing candidate:
0
This is described as approximately sampling from a modified distribution
1
in a greedy, reward-maximizing fashion (Padole et al., 14 Aug 2025).
SVDD can be combined with classifier-free guidance. The conditional and unconditional logits are combined as
2
with reported CFG scale 3. The verifier uses the MPNet-base-v2 sentence-embedding model. Denoising steps are varied over 4 and candidate counts over 5, with 6 described as a good trade-off in practice (Padole et al., 14 Aug 2025).
The paper emphasizes that CFG and SVDD represent complementary inference-compute axes: “logit guidance” versus “verifier search.” It also states explicit trade-offs: SVDD adds a linear 7 cost per step, CFG sacrifices some diversity, and very large 8 or 9 can over-focus on style at the expense of fluency (Padole et al., 14 Aug 2025).
6. Empirical results, related methods, and interpretation
The visual and language MADI variants are evaluated on different tasks and with different success criteria, but both are presented as improving control without requiring a larger base model. In visual editing, benchmarks include Emu-Edit, MagicBrush, Complex-Edit, and IDEA-Bench, with metrics CLIP-I, DINO, CLIP-T, CLIP-DIR, and MLLM score. On Emu-Edit, the reported numbers are: OmniGen 0 CLIP-I, 1 DINO, 2 CLIP-DIR, and 3 MLLM; MAgD-no-scale 4, 5, 6, and 7; MAgD-with-scaling 8, 9, 0, and 1 (Kadambi et al., 16 Jul 2025). On Complex-Edit, OmniGen has MLLM aggregate 2, while MAgD reports 3; on IDEA-Bench, OmniGen reports 4 MLLM success rate and MAgD reports 5 (Kadambi et al., 16 Jul 2025).
In language style transfer, evaluation covers WikiLarge for complex-to-simple simplification using BLEU, SARI, and LENS, and Bible prose for PUB6BBE and PUB7ASV using BLEU, ROUGE-L, METEOR, and BERTScore. Fine-tuned MDM without guidance is reported to already match or slightly exceed autoregressive baselines in BLEU but to produce too-short outputs on WikiLarge. Adding CFG steadily improves BLEU, SARI, LENS, and Bible metrics, especially as 8 grows. Applying SVDD with 9 on top of CFG yields up to 00 BLEU on WikiLarge and 01 to 02 BLEU on Bible test sets. Ablations report that increasing 03 helps up to approximately 16 steps and then plateaus or slightly drops without CFG, while with CFG it scales robustly even to 64 steps; higher 04 helps up to approximately 05–06 and then plateaus or degrades; increasing 07 improves performance with diminishing returns after approximately 08 candidates (Padole et al., 14 Aug 2025).
| Setting | Reported result | Source |
|---|---|---|
| Emu-Edit | MAgD-with-scaling improves CLIP-DIR from 09 to 10 over OmniGen | (Kadambi et al., 16 Jul 2025) |
| Complex-Edit | MLLM aggregate rises from 11 to 12 | (Kadambi et al., 16 Jul 2025) |
| WikiLarge | CFG+SVDD yields up to 13 BLEU | (Padole et al., 14 Aug 2025) |
| Bible prose | CFG+SVDD yields 14 to 15 BLEU | (Padole et al., 14 Aug 2025) |
The broader significance of MADI is clearer when placed next to adjacent inference-time scaling methods for diffusion. ReMDM introduces remasking during the backward process so that already generated discrete tokens can be masked again and corrected, and it treats increasing the number of denoising steps as an explicit compute-quality axis (Wang et al., 1 Mar 2025). UMF, by contrast, casts the unmasking trajectory of masked diffusion LLMs as a Monte Carlo Tree Search over deterministic partial-unmasking actions, emphasizing low-variance branching under a fixed Number of Function Evaluations budget (Misaki et al., 4 Feb 2026). These comparisons indicate that MADI belongs to a wider shift in diffusion research from fixed samplers toward compute-adaptive decoding.
A further distinction concerns what “masking” means. In visual MADI, masking is a training-time corruption over spatially structured image inputs. In language MADI, masking is the native discrete corruption used by MDMs, specialized to seq2seq style transfer and supplemented by a semantic verifier. This suggests that the unifying content of MADI is not a single corruption operator, but the combination of masked conditioning and post-training inference-time scaling.