Lune

ACL Findings2026

Code over Words: Overcoming Semantic Inertia via Code-Grounded Reasoning

Manjie Xu, Isabella Yin, Xinyi Tu, Chi Zhang, Yixin Zhu

Abstract

Large Language Models (LLMs) struggle with Semantic Inertia: the inability to inhibit pretrained priors (e.g., "Lava is Dangerous") when dynamic, in-context rules contradict them. We probe this phenomenon using Baba Is You, where physical laws are mutable text rules, enabling precise evaluation of models' ability to override learned priors when rules change. We quantitatively observe that larger models can exhibit inverse scaling: they perform worse than smaller models when natural language reasoning requires suppressing pre-trained associations (e.g., accepting "Lava is Safe"). Our analysis attributes this to natural language encoding, which entangles descriptive semantics and logical rules, leading to persistent hallucinations of familiar physics despite explicit contradictory rules. Here we show that representing dynamics as executable code, rather than descriptive text, reverses this trend and enables effective prior inhibition. We introduce Code-Grounded Vistas (LCV), which fine-tunes models on counterfactual pairs and identifies states with contradictory rules, thereby forcing attention to logical constraints rather than visual semantics. This training-time approach outperforms expensive inference-time search methods in both efficiency and accuracy. Our results demonstrate that representation fundamentally determines whether scaling improves or impairs contextual reasoning. This challenges the assumption that larger models are universally better, with implications for domains that require dynamic overriding of learned priors.

Ask Lune

Ask anything. The answer quotes the paper.

Lune reads all of it and the papers around it, then shows you the passages behind every answer.

Questions to start from

Lune answers from

the full paper · 1 top-tier paper that cites it · related work

Get the answer

Free to start. No credit card required.

Cited by top-tier papers1

  1. Distilling Task-Level Coordination Policies for Generalizable Multi-Agent CooperationZimo Zhai, Manjie Xu, Wei LiangICML 2026

Builds on16

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan et al.NeurIPS 2023 · 5,828 citations
  3. Language Models Don't Always Say What They Think: Unfaithful Explanations in Chain-of-Thought PromptingMiles Turpin, Julian Michael, Ethan Perez, Samuel R. BowmanNeurIPS 2023 · 1,792 citations
  4. Improving Factuality and Reasoning in Language Models through Multiagent DebateYilun Du, Shuang Li, Antonio Torralba, Joshua B. Tenenbaum et al.ICML 2024 · 1,562 citations
  5. Climbing towards NLU: On Meaning, Form, and Understanding in the Age of DataEmily M. Bender, Alexander KollerACL 2020 · 914 citations

Related papers

  1. Exploring the Hidden Reasoning Process of Large Language Models by Misleading ThemGuanyu Chen, Peiyang Wang, Yizhou Jiang, Yuqian Liu et al.EMNLP Findings 2025
  2. Better and Worse with Scale: How Contextual Entrainment Diverges with Model SizeDikshant Kukreja, Kshitij Sah, Gautam Gupta, Avinash Anand et al.ACL Findings 2026
  3. MASS: Motion-Aware Spatial–temporal Grounding for Physics Reasoning and Comprehension in Vision-Language ModelsXiyang Wu, Zongxia Li, Jihui Jin, Gouthaman KV, Vishnu Raj, Nilotpal Sinha, Jingxi Chen, Fan Du, Dinesh ManochaCVPR Findings 2026
  4. Beyond Detection: Evaluating Fallacy Awareness of LLMs in Interactive ScenariosConghui Niu, Ningxin Wu, Ziran Zhao, Dong Yu et al.ACL 2026
  5. Can Vision Language Models Learn Intuitive Physics from Interaction?Luca M. Schulze Buschoff, Konstantinos Voudouris, Can Demircan, Eric SchulzICML 2026
Dusk over the sea between two cliffs drawn in fine vertical lines