AI · Deep Learning · Computer Vision · Generative AI
Autoregressive Factorization and MLE
2026-08-01 · updated 2026-08-01 · Hyeongrok Ryu
Notes connecting joint-probability factorization, teacher forcing, log-likelihood, and cross entropy.
- Type / level
- study-note · intermediate
- Tools
- Python, PyTorch
A checkpoint in the study sequence for this note.
A checkpoint in the study sequence for this note.
A checkpoint in the study sequence for this note.
A checkpoint in the study sequence for this note.
Factorizing the joint
| (p(x_1,ldots,x_T)=\prod_t p(x_t | x_{<t})) reduces a joint model to repeated next-value prediction. |
Training versus generation
Teacher forcing provides the true prefix during training. Generation must reuse model samples, so early errors can propagate. A causal mask prevents access to future tokens.
MLE as a loss
Logs convert products to sums. Negating the maximization objective produces NLL, and cross entropy selects the target class log probability.
Code checks
I shifted inputs and targets by one step, checked the vocabulary axis, and masked padding tokens out of the loss.
Sequential cost
Sampling remains sequential over long outputs, motivating comparisons with latent-variable and diffusion approaches.
Sources used
- Pixel Recurrent Neural Networks — paper; autoregressive image factorization