Language Models (LMs) have shown their application for tasks pertinent to code and several code~LMs have been proposed recently. The majority of the studies in this direction only focus on the improvements in performance of the LMs on different benchmarks, whereas LMs are considered black boxes. Besides this, a handful of works attempt to understand the role of attention layers in the code~LMs. Nonetheless, feed-forward layers remain under-explored which consist of two-thirds of a typical transformer model's parameters.
In this work, we attempt to gain insights into the inner workings of code language models by examining the feed-forward layers. To conduct our investigations, we use two state-of-the-art code~LMs, Codegen-Mono and Ploycoder, and three widely used programming languages, Java, Go, and Python. We focus on examining the organization of stored concepts, the editability of these concepts, and the roles of different layers and input context size variations for output generation. Our empirical findings demonstrate that lower layers capture syntactic patterns while higher layers encode abstract concepts and semantics. We show concepts of interest can be edited within feed-forward layers without compromising code~LM performance. Additionally, we observe initial layers serve as ``thinking'' layers, while later layers are crucial for predicting subsequent code tokens. Furthermore, we discover earlier layers can accurately predict smaller contexts, but larger contexts need critical later layers' contributions. We anticipate these findings will facilitate better understanding, debugging, and testing of code~LMs.
Investigating Advanced Reasoning of Large Language Models via Black-Box Interaction
College of Artificial Intelligence, Nanjing University of Aeronautics(人工智能学院,南京航空航天大学);School of Electronics Engineering(电子工程学院);Computer Science, Peking University(计算机科学,北京大学);Theta Health Inc.(Theta健康公司)
Ten Words Only Still Help: Improving Black-Box AI-Generated Text Detection via Proxy-Guided Efficient Re-Sampling
Key Lab of Intelligent Information Processing of Chinese Academy of Sciences(中国科学院智能信息处理重点实验室);Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);Xi’an Jiaotong University(西安交通大学)
Instruction Learning Paradigms: A Dual Perspective on White-box and Black-box LLMs
School of Artificial Intelligence, Beihang University(北京航空航天大学人工智能学院);Hangzhou International Innovation Institute, Beihang University(北京航空航天大学杭州国际创新研究院);Nanyang Technological University(南洋理工大学);University of Leicester(莱斯特大学);Kuaishou Technology(快手科技)
Collab-RAG: Boosting Retrieval-Augmented Generation for Complex Question Answering via White-Box and Black-Box LLM Collaboration
Emory University(埃默里大学);University of Texas Southwestern Medical Center(德克萨斯大学西南医学中心);Georgia Institute of Technology(佐治亚理工学院);SUNY Albany(纽约州立大学奥尔巴尼分校)