TL;DR
This paper introduces a method to convert powerful but complex contextualized word embeddings (like BERT) into simpler, static embeddings. This allows us to leverage existing, mature interpretability tools for static embeddings to better understand what these modern models have learned, including their representational quality and social biases.
What Problem Does This Paper Address?
The NLP community has largely shifted from static word embeddings (like Word2Vec and GloVe) to contextualized representations (like ELMo and BERT). While these new embeddings offer superior performance, they are significantly more complex and computationally expensive. This complexity makes them harder to interpret, and many established interpretability methods developed for static embeddings have become underutilized. The authors aim to bridge this gap by creating a way to "distill" contextualized embeddings into static ones, enabling the application of existing interpretability techniques to these advanced models.
Methods
The core of the paper is a two-step process for converting contextualized embeddings to static ones:
- Subword Pooling: For a given word in a specific context, a contextualized model produces multiple vector representations (often from subword tokens). This step involves pooling these subword vectors into a single vector for that word in that context. The authors explore four pooling strategies: min, max, mean, and taking the last vector.
- Context Combination: To obtain a single, context-agnostic static embedding for a word, this step combines the vectors derived from multiple contexts. Two main approaches are proposed:
- Decontextualized: The word is fed into the model in isolation (a single context).
- Aggregated: The model processes the word in many different contexts, and these resulting vectors are then pooled (using mean, max, or min) to create a single static embedding.
Datasets
The paper uses several standard datasets for evaluating word similarity and relatedness:
- Word Similarity/Relatedness Datasets: RG65, WS353, SIMLEX999, and SIMVERB3500.
- Corpus for Context Aggregation: English Wikipedia, lightly preprocessed.
Key Insights and Ideas
- Bridging the Interpretability Gap: The primary insight is that mature interpretability tools for static embeddings can be effectively repurposed for contextualized embeddings by converting them to a static form.
- Pooling Matters: Aggregating representations across multiple contexts (the "Aggregated" strategy) significantly outperforms the "Decontextualized" approach, suggesting that a single context is insufficient for capturing a word's full semantic meaning.
- Layer-wise Bias is Significant: Social biases are not uniformly distributed across the layers of contextualized models. This has important implications for model selection and understanding bias.
- Bias Estimator Inconsistency: A surprising finding is the dramatic inconsistency between different bias estimation methods, even when applied to the same embeddings. This raises concerns about the reliability of current bias quantification techniques.
- Contextualized Embeddings Outperform Static Baselines: Even the distilled static embeddings derived from contextualized models significantly outperform traditional static embeddings like Word2Vec and GloVe on intrinsic evaluation tasks.
Key Results
- Representational Quality: The proposed method, particularly using mean pooling across many contexts (Aggregated strategy), yields static embeddings that substantially outperform Word2Vec and GloVe on word similarity and relatedness tasks. For instance, BERT-24 embeddings distilled from later layers with a large number of contexts (N=1M) significantly outperform the baselines.
- Layer Preferences: For intrinsic evaluation, the early layers (0-3) of models like BERT often show the best performance, aligning with findings on where lexical semantic information is encoded. However, as the number of aggregated contexts (N) increases, the optimal layer tends to shift towards later layers.
- Cross-Model Consistency: The general trends observed (e.g., the effectiveness of mean pooling, the benefit of larger N, and layer-wise tendencies) hold across various pretrained models, despite known differences in their behavior.
- Social Bias: The study reveals disparate encoding of social biases (gender, race, religion) across different models and layers. For example, while some models show increasing bias in later layers, others show different patterns. The paper also highlights significant inconsistencies between bias estimators, making it difficult to draw definitive conclusions about the "true" bias of an embedding.
Limitations and Future Work
- Information Loss: The paper acknowledges that it's unclear exactly what information is lost when converting complex contextualized embeddings to static ones, given the inherent richness of context.
- Proxy Validity: The authors question the extent to which these static embeddings are truly reliable proxies for the original contextualized models, though their performance suggests they capture significant semantic information.
- Theoretical Explanations: The paper calls for theoretical explanations for why learning contextualized representations and then reducing them to static embeddings outperforms directly learning static embeddings. They also seek reasons for the benefits of variance reduction through averaging.
- Bias Measurement Reliability: The significant inconsistencies between bias estimators are a major limitation, suggesting that current methods may not reliably capture social biases. Future work could explore more robust bias quantification or investigate why these inconsistencies arise.
- Downstream Performance: While intrinsic evaluation shows strong results, the paper suggests future work should explore downstream task performance gains from these improved static embeddings, especially for resource-constrained settings.
- Domain Adaptation: The authors suggest exploring domain-specific corpora for context aggregation as a potential lightweight domain adaptation strategy.
Summary updated