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

Invio Automation, 자동화 평가 서비스 출시

Invio Automation은 위의 포장 절차에 사용된 것과 같은 맞춤형...

궤도 백업 인터넷을 위한 NATO의 비상 계획

2024년 2월 18일, 예멘 후티 반군의 미사일 공격으로 화물선이...

2024년 상위 10가지 에너지 스토리

IEEE 스펙트럼'2024년 가장 많이 읽힌 에너지 스토리는 더 많은...

IEEE, 엔지니어링 및 기술 부문 우수상 수상자를 발표하다

2025 IEEE 메달 및 표창 수상자를 만나보세요. 상은 다음을...