Looking into Black Box Code Language Models

Date:

arXiv:2407.04868v1 Announce Type: new
Abstract: 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.

Share post:

Subscribe

Popular

More like this
Related

RBR50 요약 : 로봇 공학 혁신에 대한 스포트라이트

로봇 보고서 팟 캐스트 · RBR50 요약 : 로봇...

Picknik의 MoveitPro와 함께 haptic 컨트롤러를 제공하는 거친 로봇 공학

Haply Robotics의 Inverse3 시스템을 통해 운영자는 실시간 힘 피드백을받는...

웹 세미나의 AI 진보를 설명하는 로봇 피킹 전문가

Ambi, ABB 및 Plus One 은이 무료 웹 세미나에서...

비디오 금요일 : RIVR은 패키지를 제공합니다

Video Friday는 친구가 수집 한 주별 멋진 로봇 비디오입니다....