Imagine you are standing in line at a coffee shop, deciding between a small espresso for \$2 and a large latte for \$5. After a moment of deliberation, you lean toward the espresso. But just before you order, the barista points out a new option on the menu: a mega-latte for \$7. Suddenly, the \$5 large latte doesn't seem so expensive anymore—it feels like a reasonable compromise. You change your mind and order the large latte.
This shift in preference is a classic example of a context effect. In traditional economic and decision theory, this behavior is considered irrational. It violates a foundational axiom known as the Independence of Irrelevant Alternatives (IIA). IIA states that if you prefer an espresso over a latte when those are your only options, introducing a third option (the mega-latte) should not reverse that initial preference.
For decades, machine learning systems, recommendation engines, and ranking algorithms have relied heavily on choice models that assume IIA holds true. However, a growing body of research demonstrates that humans—and even large language models—consistently violate IIA. To build systems that truly understand human choices, researchers are moving beyond static utility scores toward models that explicitly capture how the context of a menu alters our decisions.
The Mathematical Flaw of Static Utility
To understand why traditional models fail, we have to look at how they calculate choice probabilities. The most ubiquitous framework is the Multinomial Logit (MNL) model (or the Plackett-Luce model in ranking).
In an MNL framework, every item $i$ is assigned a fixed, intrinsic utility score $u_i$. When a user chooses an item from a available menu (or choice set) $S$, the probability of selecting item $i$ is proportional to its utility relative to everything else on the menu:
$$P(i \mid S) = \frac{e^{u_i}}{\sum_{j \in S} e^{u_j}}$$
Now, let's look at the ratio of probabilities between two items, $A$ and $B$:
$$\frac{P(A \mid S)}{P(B \mid S)} = \frac{e^{u_A}}{e^{u_B}} = e^{u_A - u_B}$$
Notice something critical: the menu $S$ completely disappears from the right side of the equation. Whether the menu contains two items or two hundred, the relative odds of choosing $A$ over $B$ remain completely locked.
As Arjun Seshadri et al. demonstrate in Discovering Context Effects from Raw Choice Data, this mathematical rigidity fails to capture real-world data, even in utilitarian scenarios like transportation choices. When an inferior "decoy" or a well-placed "compromise" option is added to a set, human preferences predictably shift.
This is not a minor edge case. Or Sheffet et al. found in Predicting Consumer Behavior in Commerce Search that preference reversals occur in roughly 25% of e-commerce search queries. Because static scoring models cannot adapt to these structural changes in the choice set, they hit a mathematical ceiling, limiting their predictive accuracy to 50% on datasets where preferences flip. Even advanced AI systems inherit this vulnerability; Kremena Valkanova et al. showed in Irrelevant Alternatives Bias Large Language Model Hiring Decisions that large language models consistently exhibit the "attraction effect," altering their evaluation of job candidates when an inferior decoy resume is introduced into the prompt context.
Mechanism 1: Choice as a Random Walk
If static utilities cannot capture context, how do we fix the math? One elegant solution is to stop thinking of choice as a static formula and start viewing it as a dynamic process.
In Pairwise Choice Markov Chains, Stephen Ragain et al. proposed modeling discrete choice as the stationary distribution of a Markov chain. Imagine a graph where every node is an item on the menu. A decision-maker starts at a random item and continuously compares it to other items, walking from node to node based on pairwise preferences. The item they ultimately choose is determined by where they spend the most time—the stationary distribution of the random walk restricted to that specific menu.
Traditional MNL (Static):
[ Item A: u=3 ] --> P(A) = e^3 / (e^3 + e^2 + e^1)
[ Item B: u=2 ]
[ Decoy C: u=1 ]
Pairwise Choice Markov Chain (Dynamic):
( Item A ) <=======> ( Item B )
^ ^
| |
v v
( Decoy C ) ------------+
Why does this break the IIA constraint? Because the probability of transitioning between $A$ and $B$ is now mediated by the presence of other nodes. If a decoy item $C$ is introduced, it changes the global topology of the network. Paths that used to flow directly between $A$ and $B$ are rerouted through $C$. This allows the model to naturally capture complex relational dynamics and preference reversals without needing hand-crafted rules for every possible context effect.
To scale this idea to complex, real-world items, Alix Lhéritier introduced PCMC-Net: Feature-based Pairwise Choice Markov Chains, which uses deep neural networks to parameterize these transition rates based on item features, allowing the model to generalize context effects to entirely unseen alternatives.
Mechanism 2: Injecting Context into Utility
A second approach modifies the utility function itself, transforming it from a static property of an item ($u_i$) into a dynamic function of the entire menu ($u_i(S)$).
Kiran Tomlinson et al. formalized this in Learning Interpretable Feature Context Effects in Discrete Choice by introducing the Linear Context Logit. Instead of evaluating an item's features in isolation, their model adjusts an item's utility based on how its features compare to the average features of the rest of the menu:
$$u_i(S) = \beta \cdot x_i + \gamma \cdot (x_i - \bar{x}_S)$$
Where $x_i$ represents the features of item $i$, and $\bar{x}_S$ is the average feature vector of all items currently on the menu. If $\gamma$ is positive, an item becomes significantly more attractive if its features exceed the menu average. This explicitly models the compromise and attraction effects while remaining highly interpretable.
For more complex, non-linear interactions, Shuhan Zhang et al. developed DeepHalo: A Neural Choice Model with Controllable Context Effects, which leverages neural networks to learn how items cast a "halo effect" over their neighbors, shifting their perceived value based on proximity in the feature space.
Why Contextual Modeling Works: Bounded Rationality
Why do humans exhibit these seemingly irrational behaviors in the first place? Researchers have found that context effects are often not failures of human logic, but rather features of an optimal system operating under constraints.
Haiyang Chen et al. argue in Apparently Irrational Choice as Optimal Sequential Decision Making that context-dependent shifts emerge naturally when agents must make decisions under strict time or information-processing limits. When evaluating a complex menu, humans do not have the cognitive bandwidth to compute absolute utilities for every item. Instead, we use the menu itself as a reference frame to gather comparative evidence.
This perspective aligns with visual attention data. Armin W Thomas et al. demonstrated in Gaze-dependent evidence accumulation predicts multi-alternative risky choice behaviour that the way a user distributes their gaze across multiple options predicts their eventual "irrational" choice shifts. The menu acts as an information environment; an extreme or decoy option draws visual attention and alters the baseline against which other options are judged.
The Cost of Ignoring Context in Machine Learning
Failing to account for these violations of IIA introduces severe statistical and operational vulnerabilities across machine learning applications:
- Reinforcement Learning from Human Feedback (RLHF): Standard reward modeling often relies on pairwise comparisons to learn human preferences. However, Yeshwanth Cherapanamjeri et al. prove in Learning Correlated Reward Models: Statistical Barriers and Opportunities that pairwise data is mathematically insufficient to learn correlated, context-dependent preferences. Systems must move toward "best-of-three" or subset choices to break the statistical barriers imposed by the IIA assumption.
- Multi-Item Recommendation and Bandits: Dueling bandit algorithms traditionally assume a stable, global ranking. When applied to multi-item displays or product shelves, these algorithms degrade due to substitution effects. In Choice Bandits, Arpit Agarwal et al. address this by relaxing IIA, establishing algorithms that can identify optimal assortments even when the presence of a third item alters the relative preference of the original pair.
By moving away from the fiction of absolute, intrinsic utility and embracing context-dependent modeling, machine learning systems can transition from predicting what humans should choose under idealized rational theory to understanding what they actually choose in the messy, comparative reality of everyday life.