When we ask a Large Language Model (LLM) a question, we usually look at the text it generates. However, text generation is a stochastic process that can be influenced by decoding strategies, safety filters, and "instruction-following" behaviors that mask the model's underlying statistical associations. To truly understand a model's internal state—its biases, knowledge, and reasoning anchors—researchers increasingly look "under the hood" at the raw probability distributions the model assigns to specific tokens.
This research direction, often termed log-probability or logit-based preference scoring, treats the model not as a chatbot, but as a precise density estimator. By comparing the likelihood of different text sequences, we can quantify latent preferences that might never surface in open-ended conversation.
The Mechanics of Comparative Likelihood
The core intuition behind this approach is simple: if a model is more "surprised" by sentence A than sentence B, it possesses a latent preference for the associations in B. In the context of social bias, Nangia et al. demonstrated this by comparing stereotypical sentences (e.g., "The doctor was a man") against non-stereotypical alternatives ("The doctor was a woman"). By calculating the sum of log-probabilities of the tokens that differ between the two, they could quantify a model's "confidence" in a stereotype.
This technique is particularly powerful because it provides a continuous metric. While a model might generate a "correct" answer in a binary test, its internal logits might reveal a razor-thin margin of confidence. Kimyeeun et al. and Madaan argue that this logit-based evaluation is more stable and deterministic than natural language generation, as it bypasses the noise of the decoding process.
Pseudo-Log-Likelihood for Masked Models
For Autoregressive models (like GPT), calculating the probability of a sentence is straightforward: you multiply the probability of each token given the preceding ones. However, Masked Language Models (MLMs) like BERT do not have a natural left-to-right factorization.
To solve this, researchers use Pseudo-Log-Likelihood (PLL). As explained by Kwon et al. and Watson et al., this involves masking tokens one by one and summing the log-probabilities the model assigns to the original tokens at those masked positions. This allows researchers to measure how well a specific lexical category—such as a gendered noun—fits into a given sentential context according to the model's internal weights.
Isolating Signal through Contrastive Scoring
A major challenge in measuring latent preferences is "surface-level" noise. A model might assign a high probability to a sentence simply because the words are common, not because it "believes" the underlying logic. To isolate the specific signal of interest, researchers use contrastive mechanisms:
- Conditional vs. Unconditional: The CAS framework measures how well an output matches a prompt by subtracting the "unconditional" log-likelihood (the general probability of the output) from the "conditional" log-likelihood. This ensures the score reflects the influence of the prompt rather than the general realism of the sample.
- Expert vs. Base: Song et al. use contrastive log-probability to estimate rewards for alignment, measuring the disparity between an expert model's distribution and a base model's distribution to filter out inherent priors.
- Directional Skew: Cho et al. introduce a directional bias metric that compares the probability of a positive outcome against the inverse probability of a negative outcome, revealing whether a model is systematically optimistic or pessimistic.
Why Probabilities Outperform Text
The shift toward log-probability scoring is driven by three primary advantages:
- Granularity: Instead of a binary "correct/incorrect," researchers get a scalar value. Girrbach et al. show that extracting the raw probability of an affirmative token (like "Yes") in response to a verification prompt provides a much finer-grained quality score than asking the model to write a review.
- Sensitivity: Probabilities can detect "lexical traps" and subtle shifts in reasoning. Li et al. used log-probabilities to show that while models might seem to reason counterfactually, they are often just following high-probability statistical breadcrumbs.
- Robustness to Style: While Zhao et al. warn that bias scores can be sensitive to phrasing, analyzing the entire distribution of pseudo-log-likelihoods allows for a more rigorous statistical analysis of how style shifts affect model judgment compared to looking at generated text alone.
By treating the model's output distribution as the primary object of study, this research direction allows us to map the "ideological generalization" (Graham et al.) and cultural tilts (Naous et al.) that define the modern landscape of large-scale AI.