VAST: The Valence-Assessing Semantics Test for Contextualizing Language Models

Robert Wolfe, Aylin Caliskan

Abstract

VAST (Valence-Assessing Semantics Test) is a novel intrinsic evaluation task designed for contextualized word embeddings (CWEs). By leveraging "valence"—the human association of words with pleasantness—VAST measures the correspondence between language model (LM) semantics and human judgments. Applying VAST to GPT-2 and seven other models across seven languages reveals critical insights into how models encode meaning. We find that word-level semantics are often masked in top layers by high-magnitude neurons dedicated to syntax, but these meanings can be recovered through principal component nullification. Our results demonstrate that VAST identifies a "middle-layer" peak for semantic representation and provides a more accurate lens for measuring social bias and word similarity, achieving a state-of-the-art score of 0.50 on SimLex-999 for GPT-2.

Introduction

While large language models (LLMs) like GPT-2 and BERT have revolutionized natural language processing, evaluating the "intrinsic" quality of the word meanings they generate remains a challenge. Unlike static embeddings, contextualized word embeddings (CWEs) change based on surrounding text. Existing evaluation frameworks often fail to account for the nuances of contextualization, subword tokenization, and the internal geometry of the model.

VAST addresses these gaps by using valence as a universal semantic signal. Because humans generally agree on the pleasantness of words (e.g., "joy" vs. "death"), valence provides a stable benchmark to test how well a model's internal vectors align with human psychology.

Methodology

The VAST Algorithm

VAST employs the Single-Category Word Embedding Association Test (SC-WEAT) to determine how closely a specific word vector associates with "pleasant" versus "unpleasant" attribute words. The core metric is the Pearson’s correlation ($\rho$) between these model-derived associations and human-rated valence scores from established lexica, such as the Warriner (13,915 words), ANEW, and Bellezza datasets.

Contextual Settings

To isolate the effects of context, VAST evaluates words across four distinct environments:

  1. Random: The target word embedded in a random sentence from a Reddit corpus.
  2. Bleached: A neutral template (e.g., "This is [WORD]").
  3. Aligned: Context that matches the word's inherent valence.
  4. Misaligned: Context that clashes with the word's valence (e.g., a positive word in a negative sentence).

Principal Component (PC) Nullification

To investigate the geometry of the embedding space, the researchers used Principal Component Analysis (PCA) to identify dominant directions in the vector space. By mathematically nullifying high-magnitude components that do not contribute to semantic clarity, they attempted to recover "masked" word-level information.

Key Insights

The Middle-Layer Sweet Spot and Subword Assembly

In GPT-2, word-level semantics are not uniformly distributed. The study found that semantics are most stable and accurate around Layer 8. For common, singly-tokenized words, semantic representation is strong from the input layer (Layer 0). However, rare words broken into multiple subword tokens do not "assemble" into a coherent semantic representation until Layer 8, where they reach a Pearson's $\rho$ of 0.46.

The Syntax Mask in Top Layers

In the final layers of GPT-2 (e.g., Layer 12), the correlation with human valence typically drops significantly (to approximately $\rho = 0.32$). The authors discovered that this is not due to a loss of meaning, but rather a "masking" effect. A small number of high-magnitude neurons (as few as 8 out of 768) dominate the vector, encoding sentence-level syntax and next-word prediction features. By nullifying these non-semantic principal components, the valence correlation in the top layer jumped from 0.32 to 0.76.

Unmasking Social Bias

The "noise" in the top layers also obscures social biases. After isolating semantics through PC nullification, 8 out of 10 WEAT bias tests exhibited more stereotype-congruent biases. This suggests that non-semantic structures in LMs may hide the true extent of stereotypical associations within the model's weights.

Results and Validation

VAST's utility was validated against several classic word similarity benchmarks. By using VAST to identify optimal layers and applying de-noising techniques, the researchers achieved a score of 0.50 on SimLex-999 for GPT-2, surpassing the previous best of 0.45. Furthermore, the test proved robust across seven different languages using the MT5 model, confirming that valence is an effective cross-linguistic semantic probe.

Conclusion

VAST provides a powerful diagnostic tool for peering into the "semantic heart" of language models. It reveals that while top layers are optimized for task performance (like next-word prediction), the underlying word-level semantics remain present but obscured by syntactic geometry. Future work may leverage VAST to improve the training of rare subword tokens or to further investigate how specific syntactic features like tense and case interact with semantic encoding.

Summary updated

Abstract

VAST, the Valence-Assessing Semantics Test, is a novel intrinsic evaluation task for contextualized word embeddings (CWEs). VAST uses valence, the association of a word with pleasantness, to measure the correspondence of word-level LM semantics with widely used human judgments, and examines the effects of contextualization, tokenization, and LM-specific geometry. Because prior research has found that CWEs from GPT-2 perform poorly on other intrinsic evaluations, we select GPT-2 as our primary subject, and include results showing that VAST is useful for 7 other LMs, and can be used in 7 languages. GPT-2 results show that the semantics of a word incorporate the semantics of context in layers closer to model output, such that VAST scores diverge between our contextual settings, ranging from Pearson's rho of .55 to .77 in layer 11. We also show that multiply tokenized words are not semantically encoded until layer 8, where they achieve Pearson's rho of .46, indicating the presence of an encoding process for multiply tokenized words which differs from that of singly tokenized words, for which rho is highest in layer 0. We find that a few neurons with values having greater magnitude than the rest mask word-level semantics in GPT-2's top layer, but that word-level semantics can be recovered by nullifying non-semantic principal components: Pearson's rho in the top layer improves from .32 to .76. After isolating semantics, we show the utility of VAST for understanding LM semantics via improvements over related work on four word similarity tasks, with a score of .50 on SimLex-999, better than the previous best of .45 for GPT-2. Finally, we show that 8 of 10 WEAT bias tests, which compare differences in word embedding associations between groups of words, exhibit more stereotype-congruent biases after isolating semantics, indicating that non-semantic structures in LMs also mask biases.
BibTeX
@inproceedings{wolfe2022vast,
  author = {Robert Wolfe and Aylin Caliskan},
  title = {{VAST: The Valence-Assessing Semantics Test for Contextualizing Language Models}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  url = {https://openreview.net/forum?id=oTtKrkJkc5_},
}
Figure