Lune

CVPR2026顶会

Understanding Counting Mechanisms in Large Language and Vision-Language Models

Hosein Hasani, Amirmohammad Izadi, Fatemeh Askari, Mobin Bagherian, Sadegh Mohammadian, Mohammad Izadi, Mahdieh Baghshah

摘要

Counting is one of the fundamental abilities of large language models (LLMs) and large vision-language models (LVLMs). This paper examines how these foundation models represent and compute numerical information in counting tasks. We use controlled experiments with repeated textual and visual items and analyze counting in LLMs and LVLMs through a set of behavioral, observational, and causal mediation analyses. To this end, we design a specialized tool, CountScope, for the mechanistic interpretability of numerical content. Results show that individual tokens or visual features encode latent positional count information that can be extracted and transferred across contexts. Layerwise analyses reveal a progressive emergence of numerical representations, with lower layers encoding small counts and higher layers representing larger ones. We identify an internal counter mechanism that updates with each item, stored mainly in the final token or region. In LVLMs, numerical information also appears in visual embeddings, shifting between background and foreground regions depending on spatial composition. We further reveal that models rely on structural cues such as separators in text, which act as shortcuts for tracking item counts and strongly influence the accuracy of numerical predictions. Overall, counting emerges as a structured, layerwise process in LLMs and follows the same general pattern in LVLMs, shaped by the properties of the vision encoder. 1

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Towards Best Practices of Activation Patching in Language Models: Metrics and Methods 引用了 Investigating Gender Bias in Language Models Using Causal Mediation Analysis
  • Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Models 引用了 Towards Best Practices of Activation Patching in Language Models: Metrics and Methods
  • Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Models 引用了 Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper12

  1. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 等NeurIPS 2022 · 22,562 次引用
  2. Investigating Gender Bias in Language Models Using Causal Mediation AnalysisJesse Vig, Sebastian Gehrmann, Yonatan Belinkov, Sharon Qian 等NeurIPS 2020 · 851 次引用
  3. Towards Best Practices of Activation Patching in Language Models: Metrics and MethodsFred Zhang, Neel NandaICLR 2024 · 233 次引用
  4. Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language ModelsAsma Ghandeharioun, Avi Caciularu, Adam Pearce, Lucas Dixon 等ICML 2024 · 197 次引用
  5. Teaching CLIP to Count to TenRoni Paiss, Ariel Ephrat, Omer Tov, Shiran Zada 等ICCV 2023 · 196 次引用

相关 Paper

  1. Mechanistic Interpretability of Large-Scale Counting in LLMs through a System-2 StrategyHosein Hasani, Mohammadali Banayeeanzade, Ali Nafisi, Sadegh Mohammadian 等ACL Findings 2026
  2. Unveiling the Visual Counting Bottleneck in Vision-Language ModelsXingzhou Pang, Yifan Hou, Junling Wang, Mrinmaya SachanICML 2026
  3. Spelling-out is not Straightforward: LLMs' Capability of Tokenization from Token to CharactersTatsuya Hiraoka, Kentaro InuiEMNLP Findings 2025 · 1 次引用
  4. Towards Interpreting Visual Information Processing in Vision-Language ModelsClement Neo, Luke Ong, Philip Torr, Mor Geva 等ICLR 2025
  5. Pre-trained Models Can Count (Almost): Exploring Quantitative Structure in Visual RepresentationsToshimichi Aota, Akinori Hashimoto, Naoto Sekizuka, Takayuki OkataniCVPR Findings 2026
黄昏的海面,两侧是细线勾勒的悬崖