Skip to content

Neural language models

Neural language models are autoregressive or bidirectional statistical models trained to predict the next token (word or subword) in a sequence given context. Modern models like GPT-2, GPT-3, BERT, and T5 are trained on massive corpora using transformer architectures and serve as the backbone for diverse NLP applications.

Key properties

Scale effects:
Model capability improves dramatically with parameter count and training data size. GPT-3 (175B parameters) exhibits few-shot learning and reasoning abilities absent in smaller models (GPT-2: 1.5B parameters, BERT: 340M parameters), suggesting emergent behaviors arise from scale.

Exposure bias and training-inference mismatch:
During training, models see human-written text; at inference, they sample from their own distributions. This distributional shift leads to characteristic artifacts: repetition, loss of coherence over long sequences, vocabulary concentration on high-likelihood tokens.

Output distribution properties:
Language models concentrate probability mass on a narrow set of high-likelihood tokens. Human text, by contrast, exploits the full range of the vocabulary. This asymmetry is the foundation of white-box Generated text detection.

Key papers