[Paper Review] Finding Experts in Transformer Models
This paper introduces a method to identify and leverage 'expert units'—neurons in pre-trained Transformer models that classify specific concepts with high average precision—using a dataset of 1,641 concepts from the OneSec dataset. It demonstrates that expert unit quality strongly correlates with model generalization (R² = 0.833), enables concept-conditioned text generation without fine-tuning by activating only top experts, and enables explainability through concept co-learning analysis.
In this work we study the presence of expert units in pre-trained Transformer Models (TM), and how they impact a model's performance. We define expert units to be neurons that are able to classify a concept with a given average precision, where a concept is represented by a binary set of sentences containing the concept (or not). Leveraging the OneSec dataset (Scarlini et al., 2019), we compile a dataset of 1641 concepts that allows diverse expert units in TM to be discovered. We show that expert units are important in several ways: (1) The presence of expert units is correlated ($r^2=0.833$) with the generalization power of TM, which allows ranking TM without requiring fine-tuning on suites of downstream tasks. We further propose an empirical method to decide how accurate such experts should be to evaluate generalization. (2) The overlap of top experts between concepts provides a sensible way to quantify concept co-learning, which can be used for explainability of unknown concepts. (3) We show how to self-condition off-the-shelf pre-trained language models to generate text with a given concept by forcing the top experts to be active, without requiring re-training the model or using additional parameters.
Motivation & Objective
- To investigate whether specialized neurons (expert units) exist in pre-trained Transformer models and how they relate to model performance.
- To develop a method for identifying and ranking expert units without fine-tuning or additional parameters.
- To explore how expert units can be used to condition text generation on specific concepts.
- To quantify concept co-learning via expert overlap for improved model explainability.
- To establish a correlation between expert quality and model generalization across diverse downstream tasks.
Proposed method
- Define a concept as a binary set of sentences (positive/negative), using 1,641 concepts from the OneSec dataset.
- Treat individual neurons in Transformer models as candidate expert units and compute their average precision (AP) for concept classification.
- Apply max-pooling over token-level neuron activations to make the method invariant to sequence length.
- Rank expert units by their AP score and define a metric called 'concept expertise' as the average AP of top experts.
- Use the product of experts formulation to self-condition pre-trained language models by activating only the top expert units for a target concept.
- Propose an empirical method to determine the optimal expertise threshold (AP > 0.985) that maximizes correlation with generalization performance.
Experimental results
Research questions
- RQ1Do expert units exist in pre-trained Transformer models, and how do they correlate with model generalization?
- RQ2Can expert units be used to condition text generation on specific concepts without fine-tuning or additional parameters?
- RQ3How can expert overlap between concepts be used to quantify and explain concept co-learning?
- RQ4What is the optimal threshold of expert quality (AP) that maximizes correlation with downstream generalization?
- RQ5Can expert units be used to rank models without requiring fine-tuning on downstream tasks?
Key findings
- The quality of expert units is strongly correlated with model generalization, with an R² of 0.833 between concept expertise and average performance across GLUE and SQuAD tasks.
- The optimal expert quality threshold for maximizing generalization correlation is AP > 0.985, indicating that extremely high-precision experts are critical for strong generalization.
- Only 0.012% of neurons (top 50 out of 414,720) are needed to condition GPT-2-L to generate text rich in a specific concept, such as 'football%1:04:00', without retraining.
- Concept overlap between experts provides a meaningful measure of co-learning, enabling explainability of how related concepts are represented in the model.
- The method enables model comparison and ranking without fine-tuning, reducing downstream task bias and hyperparameter search.
- Self-conditioning via expert activation successfully generates contextually relevant text, as shown in Figure 1, where 'TM' is interpreted in a sporting sense and 'coach' and 'shooting' are prominently featured.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.