Looking into Black Box Code Language Models
Muhammad Umair Haider, Umar Farooq, A.B. Siddique, Mark Marron

TL;DR
This paper investigates the inner workings of code language models by analyzing feed-forward layers, revealing how different layers encode syntax, semantics, and context size, which aids in understanding and improving these models.
Contribution
It provides novel insights into the roles of feed-forward layers in code LMs, highlighting their organization, editability, and layer-specific functions across multiple programming languages.
Findings
Lower layers capture syntactic patterns.
Higher layers encode abstract concepts and semantics.
Early layers predict smaller contexts accurately.
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMultimedia Communication and Technology
MethodsSoftmax · Attention Is All You Need · Focus
