arXiv

How Language Models Process Negation

Title: The Mechanisms Behind How Large Language Models Handle Negation

Abstract: This research investigates the mechanistic processes Large Language Models (LLMs) employ to handle negation. We first demonstrate that while open-weight models frequently yield incorrect responses to queries involving negation, they actually contain internal components capable of processing it accurately. The low accuracy rates stem from attention behaviors in later layers that favor simplistic shortcuts; removing these specific attention modules significantly boosts performance on negation-based tasks. Second, we reveal the specific methods models use to process negation. We examined two primary hypotheses: either models utilize attention heads to target the negated phrase while suppressing associated concepts, or they directly build a representation for the entire negative phrase (for instance, creating a vector for "not gas" that encourages associations with liquids and solids). By applying various observational and causal interpretability techniques to Mistral-7B and Llama-3.1-8B, we found that LLMs utilize both mechanisms, though the "constructive" approach is more dominant. Together, these findings enhance our comprehension of LLM internals, emphasizing construction-heavy computations and the simultaneous presence of competing mechanisms.


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...