Probabilistic Inconsistency in Conditional Sequence Models

27 concepts21 papers1 proposal

Imagine a mapmaker tasked with drawing a city map by sketching each neighborhood completely independently. For Neighborhood A, they draw an arrow showing exactly how to walk to Neighborhood B. For Neighborhood B, they draw an arrow showing how to walk back to Neighborhood A. If you follow the first arrow and then the second, you should end up exactly where you started. But because the mapmaker drew each neighborhood in isolation, without an overarching coordinate system, you might find that following the local directions loops you into a completely different part of the city.

This is the core intuition behind probabilistic inconsistency in modern sequence models. In machine learning, we frequently train models to predict a local component given its context—such as a masked language model filling in a blank, or a translation model mapping a source sentence to a target. We implicitly hope these local predictions reflect a coherent global reality. However, as Rudolph et al. point out in their work on Exponential Family Embeddings, defining a model purely through a set of local conditional distributions provides absolutely no guarantee that a valid, consistent global joint probability distribution actually exists.

The Violation of the Chain Rule

In a mathematically sound probability distribution, the joint probability of a sequence of tokens should be invariant to how we break it down. According to the fundamental chain rule of probability, the likelihood of observing words $A$ and $B$ together must satisfy:

$$P(A, B) = P(A \mid B) \cdot P(B) = P(B \mid A) \cdot P(A)$$

Whether you evaluate $A$ first or $B$ first, the final joint probability must be identical. Yet, modern sequence models routinely violate this rule.

To expose this flaw, Wagner et al. introduced a framework called CONTESTS: a Framework for Consistency Testing of Span Probabilities in Language Models. They discovered that popular models like Llama 2 and RoBERTa produce wildly different joint probabilities for the exact same word span depending on the order in which you "fill in the blanks."

This "consistency gap" is also highly prevalent in non-autoregressive models. As Liu et al. demonstrate in Tractable Transformers for Flexible Conditional Generation, when models rely heavily on global attention mechanisms, the internal representations shift dramatically depending on which parts of the context are masked. This causes the sequence probability to fluctuate based on the order of token queries, leading to unreliable behavior during flexible text infilling.

The Bidirectional and Masked Model Dilemma

Why do bidirectional models like BERT struggle to define valid joint distributions? In a standard autoregressive model (like GPT), tokens are predicted strictly from left to right, which naturally satisfies the chain rule by building the sequence step-by-step. In contrast, Masked Language Models (MLMs) predict missing tokens independently based on both left and right contexts simultaneously.

As Torroba Hennigen et al. explain in Deriving Language Models from Masked Language Models and Shopov et al. detail in Consistent Bidirectional Language Modelling: Expressive Power and Representational Conciseness, because these conditional predictions do not sum to unity across all possible sequences, they fail to define a mathematically rigorous joint probability distribution.

This creates severe practical bottlenecks:

Inconsistency Across Dual Tasks

This issue extends beyond token-level predictions to macroscopic sequence-to-sequence mappings. Consider "dual" tasks like English-to-French translation ($X \to Y$) and French-to-English translation ($Y \to X$). Mathematically, the joint probability of the pair $(X, Y)$ must be identical regardless of the direction of factorization:

$$P(X, Y) = P(X) \cdot P(Y \mid X) = P(Y) \cdot P(X \mid Y)$$

However, standard supervised learning trains these models completely independently. Chen et al. demonstrated in Dual Supervised Learning that this lack of mathematical alignment leads to severe directional discrepancies where the probability of a mapping in one direction does not match the reverse mapping.

The same problem plagues code-related tasks. Wei et al. showed in Code Generation as a Dual Task of Code Summarization that models for code generation and code summarization fail to maintain an invariant joint probability for a code-comment pair, treating inverse operations as completely unrelated tasks rather than symmetric views of the same joint distribution.

Breaking the Laws of Logic

When a model's underlying probability distribution is fundamentally broken, its higher-level reasoning capabilities collapse. Paleka et al. demonstrated in Consistency Checks for Language Model Forecasters that large language models frequently generate probabilistic forecasts that violate basic mathematical laws, such as the law of total probability and the rules of conjunction.

This happens because, as Bhar et al. argue in Strong hallucinations from negation and how to fix them, modern architectures optimize for sequence-level character or word probabilities rather than logical propositions. Consequently, a model can assign independent, high probabilities to completely contradictory statements (such as a statement and its negation), leading to severe logical hallucinations.

Restoring Mathematical Rigor

To bridge the gap between local conditionals and global joint distributions, researchers have developed several elegant solutions:

  1. Dual Regularization: Chen et al. and Wei et al. introduce explicit consistency constraints during training, forcing dual models to align their joint probabilities and act as data-dependent regularizers for one another.
  2. Energy-Based Formulations: Instead of treating MLM outputs as raw probabilities, Goyal et al. reframe MLMs as implicit energy-based models and use a Metropolis-Hastings acceptance criterion to filter out inconsistent states, guaranteeing mathematically sound sequence generation.
  3. Explicit Derivations: Torroba Hennigen et al. leverage a statistically principled approach called the Arnold-Gokhale (AG) method to mathematically derive explicit, valid joint distributions directly from the conditional distributions of pre-trained MLMs, bypassing heuristic approximations and significantly improving sequence scoring accuracy.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_conditional_distribution_inconsistency_bfea1e15,
  title = {conditional distribution inconsistency},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/conditional-distribution-inconsistency/rdr_bfea1e1530534786b96323ab570f0f0f},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-20},
}

This exact version (version 1, frozen text):

@misc{lacuna_conditional_distribution_inconsistency_bfea1e15_v1,
  title = {conditional distribution inconsistency},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/conditional-distribution-inconsistency/rdr_bfea1e1530534786b96323ab570f0f0f/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-20},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake