揭秘大模型如何定位表格单元格,发现其依赖计数与向量编码机制。
How Do Language Models Understand Tables? A Mechanistic Analysis of Cell Location
- 通过激活修补揭示三阶段理解流程:语义绑定、坐标定位、信息提取。
- 模型用离散分隔符计数定位单元格,列索引在特定子空间中编码。
- 同一注意力头可复用于多单元格任务,实现泛化能力。
尽管大型语言模型(LLMs)越来越多地应用于表格相关任务,但其处理线性化二维结构表格的内部机制仍不清晰。本文通过剖析单元格定位这一基础任务,结合激活修补与互补可解释性技术,将表格理解机制分解为三个阶段:语义绑定、坐标定位和信息提取。我们发现,模型通过计数离散分隔符来确定目标单元格的坐标。此外,列索引被编码在一条线性子空间中,可通过向量运算精确引导模型注意力。最后,我们揭示了模型通过复用原子定位时识别出的相同注意力头,实现了对多单元格定位任务的泛化。这些发现为Transformer架构中的表格理解提供了全面解释。
原文摘要 · Abstract (English)
While Large Language Models (LLMs) are increasingly deployed for table-related tasks, the internal mechanisms enabling them to process linearized two-dimensional structured tables remain opaque. In this work, we investigate the process of table understanding by dissecting the atomic task of cell location. Through activation patching and complementary interpretability techniques, we delineate the table understanding mechanism into a sequential three-stage pipeline: Semantic Binding, Coordinate Localization, and Information Extraction. We demonstrate that models locate the target cell via an ordinal mechanism that counts discrete delimiters to resolve coordinates. Furthermore, column indices are encoded within a linear subspace that allows for precise steering of model focus through vector arithmetic. Finally, we reveal that models generalize to multi-cell location tasks by multiplexing the identical attention heads identified during atomic location. Our findings provide a comprehensive explanation of table understanding within Transformer architectures.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。