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.

Series
2025 Generative Models Intensive · 2
Type / level
study-note · intermediate
Tools
Python, PyTorch
01Factorizing the joint

A checkpoint in the study sequence for this note.

02Training versus generation

A checkpoint in the study sequence for this note.

03MLE as a loss

A checkpoint in the study sequence for this note.

04Code checks

A checkpoint in the study sequence for this note.

A compact concept path generated from this post's table of contents.

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.
Conditional sequence and negative log-likelihood
The probability chain rule and the training loss describe the same path.

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

Publication first-page preview