Masked Bit AutoRegressive Modeling (BAR)
- Masked Bit AutoRegressive Modeling (BAR) is a discrete generative approach that factors token prediction into bit-level steps using a masked prediction head.
- The framework leverages a causal transformer and iterative unmasking schedule to generate latent tokens more efficiently than traditional large-vocabulary softmax methods.
- BAR-Fixed and BAR-Learned variants adjust coordinate-wise masking schedules to optimize decoding orders, enhancing both image synthesis and tabular data modeling.
Searching arXiv for the cited BAR-related papers to ground the article in current records. Looking up (Yu et al., 9 Feb 2026) and (Garg et al., 24 Nov 2025). Masked Bit AutoRegressive modeling (BAR) denotes a family of discrete generative modeling formulations that combine autoregressive factorization with masked prediction. In visual generation, BAR is defined as a scalable framework in which a causal transformer predicts discrete latent tokens by progressively generating their constituent bits with a masked bit modeling head (Yu et al., 9 Feb 2026). In related work on masked diffusion over discrete tokens, BAR-Fixed and BAR-Learned denote models whose continuous-time variational objective decomposes exactly into a weighted sum of autoregressive losses over decoding orders, with the weights determined by a multivariate masking schedule (Garg et al., 24 Nov 2025). These usages are distinct but technically adjacent: both place masking inside an autoregressive view of discrete generation.
1. Terminology and scope
The acronym BAR appears in two related senses in the cited literature. One sense is the image-generation framework introduced in "Autoregressive Image Generation with Masked Bit Modeling" (Yu et al., 9 Feb 2026). The other is the learned-order autoregressive interpretation of masked diffusion on discrete tokens, instantiated as BAR-Fixed and BAR-Learned in tabular synthesis experiments in "Masked Diffusion Models are Secretly Learned-Order Autoregressive Models" (Garg et al., 24 Nov 2025).
| Usage | Domain | Defining mechanism |
|---|---|---|
| BAR | Discrete latent image generation | Predict each latent token through its constituent bits using a masked bit modeling head |
| BAR-Fixed / BAR-Learned | Discrete-token masked diffusion and tabular synthesis | Learn or fix coordinate-wise masking schedules that induce weights over autoregressive orders |
The first formulation is operational: it specifies a tokenization, a bit-level factorization, a transformer backbone, and a multi-round unmasking procedure for sampling. The second is theoretical and algorithmic: it shows that masked diffusion with multivariate schedules is exactly a learned-order autoregressive model, and then uses that result to learn favorable decoding orders in practice. A plausible implication is that BAR should be understood less as a single architecture than as a design pattern in which masked reconstruction is used to control autoregressive generation order, granularity, or both.
2. Bit-level autoregressive formulation
In the image-generation formulation, BAR treats generation as an autoregressive model over discrete latent tokens, but does not predict each token index with one large softmax. Instead, each token is decomposed into bits and generated bit-by-bit (Yu et al., 9 Feb 2026). Let be the number of latent tokens, the codebook size, the number of bits per token, the -th latent token, and its binary expansion. The standard token-level factorization is
and BAR further factorizes each term as
Flattening the entire latent stream into a single bit sequence yields
Training uses masked-bit modeling. A random subset of bits in each 0 is replaced by a mask symbol, and the model reconstructs the full bit-vector. If 1 is a masking-ratio sampler and 2, then the head predicts
3
where 4 is the transformer hidden state conditioned on 5 (Yu et al., 9 Feb 2026).
At inference time, prediction is performed through a small fixed unmasking schedule 6. Starting from 7, the model repeatedly computes logits from the masked bit string, fills the next 8 masked positions by sampling or argmax, and finally decodes the completed bit string back to the token index 9. This makes token prediction iterative at the bit level while remaining autoregressive at the token level.
3. Architecture, objective, and computational profile
BAR’s backbone is a causal transformer similar to RAR or a GPT-style ViT, with depth 0 equal to 24 for BAR-B and 32 for BAR-L, width 1 equal to 768 or 1280, and components including attention heads, RoPE positional embeddings, SwiGLU feed-forward blocks, RMSNorm, and repeated class conditioning (Yu et al., 9 Feb 2026). After causal self-attention over previous tokens 2, the hidden vector 3 is passed to the Masked Bit Modeling (MBM) head 4.
The MBM head is a lightweight 3-layer SwiGLU MLP with adaptive layer norms. If the partially masked bit-string 5 is embedded into a 6 tensor and a learned mask-token embedding is used for masked positions, then
7
Each 8 is a logit for bit 9. Because 0, the head scales as 1 rather than 2, which is one of the central computational motivations of the method (Yu et al., 9 Feb 2026).
The training objective is the bit-wise cross-entropy over all token positions and bit positions,
3
supplemented by standard weight decay, optional dropout on class embeddings, and classifier-free guidance preparation through class-label dropping (Yu et al., 9 Feb 2026).
Sampling uses KV-cache reuse in the transformer. Each new token requires one transformer forward pass to obtain 4 and then 5 MBM-head calls, with 4–6 rounds described as typical. Since the MBM head is only 6 per token and 7 diffusion’s 1,000 steps, the paper states that BAR runs tens of times faster than diffusion (Yu et al., 9 Feb 2026). This suggests that BAR’s efficiency is achieved not by abandoning autoregression, but by moving the high-cardinality output layer into a low-dimensional masked-bit subproblem.
4. Codebook scaling and compression ratio
A central claim of the image-generation BAR paper is that the performance gap between discrete and continuous pipelines arises primarily from the total number of bits allocated in the latent space, that is, the compression ratio, rather than from an intrinsic inferiority of discrete tokenizers (Yu et al., 9 Feb 2026). BAR is presented as a mechanism for exploiting very large codebooks without incurring the standard training-cost or performance penalties associated with large-vocabulary token prediction.
The latent capacity of the discrete representation is measured by the bit budget
8
where 9 is the spatial downsampling factor. Pixel-level bits are
0
and the compression ratio is
1
As 2 grows, 3 grows linearly, so the discrete bottleneck becomes less lossy (Yu et al., 9 Feb 2026).
The reported sweep ranges from 4 to 5, and reconstruction FID is said to decrease in lock-step as bits increase, eventually matching or surpassing continuous VAEs at similar bit budget (Yu et al., 9 Feb 2026). The technical significance is that BAR reframes large codebooks from a softmax-scaling problem into a bit-sequence prediction problem. A plausible implication is that codebook scaling becomes a first-class optimization axis rather than an impractical edge case.
5. Learned-order autoregression from masked diffusion
The learned-order formulation begins with masked diffusion over a discrete token sequence 6, where each coordinate 7 has its own strictly decreasing masking schedule 8 satisfying 9 and 0 (Garg et al., 24 Nov 2025). In the forward process, coordinate 1 is replaced by a mask token at a random time 2 whose CDF is
3
and the joint density is
4
Using the Ho–King reparameterization or the continuous-time limit of the discrete ELBO, the variational bound on 5 becomes the denoising loss
6
If 7 is the permutation obtained by sorting the transition times,
8
then grouping trajectories by their implied order yields an exact decomposition of the ELBO: 9 with
0
The paper states this as a proposition: the masked-diffusion objective is precisely a weighted autoregressive loss over orders (Garg et al., 24 Nov 2025).
This result has two immediate consequences. First, if all 1 are identical, then symmetry gives 2, recovering the any-order autoregressive interpretation with uniform mixing over orders. Second, if the schedules differ across coordinates, permutation invariance is broken, some orders receive larger weight, and the model specializes to a favorable decoding order during training (Garg et al., 24 Nov 2025). The parameterization
3
is given as an example of a learnable schedule family. In tabular experiments, the learned version is trained by learning each 4 via REINFORCE/RLOO (Garg et al., 24 Nov 2025).
6. Empirical findings and interpretive issues
On ImageNet-2565256 with classifier-free guidance, BAR-L with 1.1B parameters achieves 6, while the paper reports comparison numbers of 1.13 for RAE with 839M parameters, 1.65 for FlowAR, 1.55 for MAR, 1.24 for xAR, and approximately 1.63–1.26 for diffusion baselines such as DiMR and DDT (Yu et al., 9 Feb 2026). The smaller BAR-B with 415M parameters achieves 7, matching RAE, and samples at 24 images per second on a single H200, described as a 3.78 speedup. BAR-B/2 is reported at 150 images per second, with a slight FID increase but still better quality than most one-step diffusion methods (Yu et al., 9 Feb 2026).
In the learned-order masked-diffusion setting, two models with approximately 86K parameters are instantiated: BAR-Fixed with 9, and BAR-Learned with 0 (Garg et al., 24 Nov 2025). On six standard tabular datasets—Adult, Default, Beijing, Shoppers, Magic, and News—the validation negative log-likelihood is stated to be uniformly lower for BAR-Learned. The paper further reports that learned schedules concentrate masking later on “hard” columns and earlier on “easy” ones, and that data-fidelity metrics such as 1-precision, 2-recall, and Trend match or exceed BAR-Fixed while remaining competitive with much larger Gaussian-diffusion baselines. The Adult example gives 13.1524 for BAR-Learned and 13.1861 for BAR-Fixed (Garg et al., 24 Nov 2025).
Two recurrent misconceptions are addressed directly by these results. One concerns discrete latent models: the image-generation paper argues against the view that discrete tokenizers are intrinsically inferior, attributing the gap primarily to latent bit allocation and compression ratio (Yu et al., 9 Feb 2026). The other concerns masked diffusion: the learned-order paper shows that apparent order-agnosticism is a consequence of using a univariate schedule, not a structural property of the objective itself (Garg et al., 24 Nov 2025). Taken together, these points suggest that BAR is best interpreted as a reparameterization strategy for discrete generation in which performance depends critically on how information capacity and generation order are exposed to the model.