Interpreting the Latent Structure of Operator Precedence in Language Models
Algoverse AI Research(Algoverse AI研究)
Dharunish Yugeswardeenoo, Harshil Nukala, Ved Shah, Cole Blondin, Sean O Brien, Vasu Sharma, Kevin Zhu
备注:
11 pages, 6 figures. An earlier version of this work was accepted to CoLM 2024. This is an extended version of our CoLM 2024 paper. Includes additional ablations; added Ved Shah as author for those contributions
Large Language Models (LLMs) have demonstrated impressive reasoning capabilities but continue to struggle with arithmetic tasks. Prior works largely focus on outputs or prompting strategies, leaving the open question of the internal structure through which models do arithmetic computation. In this work, we investigate whether LLMs encode operator precedence in their internal representations via the open-source instruction-tuned LLaMA 3.2-3B model. We constructed a dataset of arithmetic expressions with three operands and two operators, varying the order and placement of parentheses. Using this dataset, we trace whether intermediate results appear in the residual stream of the instruction-tuned LLaMA 3.2-3B model. We apply interpretability techniques such as logit lens, linear classification probes, and UMAP geometric visualization. Our results show that intermediate computations are present in the residual stream, particularly after MLP blocks. We also find that the model linearly encodes precedence in each operator's embeddings post attention layer. We introduce partial embedding swap, a technique that modifies operator precedence by exchanging high-impact embedding dimensions between operators.
Qatar Computing Research Institute(卡塔尔计算研究所);Faculty of Computer Science, Dalhousie University(达尔豪斯大学计算机学院);School of Engineering and Science, Steven Institute of Technology(史蒂文斯理工学院工程与科学学院)
Interpreting Sentiment Composition with Latent Semantic Tree
Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);Meituan(美团)
SAE-V: Interpreting Multimodal Models for Enhanced Alignment
Institute for AI, Peking University, Beijing, China(人工智能研究院,北京大学,北京,中国);State Key Laboratory of General Artificial Intelligence, Institute for AI, Peking University, Beijing, China(通用人工智能国家重点实验室,人工智能研究院,北京大学,北京,中国)
Surrogate modeling for interpreting black-box LLMs in medical predictions
Medical Big Data Research Center, Seoul National University Medical Research Center, Seoul National University College of Medicine(首尔国立大学医学院医学大数据研究中心,首尔国立大学医学院);Department of Biomedical Systems Informatics, Yonsei University College of Medicine(延世大学医学院生物医学系统信息学系);Laboratory for Computational Physiology, Massachusetts Institute of Technology(麻省理工学院计算生理学实验室);Division of Pulmonary, Critical Care and Sleep Medicine, Beth Israel Deaconess Medical Center(贝斯以色列德aconess医疗中心呼吸科、重症医学科和睡眠医学科);Department of Biostatistics, Harvard T.H. Chan School of Public Health(哈佛大学T.H. Chan公共卫生学院生物统计学系);Department of Cardiology, Yongin Severance Hospital, Yonsei University College of Medicine(延世大学医学院永宁松甫医院心内科);Center for Digital Health, Yongin Severance Hospital, Yonsei University Health System(延世大学健康系统永宁松甫医院数字健康中心);Institute for Innovation in Digital Healthcare, Severance Hospital, Seoul, Republic of Korea(首尔松甫医院数字医疗创新研究所)
Towards Efficient Dialogue Pre-training with Transferable and Interpretable Latent Structure
Wangxuan Institute of Computer Technology, Peking University(北京大学王选计算机研究所);Center for Data Science, AAIS, Peking University(北京大学人工智能研究院数据科学中心);Tencent AI Lab(腾讯人工智能实验室);Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);Beijing Institute for General Artificial Intelligence(北京通用人工智能研究院)
Interpreting the linear structure of vision-language model embedding spaces
Kempner Institute for the Study of Natural and Artificial Intelligence at Harvard University(哈佛大学自然与人工智能研究所);Department of Computer Science, Harvard University(哈佛大学计算机科学系)