arXiv

Failure of contextual invariance in large language models

Title: Large Language Models Fail to Maintain Contextual Invariance

Abstract: Conventional evaluation methodologies operate on the premise that the responses generated by large language models (LLMs) remain consistent when prompts are situated within discourses that are contextually equivalent. This study challenges that assumption by examining gender inference tasks. Through a controlled experiment involving pronoun selection, we incorporated minimal discourse contexts that offer no theoretical insight, yet discovered that these additions trigger significant and systematic alterations in model outputs. While correlations with cultural gender stereotypes—observable in decontextualized environments—diminish or vanish when context is applied, features theoretically irrelevant to the task, such as the gender of a pronoun referring to an unrelated entity, emerge as the strongest predictors of model behavior. A Contextuality-by-Default analysis indicates that this dependency remains in 19% to 52% of instances across various models, even after controlling for all marginal contextual effects on individual outputs, thereby ruling out simple pronoun repetition as the cause. These results demonstrate that LLM outputs breach contextual invariance even when syntactic structures are nearly identical, raising important concerns for bias assessment and the deployment of these systems in high-stakes environments.


Source: arXiv Generated at: 2026-06-02 00:00:00 UTC

Related Articles

Law’s Billable Hour Is Being Shredded by AI
Bloomberg

Law’s Billable Hour Is Being Shredded by AI

AI is dismantling the billable hour by automating routine legal tasks. This technological shift threatens the traditiona...

Iran War: Trump Tries to Stop Israel’s Lebanon Push | The Opening Trade 6/2/2026
Bloomberg

Iran War: Trump Tries to Stop Israel’s Lebanon Push | The Opening Trade 6/2/2026

SoftBank in Early Talks to Back $800 Million Agile Robots Round
Bloomberg

SoftBank in Early Talks to Back $800 Million Agile Robots Round

SoftBank is in early talks to back Agile Robots’ $800 million funding round. The Japanese tech giant is currently in pre...

Amundi Is Diversifying Risk Via Commodity Currencies, Gold
Bloomberg

Amundi Is Diversifying Risk Via Commodity Currencies, Gold

Amundi diversifies risk by investing in commodity-linked currencies and gold. This strategy hedges against market volati...

Reuters

Marvell Technology surges after Nvidia's Huang calls it 'next trillion-dollar company'

Marvell Technology shares surged after Nvidia CEO Jensen Huang labeled the firm the “next trillion-dollar company.”

Russia Says It Found Foreign Spyware on Top Officials’ Phones
Bloomberg

Russia Says It Found Foreign Spyware on Top Officials’ Phones

Russia’s FSB claims to have discovered foreign spyware on senior officials’ phones. Moscow attributes the intrusion to h...