---
title: "Representation and Pre-Activation of Lexical-Semantic"
description: "Derby and colleagues trace how GPT-2 and a recurrent network represent word meaning before and after a word appears, using human…"
canonical: "https://research.elamur.ai/free/en/papers/derby-2021-representation-pre-activation-lexical-semantic/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/derby-2021-representation-pre-activation-lexical-semantic/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2021](https://md.research.elamur.ai/free/en/papers/2021/) / Representation and Pre-Activation of Lexical-Semantic Knowledge in Neural Language Models

# Representation and Pre-Activation of Lexical-Semantic Knowledge in Neural Language Models

Paper · 2021 · Steven Derby, Paul Miller and Barry Devereux

**Authors:** Steven Derby, Paul Miller and [Barry Devereux](https://md.research.elamur.ai/free/en/authors/barry-devereux/) · **Year:** 2021 · **Venue:** Proceedings of the Workshop on Cognitive Modeling and Computational Linguistics · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Cited by **3** papers in our library of more than 163,000 papers whose bibliographies we read · Proceedings of the Workshop on Cognitive Modeling and Computational Linguistics · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2021.cmcl-1.25/)
- [PDF](https://aclanthology.org/2021.cmcl-1.25.pdf)
- [DOI 10.18653/v1/2021.cmcl-1.25](https://doi.org/10.18653/v1/2021.cmcl-1.25)

## Summary

A sentence can prepare a reader for a kind of thing before it names the thing itself. A reader might anticipate that the next word refers to something animate while remaining unsure which word will appear. Derby and colleagues ask whether networks trained to predict upcoming words develop a comparable kind of readiness. Their question concerns [lexical semantics](https://md.research.elamur.ai/free/en/concepts/lexical-semantics/), the study of word meaning, and specifically whether an internal representation makes information about a concept available before its name arrives. They compare GPT-2, a [transformer](https://md.research.elamur.ai/free/en/concepts/transformer/) that uses attention to combine information from earlier positions, with JLM, a recurrent network that carries a state forward through the sentence.

The authors collect sentences in which a target word occurs and read the networks’ internal states at the point where they must predict that word and again as they take it in. For each network layer and each of these positions, they average the states across the target’s contexts. The resulting vectors let them ask whether words are arranged in a way that agrees with human judgments of similarity and association, whether that arrangement resembles patterns in brain recordings, and whether a simple classifier can recover particular properties that people associate with a concept. The property test can ask, for instance, whether a representation of an apple supports a prediction that it grows on trees.

Human word judgments agree more closely with vectors built when the target is available. GPT-2 produces the strongest correlations in that condition, often in its earlier layers. Before the word arrives, the stronger representations tend to occur high in each network, and JLM leads on several of the word judgments. JLM also has the higher peak accuracy when vectors built with the target available are compared with either of BrainBench’s brain recording datasets. The relative performance of the networks thus depends on the evidence used to judge semantic content.

The property test gives a different account of what remains available as information passes through the layers. Explicit properties are most recoverable high in the networks, even when the target has already arrived and the networks are preparing to predict its successor. On the CSLB property norms, GPT-2’s best overall cross-validation F1 scores, reported on the paper’s ×100 scale, are 38.35 before the target and 45.72 with it available. JLM’s corresponding best scores are 32.85 and 41.14. GPT-2’s advantage lies chiefly in properties such as appearance, use and encyclopedic knowledge. The two networks reach nearly the same peak on taxonomic properties after receiving the word. The study shows which aspects of meaning can be recovered from states pooled across contexts that precede or contain a known target.

## Deep dive: Representation and Pre-Activation of Lexical-Semantic Knowledge in Neural Language Models

Derby and colleagues trace how GPT-2 and a recurrent network represent word meaning before and after a word appears, using human semantic evidence. · about 31 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Knowing what kind of word comes next

A [language model](https://md.research.elamur.ai/free/en/concepts/language-model/) trained on next-word prediction processes an unfinished sequence and assigns probabilities to possible continuations. As the input grows, the network updates the information available to make its next prediction. Derby and colleagues ask what that information is like from the point of view of someone interested in word meaning. A prediction system might learn which expressions tend to occur together, which grammatical forms fit a position, and which properties characterize the things that would make sense there. These are different accounts of what a useful internal state can contain.

The paper takes its cue from [psycholinguistics](https://md.research.elamur.ai/free/en/concepts/psycholinguistics/), which studies how people comprehend and produce language. In the account of earlier research given by the authors, readers and listeners can use an unfolding expression to prepare for upcoming material. The preparation may concern a particular word form. It can also concern a feature shared by several possible words, such as whether the thing referred to is animate. Evidence for one kind of preparation leaves room for the other. The analogy with next-word prediction is especially useful here because the experimenter can specify the exact point at which the network has yet to encounter the name of the concept.

The paper calls this question pre-activation. In its experimental sense, pre-activation concerns whether the state available immediately before a known target carries information aligned with that target’s meaning. Consider the distinction between recognizing a property of an apple once the word is present and carrying information relevant to apples in the prefix that precedes the word. The latter observation is possible even if several fruits would make sense in that prefix. An experiment can therefore look for semantic evidence in an internal state independently of asking whether the eventual continuation was the network’s highest-probability guess.

A second question begins as soon as the target enters the network. The current representation can include information from the new input and from the preceding words, but the next prediction concerns whatever follows. The authors ask whether conceptual information about the most recently encountered word remains available as processing shifts towards that new prediction. A layer comparison can show that one kind of evidence about the word becomes harder to recover while another remains accessible. This possibility is important because the paper uses several kinds of semantic evidence, all with different demands on the representation.

#### What earlier representation studies measured

The paper situates the study in a line of neural approaches to language prediction that includes [Bengio and colleagues’ neural probabilistic language model](https://md.research.elamur.ai/free/en/papers/bengio-2003-neural-probabilistic-language-model/) and the work on [deep contextualized word representations](https://md.research.elamur.ai/free/en/papers/peters-2018-deep-contextualized-word-representations/). In a contextual representation, a word’s vector depends on its surroundings. The vector for an occurrence of a word is an intermediate product of processing the sequence. It can carry evidence about the word itself, other words in the sentence, and the role the occurrence plays there. That makes such vectors useful for language tasks and raises a question about how to evaluate what any particular vector conveys.

By the authors’ account, researchers had examined a wide range of grammatical regularities in recurrent and attention-based networks. [Linzen and colleagues’ work on syntax-sensitive dependencies](https://md.research.elamur.ai/free/en/papers/linzen-2016-assessing-ability-lstms-learn-syntax/) and [Hewitt and Manning’s structural probe](https://md.research.elamur.ai/free/en/papers/hewitt-2019-structural-probe-finding-syntax-word/) are among the studies they cite. A common approach in the interpretability work they review is probing. A researcher takes recorded internal states and trains a separate predictor to recover a linguistic label. The experiment asks how much of the label information can be read using that predictor. A probe’s result depends on the states, the labels and the kind of readout the experiment permits.

The authors describe earlier work on semantic probing as comparatively limited. Koppula and colleagues trained decoders to recover preceding inputs from recurrent states. [Ettinger’s psycholinguistic diagnostics for BERT](https://md.research.elamur.ai/free/en/papers/ettinger-2020-what-bert-is-not-lessons/) found that some forms of event and role information were inferred more successfully than phenomena such as negation. Those examples illustrate the range of questions a semantic test can ask. Recovering a previous input assesses what survives from the sequence, while a diagnostic about an event can test whether a network uses a relevant relation in context. Derby and colleagues focus more narrowly on the properties and relationships associated with the concept denoted by a target word.

There was already evidence, in the work the paper reviews, that [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/) carry information about familiar concepts. Some studies used property norms, which are records of the features people produce when asked to describe a concept. For a frog, those responses can concern appearance or membership in a biological category. This gives researchers a way to ask about particular aspects of meaning, beyond whether one word tends to occur near another. The evidence reviewed in the paper also raised questions about uneven coverage, especially for visually grounded properties, and about how completely existing tests assessed the knowledge in the vectors.

#### Why use the same word at two positions?

The usual way of getting a contextual vector for a particular word is to process the word in its sentence and take a state associated with its position. The authors point out that earlier probes for conceptual information generally followed that pattern. A vector taken there can reflect what the network has learned about the word and what the current sentence contributes. To investigate anticipation, the researchers also need a state from the other side of a clear boundary, when only the preceding context has been processed.

Another strand of earlier work offers a way to make those states comparable across words. The authors cite [Ethayarajh’s analysis of contextual embedding geometry](https://md.research.elamur.ai/free/en/papers/ethayarajh-2019-how-contextual-are-contextualized-word/) for its use of naturally occurring contexts and its evidence that contextual vectors have a strongly uneven distribution of directions. They also draw on Bommasani and colleagues, who pooled vectors from contextual occurrences to create a fixed embedding for each word, then evaluated those embeddings on word similarity tasks. Pooling lets the experiment compare words at the level used by human benchmarks, whose scores are attached to a word or concept rather than to its occurrence in a particular corpus sentence.

Derby and colleagues use that approach on both sides of the target boundary. For a given word, they collect its preceding contexts and its contexts through the word itself from the same occurrences. This gives both conditions a common target vocabulary and a common source of sentences. What changes is the point at which they sample the states. With that comparison in place, the question becomes where in each network different kinds of information can be recovered, both when the context is preparing for the target and when the target becomes part of the context.

### The method, step by step

#### Choose networks that predict in reading order

The experiment requires a genuine prefix state. A network at the before position must have access to earlier words while the target remains unavailable as input. The authors therefore choose systems trained on left-to-right conditional prediction. At any position, the prediction is conditioned on material up to that point. The paper sets aside [BERT](https://md.research.elamur.ai/free/en/papers/devlin-2019-bert-pre-training-deep-bidirectional/) because its bidirectional setup does not meet the criterion the authors use for this particular comparison.

The recurrent system is the network from [Jozefowicz and colleagues’ language prediction study](https://md.research.elamur.ai/free/en/papers/jozefowicz-2016-exploring-limits-language-modeling/), abbreviated JLM. It uses convolutional processing of characters to construct input word embeddings. Those embeddings pass through two long short-term memory layers. An LSTM, or long short-term memory network, is a recurrent architecture that passes a state from one position to the next. JLM also uses projections that reduce dimensionality. Its final linear layer and softmax turn the network’s output into probabilities over a vocabulary of 800,000 words. Its training data come from the [One Billion Word Benchmark](https://md.research.elamur.ai/free/en/papers/chelba-2013-one-billion-word-benchmark-measuring/).

The attention-based system is GPT-2 (345M), with 24 multi-head attention layers. The paper traces the transformer architecture to [Attention Is All You Need](https://md.research.elamur.ai/free/en/papers/vaswani-2017-attention-all-need/). At a given position in GPT-2, attention allows information from preceding positions to contribute directly at each layer. JLM instead carries information forward in its recurrent states. Both architectures provide a sequence of layer representations at the position used to predict the target. The experiment uses those representations without changing either network’s prediction objective. The fitted predictors in the study are the separate readouts for the property task.

The two architectures create different meanings of a layer comparison. In JLM, the choice is between its first and second recurrent layers at the selected point in the sentence. In GPT-2, the comparison traces a much longer series of transformations of a position, with preceding states available through attention. Layer numbers are meaningful as positions within a network. A matching number across the networks does not itself specify equivalent computation.

#### Collect occurrences and align the target

The authors define a target vocabulary by intersecting the JLM vocabulary with the words used in their intrinsic benchmarks. An intrinsic benchmark evaluates the representations directly against an external semantic measure. It does not require the researchers to embed the vectors in a separate application. This choice makes common targets available for both networks and gives the researchers words for which the benchmarks can supply measurements.

For each target, the authors sample up to 500 sentences from the corpus. The target can appear anywhere except at the beginning. An occurrence at the start has no preceding word position to supply the before representation under this procedure. The ceiling applies to the contexts collected for each target, so the method does not presume that every target has the same number of available occurrences. The paper identifies the sampled material as training text for JLM, a detail that matters when comparing how informative the preceding contexts are for the two networks.

Each selected sentence supplies the location of the target. Up to the preceding position, the left-to-right network can use the prefix to prepare a prediction. A state taken at that position is the before state. A state taken as the target becomes available supplies the after condition. Here, *after* refers to processing the target at its location in the sequence. The later continuation of the sentence has no role in the states being sampled.

GPT-2 uses byte-pair encoding, a form of [subword tokenization](https://md.research.elamur.ai/free/en/concepts/subword-tokenization/) that can divide a written word into multiple input units. The before state comes from the token immediately preceding the first unit of the target. For the after condition, the authors average the representations from the positions belonging to the target. Those positions can include states formed while only part of the target has been processed. The resulting vector represents the target’s span under the paper’s pooling rule. For a target that occupies a single position, that position alone supplies the after state.

Building and evaluating layerwise representations around a target word The steps in order.

#### Average occurrences into a word vector

The authors next turn a collection of contextual states into a single vector for each word, layer and condition. Take all the before states for an individual target at the chosen layer and average them coordinate by coordinate. Then do the same for the after states from that layer. The same procedure is applied to each target and repeated at each layer. These are static vectors in the sense that the finished representation assigns a fixed vector to a word in a given layer and condition. The states from which it was built still depend on the sentences.

The paper indexes the target position by occurrence. The alignment between a sentence and its target is:

```
Sᵢ[tᵢ] = w,   1 ≤ i ≤ K
```

Here `w` is the target word in the chosen vocabulary. `K` is the number of sampled sentences for that word, `i` indexes those sentences, and `Sᵢ` is the sentence indexed by `i`. The position `tᵢ` is where the target occurs in that sentence. Square brackets select the content at a position, and `=` states that the selected word is `w`. The bounds `1 ≤ i ≤ K` include the first through the last sampled sentence. This is the word-level alignment. The GPT-2 extraction rule supplies the corresponding token positions when a word spans multiple units.

The pooled representation at the prediction point is:

```
before[w]ᴸ = (1/K) ∑ᵢ₌₁ᴷ fᴸ(Sᵢ)[tᵢ−1]
```

`before[w]ᴸ` is the vector for target `w` at layer `L` in the before condition. The function `fᴸ` gives the network’s contextual representations at layer `L`. Applied to `Sᵢ`, it supplies the states for that sentence, and `[tᵢ−1]` selects the position just before its target. The subtraction by `1` moves the selection back one position. `∑ᵢ₌₁ᴷ` adds the selected vectors over the sampled sentences, and `1/K` divides by their count to take the mean. Because prediction proceeds left to right, the selected representation depends only on input available through the selected position.

The pooled representation with target input is:

```
after[w]ᴸ = (1/K) ∑ᵢ₌₁ᴷ fᴸ(Sᵢ)[tᵢ]
```

`after[w]ᴸ` is the after vector for the same target `w` and layer `L`. `fᴸ(Sᵢ)[tᵢ]` now selects the state at the target in sentence `Sᵢ`. When a target occupies several GPT-2 input positions, the within-target average takes the place of this single selected state. `∑ᵢ₌₁ᴷ` again sums over occurrences, with `i` running through the `K` sentences, and `1/K` turns the sum into an average. Each occurrence contributes one vector after the within-word pooling step.

In the paper’s result labels, the name in front identifies the network, the bracketed value identifies the layer, and the suffix gives the target condition. Thus `GPT2[5]-before` is the collection of word vectors built from GPT-2’s fifth attention layer at the positions preceding their targets. This label identifies a complete vocabulary of vectors for evaluation. An individual word within that vocabulary has its own mean, formed from the sentences in which it was the selected target.

A before vector for a word is formed by using knowledge of which word actually followed the prefix in the corpus. That knowledge is used to group the states after they have been recorded. The network computing an individual state sees just the prefix; the researchers assembling the word vector know which group receives that state. Pooling asks whether prefixes that end up leading to the same word share enough evidence to produce a useful representation of that word. This distinction between what the network sees and what the experimenter uses to group examples is central to the meaning of the results.

#### Compare relationships between words

The first evaluation compares the geometry of the pooled vectors with human judgments. For each benchmark pair, the authors use cosine similarity, which measures how closely the vectors point in the same direction. They then compare the ordering of the resulting similarities with the ordering of the human scores using Spearman correlation. This is a rank-based measure. A strong score means that the representation tends to order the benchmark pairs as the raters do, even if the numerical similarity values have a different scale from the ratings.

The paper distinguishes [semantic similarity](https://md.research.elamur.ai/free/en/concepts/semantic-similarity/) from relatedness. Coffee and tea share attributes and can occupy comparable places in a sentence. Coffee and cup are connected through common use and can naturally occur together. Different instructions to raters can put more weight on one kind of relationship. Accordingly, a representation can agree strongly with a benchmark for association while agreeing less well with one designed to isolate resemblance. The authors use several datasets to keep that distinction visible, and they report using the Vecto-ai Python package for the evaluations.

#### Compare whole profiles with brain recordings

BrainBench uses brain imaging data collected while participants viewed concept words. The paper takes the fMRI and MEG data as separate sources of evidence. For each, the authors compare a pattern of relationships from the recordings with a pattern of relationships from one of the pooled embedding sets. Each concept is characterized by how it relates to the other concepts in the benchmark. This gives both the embedding data and the brain data a matching coordinate system at the level of concept relationships, even though their underlying measurements differ.

The authors construct pairwise correlation matrices with the same concepts on their rows and columns. In a matrix, the row for a word supplies its similarity profile. BrainBench considers a pair of words and asks whether the profiles agree better when each word is matched to itself across the two data sources, or when their identities are exchanged. The paper writes the test as:

```
r(Mᴰ(w₁), Mᴮ(w₁)) + r(Mᴰ(w₂), Mᴮ(w₂))
>
r(Mᴰ(w₁), Mᴮ(w₂)) + r(Mᴰ(w₂), Mᴮ(w₁))
```

`Mᴰ` is the pairwise matrix for the distributional representations, and `Mᴮ` is its counterpart for the brain data. `w₁` and `w₂` are the words in the pair. A matrix name followed by a word in parentheses indicates that word’s row, with the columns corresponding to the tested pair left out as described by the authors. `r` is Pearson correlation, which measures the linear agreement of the two remaining profiles. Each `+` adds the correlations for one assignment. The `>` sign means the same-word assignment must achieve a larger sum than the exchanged assignment for that comparison to count as correct. The final accuracy is the proportion of correct comparisons over the word pairs, with 0.5 as the chance level.

This task tests the arrangement of concepts relative to one another. A useful embedding set is one in which the right correspondence between concept profiles is recoverable across the two sources. The distinction matters because a score from the test is an accuracy for a matching decision. It does not express a correlation with every dimension of the original brain signal, and it has a different interpretation from Spearman correlation on word judgments.

#### Train a readout for each human-elicited property

The final evaluation uses the CSLB norms. These norms record properties elicited from people for 638 concept words. The paper groups the properties into visual, functional, taxonomic, encyclopedic and other perceptual categories. Visual features concern qualities such as shape and color. Functional features concern what something is for or what people do with it. Taxonomic labels place a concept in a category, as in classifying an apple as a fruit. Encyclopedic labels concern knowledge such as vitamin content or fuel use, and the other perceptual class includes properties concerning experiences such as taste or sound.

The labels turn a feature into a prediction problem over concepts. For example, the readout for roundness estimates whether a vector belongs to a concept marked with that property. A separate logistic regression is fitted for each retained property. Logistic regression uses a weighted combination of the vector’s coordinates to estimate whether the label applies. Its linear readout restricts the form of the evidence it can recover. A successful prediction shows that a readout of that form can make use of some pattern in the pooled vectors.

Properties listed for fewer than five words are filtered out. For each remaining property, the concepts are divided into five folds using stratified sampling, which aims to maintain the balance of labeled and other concepts across the folds. In 5-fold cross-validation, each fold serves as a test portion while the others supply training examples. The authors also balance the class weights during fitting. This changes the influence of the classes on training when a property has relatively few positive examples.

To moderate overfitting, the authors add a penalty to the logistic regression loss. They describe the added term as:

```
λ ‖β‖₂
```

`β` denotes the vector of fitted coefficients, and `‖β‖₂` is its L2 norm, a measure of the magnitude of the coefficient vector. The double bars denote the norm, and the subscript `2` specifies its L2 form. `λ` scales the penalty. The authors choose a penalty strength for each property by running 5-fold cross-validation over candidate values and keeping the value that performs best for that property.

With the chosen value, they use test-fold predictions to compute F1, a measure that balances precision and recall for the property decision. Precision concerns how often predicted positives are labeled positive. Recall concerns how many labeled positives are recovered. F1 is useful here because predicting that a rare property is absent for nearly every concept could otherwise make a classifier look successful under ordinary accuracy. The cross-validation scoring procedure is repeated three times and the scores are averaged. The paper reports them multiplied by 100. As a result, its tabulated F1 numbers use a different scale and answer a different question from the accuracy proportions reported for BrainBench.

### Experiments and results

#### Agreement with word judgments

The association datasets are WordSim353-rel and MEN. The similarity datasets are WordSim353-sim and [SimLex-999](https://md.research.elamur.ai/free/en/papers/hill-2015-simlex-999-evaluating-semantic-models/), called SimLex999 in the results. The authors also evaluate the original WordSim353 ratings, which they treat as spanning the distinction between similarity and relatedness. These tests use human scores for word pairs. The agreement reported for each is Spearman correlation between those scores and the cosine similarities derived from the embedding set being evaluated.

The comparison uses each of JLM’s layers in both conditions. For GPT-2, the paper’s table shows the best layer separately for each benchmark and condition. Its layerwise figure shows how correlations change across all 24 layers. The table’s best entries indicate the peaks reached by the extraction procedure. A different layer can supply each of those peaks, so they describe the best result for each individual comparison.

On MEN, JLM’s higher before correlation is 0.423 at its second layer, and the GPT-2 before peak is 0.409 at layer 23. With the target available, JLM reaches 0.644 in its first layer. GPT-2 reaches 0.730 at layer 6. The chart compares the individual JLM layers with the strongest GPT-2 layer in that same condition. MEN assesses relatedness, so high agreement here includes the kinds of practical and contextual connections that can hold between quite different things.

MEN relatedness after target input across JLM layers and the best GPT-2 layer The strongest GPT-2 layer leads, and JLM’s earlier layer agrees more closely with the human ratings than its later layer.

**The numbers**

| System or setting | Spearman correlation |
| --- | --- |
| JLM layer 1 after | 0.644 |
| JLM layer 2 after | 0.544 |
| GPT-2 layer 6 after (this paper) | 0.730 |

The other relatedness dataset, WordSim353-rel, likewise favors JLM at the prediction point and GPT-2 after the word arrives. The best before correlations are 0.314 for JLM’s second layer and 0.251 for GPT-2 at layer 23. With the target available, JLM’s first layer yields 0.444, while GPT-2 reaches 0.544 at layer 2. Thus the architecture with the higher score changes when the measurement includes the target itself, in both benchmarks that emphasize relatedness.

On WordSim353-sim, JLM reaches 0.549 in its second before layer and 0.709 in its first after layer. The corresponding GPT-2 peaks are 0.439 at layer 23 before the target and 0.749 at layer 8 with the target available. For the original WordSim353 judgments, JLM’s peaks are 0.428 before and 0.557 after, from its second and first layers respectively. GPT-2’s peaks on the original judgments come from layers 23 and 2, with a before correlation of 0.334 and an after correlation of 0.612.

SimLex999 gives a useful qualification to the general story about depth. GPT-2’s best before correlation there is 0.124 at layer 3, in contrast to the concentration of before peaks at layer 23 on the other word judgment benchmarks. Its best after correlation is 0.561, also at layer 3. JLM’s two before correlations on this benchmark are 0.151 at its first layer and 0.115 at its second. Its after scores are 0.409 and 0.423 in layer order. This is an instance where JLM’s deeper after layer has the higher score, although on the other human word judgment sets the earlier after layer leads. It is also a case where moving upward in JLM lowers agreement in the before condition.

Across the word benchmarks, each network’s best correlations rise when the target enters the input, and GPT-2 achieves the higher after peak on each benchmark. JLM’s before peaks are higher across these benchmarks. Layer selection is an important part of the comparison. Most of GPT-2’s before peaks on word judgments occur close to its output, while all of its after peaks on these judgments occur earlier in the stack. The paper’s figure shows a pronounced deterioration in the last GPT-2 after layer. When the test concerns the arrangement of words according to human judgments, the states most useful just before a word and the states most useful once it is present generally come from different depths.

#### Agreement with brain data

BrainBench covers 60 concept words and provides brain recordings from fMRI and MEG. The authors apply the profile-matching test separately to each dataset. All the BrainBench values in the paper’s main table are accuracy proportions. Though the paper’s figure plots accuracy on a percentage scale, the reported chance level for the test is 0.5. The comparison asks whether the similarity profiles identify the correct words across the representation and recording data.

In the fMRI comparison, JLM’s before scores are 0.636 at its first layer and 0.650 at its second. GPT-2’s peak before score is 0.627 at layer 23. Receiving the target brings JLM’s best fMRI accuracy to 0.681 in its first layer, while GPT-2 peaks at 0.673 in layer 14. The same condition that gives GPT-2 the lead on the word judgments thus gives JLM a narrow lead on the fMRI comparison.

BrainBench fMRI matching accuracy after target input JLM’s first layer provides the highest accuracy, with GPT-2’s best layer close behind.

**The numbers**

| System or setting | accuracy proportion |
| --- | --- |
| JLM layer 1 after (this paper) | 0.681 |
| JLM layer 2 after | 0.669 |
| GPT-2 layer 14 after | 0.673 |

MEG shows a different ordering in the before condition. GPT-2 peaks at 0.648 in layer 23, while JLM reaches 0.638 in its second layer. After the target, JLM reaches 0.701 in its first layer and 0.692 in its second. GPT-2 achieves its best MEG accuracy of 0.696 in layer 16. JLM therefore has the higher after peak for both recording methods. The before comparison favors JLM on fMRI and GPT-2 on MEG.

The best GPT-2 after layers on BrainBench occur later than its best after layers on the word judgment tests. This is another reason to keep the benchmarks distinct when describing where meaning appears in the network. BrainBench rewards a representation that preserves the relationships needed to identify a concept’s recording profile. The judgment benchmarks reward the ordering of pairs according to explicit ratings. A layer can be particularly effective under one criterion without being the strongest under the other.

#### Decoding conceptual properties

The CSLB results are averages of cross-validation F1 scores on the paper’s ×100 scale. The table gives results by property category and overall. The best GPT-2 layer is chosen separately for each category and condition, as it was for each benchmark in the word judgment table. The highest overall GPT-2 before score comes from layer 23, which also supplies the best before score in each property category. After the target is supplied, layer 21 gives the best overall score, and the category peaks occur in layers 21 and 23.

Overall CSLB property decoding with before and after target representations The target improves property decoding in both networks, and GPT-2 has the higher best score in each condition.

**The numbers**

| System or setting | average cross-validation F1 ×100 |
| --- | --- |
| JLM layer 1 before | 28.56 |
| JLM layer 2 before | 32.85 |
| GPT-2 layer 23 before | 38.35 |
| JLM layer 1 after | 40.01 |
| JLM layer 2 after | 41.14 |
| GPT-2 layer 21 after (this paper) | 45.72 |

In the before condition, the higher JLM row for every property category comes from layer 2. For encyclopedic properties, that row scores 26.41, while GPT-2’s layer 23 scores 30.94. On functional properties, the corresponding CSLB F1 scores are 30.22 and 35.25. Visual properties yield 32.66 for JLM and 36.25 for GPT-2, and the other perceptual category yields 33.39 and 38.12. Taxonomic properties give the highest scores for both networks in this condition, with JLM at 47.75 and GPT-2 at 51.95. The upper-layer states used to predict the word therefore provide evidence for several kinds of properties of the actual continuation, with category membership particularly accessible to the readout.

In the after condition, JLM’s second layer again yields its strongest results in each property category. GPT-2’s layer 23 scores 37.69 on encyclopedic properties, compared with JLM’s 33.86. For functional properties, GPT-2 reaches 42.74 at layer 21, while JLM reaches 39.06. The best visual results are 42.47 at GPT-2 layer 23 and 39.32 at JLM layer 2. For other perceptual properties, the corresponding scores are 43.98 and 40.01, with the GPT-2 peak again occurring at layer 23.

Taxonomy has a different pattern once the word is present. JLM reaches 62.82 at its second layer and GPT-2 reaches 62.79 at layer 23. The two peaks are very close, and JLM’s is slightly higher. In descriptive terms, GPT-2’s advantage in the overall after result comes from the attributive categories, which cover the features outside taxonomy. Those are the categories in which earlier distributional work, as described by the authors, had found particular difficulty. Taxonomy is still the category with the strongest readout in each network.

The property results also qualify a simple account of the last part of the network as a stage at which meaning about the current word fades away. In JLM, the second after layer gives the stronger property scores throughout the category table even though the first usually gives stronger agreement with human word judgments and has higher BrainBench accuracy. In GPT-2, the best after scores for properties are near the top, considerably later in the stack than the peaks for word judgments. The layerwise property figure therefore supports a claim about the accessibility of particular features in the upper layers, alongside the earlier peaks found for the geometry of word relationships.

### What the ablations show

The paper reports no component-removal ablation. Its analyses compare input timing, depth, network and type of semantic evidence, with the extraction procedure held common where those comparisons allow it. These comparisons locate differences in the recorded representations. The networks are run with their ordinary prediction computation in every condition.

#### What changes when the target arrives

The nearest comparison to a controlled change in the input is the contrast between before and after states. Within a network and layer, both sets of word vectors are derived from the same target occurrences. Reading the state at the earlier position tests the evidence supplied by the preceding context. Reading at the target tests the representation as the context incorporates the word. In GPT-2, the target-side operation includes pooling over its pieces where applicable. Access to the target and the shift to its position are part of the same comparison.

The change improves the best scores on the word judgment tests and on BrainBench for both networks. The property results also rise throughout the reported category comparisons. This shows how much the availability of the concept’s own word can matter across quite different measures. It also shows why the before vectors are interpretable as a distinct source of evidence. For example, a pre-target vector can support the detection of taxonomic properties on CSLB without an input state for the target itself. The result is consistent with prefixes carrying constraints about the kinds of entities likely to follow, even when those constraints are shared by several continuations.

The after scores by themselves combine the contribution of the lexical input with the rest of the prior context. The before condition establishes that some target-aligned evidence was already accessible at the preceding position. Comparing the pair shows the combined effect of receiving the word and advancing the sequence. The experiment does not break that effect into separate contributions from the word form, contextual integration and the change in what needs to be predicted next.

#### Why depth answers different semantic questions

The layer comparisons show that the location of a useful representation depends on the target’s role in the prediction. Before the target, the upper layers are generally stronger, particularly for property decoding. The paper’s interpretation is that states closer to the prediction output reflect the semantic constraints relevant to the word about to be predicted. The comparisons support that interpretation most clearly where the before scores peak high in the stack, with the SimLex999 results providing a reminder that the tendency depends on the measure.

For a word that has already been supplied, the effects of depth diverge by task. In JLM, properties become more accessible from the first to the second after layer, while most word judgment comparisons and both BrainBench comparisons favor the first. GPT-2 makes the divergence visible across a greater span. Early and intermediate layers yield its best after results on word relationships and brain profiles, while the property results peak in upper layers. This gives a concrete reason to distinguish preserving familiar relationships between concepts from retaining enough information for a linear classifier to identify a particular feature.

The authors connect weaker word judgment results at the top of the after condition to the shift in prediction. At that point the network must prepare for the following word, so the geometry may become less centered on the concept just supplied. The property results show that such a shift can coexist with continued access to details about that concept. That combination fits the authors’ suggestion that semantic details can be retained as part of the context useful for anticipating subsequent material.

The discussion also considers the weakness of the final layer in light of earlier work on how GPT-2 representations vary with context. The authors highlight a problem for taking simple means of states that may occupy quite different parts of the representation space. The reported layer comparison identifies a fall in the quality of some pooled final-layer vectors. It leaves open how much is due to the prediction objective at that position and how much is due to averaging states whose useful information is expressed differently across contexts. The study applies the same pooling strategy as it changes layers, so it tests the performance of that strategy at each depth.

#### What the category comparisons add

A single overall property score would conceal the difference between labeling a category and retrieving its members’ attributes. Taxonomic features are the most accessible class throughout the reported comparison. With the target present, the two networks achieve almost identical peaks on that class. GPT-2 has the stronger results for each of the other classes in the same condition. This pattern gives the paper’s claim about attributive knowledge a more precise basis than the overall advantage alone.

The taxonomic result also helps explain why the different tasks can tell apparently different stories about architecture. A representation may make category labels easy to read and still place the concepts differently when a benchmark emphasizes contextual association. JLM has the stronger before peaks on the human word judgments, while GPT-2 makes more CSLB properties decodable before the target. These outcomes can coexist because the Spearman tests use the unmodified ordering of cosine similarities, whereas each CSLB probe learns which coordinates are informative for one feature.

The architecture comparison does not isolate a contribution from attention or recurrence. The paper suggests that JLM’s exposure to the sampled sentences could help explain its strong before results on the word judgment benchmarks. It also raises incremental recurrence as a possible explanation for JLM’s BrainBench performance. Those explanations are distinct. Prior exposure concerns the fit between the network and the corpus, while the second suggestion concerns how the network processes a sequence. The design measures the representations produced by the two trained systems and provides no independent manipulation that would decide between those accounts.

### Limitations

#### Limits identified by the authors

The authors caution that human property norms are an indirect account of conceptual knowledge. They record features that participants produce and agree on. That gives the experiment explicit labels with which to test the vectors. A list of those responses leaves open how people represent the concept internally and how their knowledge is used at a given moment in comprehension. A strong classifier for a CSLB label establishes a relationship with a human-elicited property under this measurement.

The authors also caution against interpreting a weak property score as evidence that the underlying state lacks the feature. Their probe is linear and sees only the pooled vector. A feature could be difficult for that readout to recover because it is encoded in a way that requires a different transformation. It could also be accessible in some individual contexts and become harder to extract once they have been averaged. The reported scores establish what the trained logistic regression can read under the chosen procedure.

They identify contextual variation as a limitation of pooling itself. Occurrences of the same word come with different surrounding material, and their vectors can differ substantially. The discussion draws on Ethayarajh’s observation that the geometry of GPT-2 states changes with layer and that accounting for the overall distribution of vectors matters in assessing such variation. An average gives a convenient word-level representation, but the degree to which a mean is representative can differ across layers. The earlier success of pooled contextual vectors on word-level tests motivates the method while leaving that source of variation in place.

The authors similarly treat human word judgments as dependent on the context of the assessment, the pairs people see and the instructions they receive. Their use of benchmarks for both resemblance and broader association is a response to that issue. Agreement with a benchmark is evidence about the kind of relationship the benchmark measures. It can change when a different set of pairs or a different conception of similarity is used.

#### What follows from the experimental setup

The central restriction of the before condition is that the researchers select and group prefixes using the word that actually occurred. This makes the analysis possible and defines its scope. The results show that an embedding formed from prefixes that preceded a particular concept can preserve evidence about that concept. They leave the status of an individual prefix open. A single context could point clearly to one concept, fit a broad category, or contain a recurring expression that frequently leads to a particular word. These possibilities can all contribute to the mean and can be hard to distinguish once the contexts are pooled.

For the same reason, the results do not count how often the network anticipated the exact continuation, or how frequently a feature classifier would recover an appropriate property in a single sentence. The word benchmarks use a rank ordering over pairs of pooled vectors. The property experiment evaluates prediction across concept vectors assembled from many occurrences. A finding at that level can motivate an interpretation in terms of anticipation, but it does not specify how consistently that anticipation occurs. Nor does an accessible property establish that the normal output computation relies on it to make a prediction. The probe evaluates availability, while reliance would require evidence about what happens to the prediction when the information is changed.

The authors’ comparison with human preparedness is therefore best understood as an interpretation of the pattern. In their discussion of Ferreira and Chantavarin, preparedness means building a rich representation from the new input, preceding material and background knowledge so that future input can be interpreted. The paper finds that upper layers keep features of a concept accessible after its name enters the network. BrainBench adds evidence about the relationship between representational profiles and recordings elicited by viewing concept words. It does not record people processing the same prefixes at the same target boundaries. The study gives a correspondence at the level of concepts, while matching the time course or mechanism of human anticipation remains a separate question.

The comparison between GPT-2 and JLM is also limited to those systems and the corpus used to build their vectors. Their input representations and depths differ, and the sampled corpus contributed to JLM’s training. The authors themselves raise that exposure when interpreting JLM’s before performance. It remains possible that contextual familiarity helps one network on particular benchmarks. The performance rankings consequently apply to these trained systems under this extraction procedure. The left-to-right selection also limits the conclusions to networks for which the before condition can be formed as defined in the paper.

The vocabulary and property filters further define what is covered. Target words come from the intersection with JLM’s vocabulary, and a word needs usable occurrences with preceding context. The CSLB probe omits features listed for fewer than five words. These choices give the experiments a common vocabulary and enough positive examples to fit the property readouts. They leave very sparsely attested features outside the property results. The pooling step also treats the target as a single word type, so the reported scores do not specify which senses or kinds of context were responsible for its vector.

There are two qualifications to the interpretation of the strongest numerical results. The GPT-2 table entries select the best layer on the benchmark being reported. They show where a score peaks on that benchmark. They do not measure how well a layer chosen in advance would transfer to a fresh benchmark. For the CSLB analysis, the paper describes cross-validation for choosing a penalty and cross-validation for scoring with that penalty. It does not describe an independent outer split for assessing the full procedure that includes penalty selection. The resulting F1 values are most directly read as estimates under the reported selection and scoring procedure. The small differences in some peak comparisons, such as the after taxonomy scores, are descriptive score orderings. The paper does not establish a reliable advantage from that ordering alone.

### What came after

No later study is identified as extending these experiments or adopting the paper’s method. The connection to preparedness in human comprehension runs in the other direction. The authors use Ferreira and Chantavarin’s earlier account to interpret why conceptual attributes remain accessible high in a network after their target has appeared. Whether those retained attributes directly help predict the following word, and whether the same pattern holds for individual contexts before a target, remain open questions from the study.

## Cite

Cite as Steven Derby, Paul Miller and Barry Devereux. 2021. Representation and Pre-Activation of Lexical-Semantic Knowledge in Neural Language Models. Proceedings of the Workshop on Cognitive Modeling and Computational Linguistics.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2021.cmcl-1.25](https://doi.org/10.18653/v1/2021.cmcl-1.25)

```bibtex
@inproceedings{derby2021representation,
  title = {{Representation and Pre-Activation of Lexical-Semantic Knowledge in Neural Language Models}},
  author = {Steven Derby, Paul Miller and Barry Devereux},
  booktitle = {Proceedings of the Workshop on Cognitive Modeling and Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.cmcl-1.25},
  url = {https://doi.org/10.18653/v1/2021.cmcl-1.25}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
