Abstract
Work done to uncover the knowledge encoded within pre-trained language models rely on annotated corpora or human-in-the-loop methods. However, these approaches are limited in terms of scalability and the scope of interpretation. We propose using a large language model, ChatGPT, as an annotator to enable fine-grained interpretation analysis of pre-trained language models. We discover latent concepts within pre-trained language models by applying agglomerative hierarchical clustering over contextualized representations and then annotate these concepts using ChatGPT. Our findings demonstrate that ChatGPT produces accurate and semantically richer annotations compared to human-annotated concepts. Additionally, we showcase how GPT-based annotations empower interpretation analysis methodologies of which we demonstrate two: probing frameworks and neuron interpretation. To facilitate further exploration and experimentation in the field, we make available a substantial ConceptNet dataset (TCN) comprising 39,000 annotated concepts.
Introduction
Despite the ubiquity of pre-trained language models (pLMs) like BERT and RoBERTa, they remain "black boxes." Understanding the specific knowledge encoded within their internal representations is a significant challenge. Traditional interpretability methods, such as "probing," test if a model recognizes specific concepts like parts of speech. However, these methods suffer from limited scalability due to the need for manual human labeling, a narrow scope restricted to pre-defined linguistic categories, and a lack of granularity for niche concepts (e.g., "terms related to ice hockey"). This research aims to overcome these bottlenecks by using Large Language Models (LLMs) to automatically discover and label latent concepts hidden within pLMs.
Methodology
The proposed pipeline consists of three main stages: Concept Discovery, Concept Labeling, and Validation/Application.
- Concept Discovery: Text from the WMT News 2018 dataset (250,000 sentences) is passed through a pLM to extract contextualized representations. Agglomerative Hierarchical Clustering (AHC) is then applied to group these vectors into clusters, each representing a "latent concept."
- Concept Labeling: Instead of manual annotation, ChatGPT is used as a zero-shot annotator. It receives a list of words from a cluster and generates a concise descriptive label.
- Validation & Application: The labels are validated via human evaluation and applied to interpretability techniques like probing classifiers and neuron analysis.
The authors introduced the Transformers Concept-Net (TCN), a massive benchmark containing 39,000 annotated concepts extracted from BERT, RoBERTa, XLNet, ALBERT, and XLM-RoBERTa.
Results and Discussion
The study found that LLMs are highly effective annotators, often surpassing human performance in identifying complex semantic relationships. Human evaluators rated 90.7% of ChatGPT’s labels as "acceptable," and in head-to-head comparisons with the human-annotated BERT Concept Net (BCN), ChatGPT’s labels were superior or equivalent in 75.5% of cases.
A key insight is the discovery of highly granular concepts. For instance, while traditional probing might look for "adverbs," this method identified specialized sub-groups like "adverbs of time" or "adverbs of frequency." This granularity revealed that "general" neurons are often composed of specialized sub-groups. Furthermore, probing classifiers trained on these GPT-labeled concepts achieved high accuracy (often >0.90), confirming that these clusters represent stable knowledge within the models.
Limitations and Future Work
While powerful, the method has limitations. ChatGPT’s safety filters occasionally refuse to label clusters containing sensitive content, which can hinder the study of model biases. Additionally, the static nature of LLM training data means annotators require updates as language evolves. Future work could leverage this framework for "Model Editing"—identifying and modifying specific neurons to alter a model's behavior.
Conclusion
By using LLMs as automated "interpretability officers," this research enables the scalable and detailed labeling of hidden concepts in pre-trained models. The resulting TCN dataset provides a rich resource for cross-architectural comparisons and deeper insights into the internal mechanics of modern language models.
Summary updated