BERT Rediscovers the Classical NLP Pipeline

Tenney et al., 2019, BERT Rediscovers the Classical NLP Pipeline (Proceedings of the 57th Annual Meeting of ACL)

Subscriber deck — free during early access

17 cards

1 Introduction

  1. What is the main finding of “BERT Rediscovers the Classical NLP Pipeline”?
    BERT represents the steps of the traditional NLP pipeline in an interpretable, localizable way, and the layers responsible for each step appear in the expected order: POS tagging, parsing, NER, semantic roles, then coreference. On individual sentences, though, it can revise lower-level decisions using higher-level information.
    lowhighPOS tagsconstituents, dependenciesentitiessemantic rolescoreferencesyntax: localizedsemantics: spread out
    Schematic order of where each kind of information is encoded across BERT’s layers (aggregate trend)
  2. How does structural probing differ from behavioural analysis of models?
    Behavioural work designs controlled test sets and analyses errors to infer what abstractions a model uses; structural probing inspects the network’s internal representations directly to find localizable regions associated with particular linguistic decisions. Tenney et al. take the structural route.

2 Model

  1. What is edge probing?
    A common format for structured prediction tasks: a probing classifier gets one or two spans, \(s_1 = [i_1, j_1)\) and optionally \(s_2 = [i_2, j_2)\), and predicts a label (e.g. constituent or relation type), seeing only the contextual vectors within the spans, so it must rely on the encoder for information about the spans’ roles.
  2. Which eight probing tasks did Tenney et al. use?
    Part-of-speech tags, constituents, dependencies, entities, semantic role labeling, coreference, semantic proto-roles (SPR), and relation classification (SemEval), all scored with micro-averaged F1.
  3. Why are BERT’s weights frozen when probing?
    To learn how the network represents language as a result of pretraining: fine-tuning would let the encoder rearrange its internal representations to suit the probing task.
  4. What are the limits of inspection-based probing, according to Tenney et al.?
    Not finding a pattern doesn’t prove it isn’t there, and finding one doesn’t say how the model uses it, so structural analysis should be combined with behavioural studies.

3.1 Scalar Mixing Weights

  1. How do scalar mixing weights show which BERT layers matter for a task?
    As in ELMo, the probe pools layers as \(h_{i,\tau} = \gamma_\tau \sum_{\ell=0}^{L} s_\tau^{(\ell)} h_i^{(\ell)}\) with \(s_\tau = \text{softmax}(a_\tau)\), learned jointly with the probe on training data; higher weights suggest a layer holds more task-relevant information. The summary is the center of gravity \(\bar{E}_s[\ell] = \sum_\ell \ell \cdot s_\tau^{(\ell)}\).

3.2 Cumulative Scoring

  1. What is cumulative scoring in Tenney et al.?
    Train probes \(P_\tau^{(\ell)}\) that may use layers 0 to \(\ell\) (layer 0 alone is a non-contextual baseline); the differential score \(\Delta_\tau^{(\ell)} = \text{Score}(P_\tau^{(\ell)}) - \text{Score}(P_\tau^{(\ell-1)})\) measures how much layer \(\ell\) adds, measured on evaluation data.
  2. What is the expected layer statistic, and how does it differ from the mixing-weight center of gravity?
    \(\bar{E}_\Delta[\ell] = \frac{\sum_{\ell=1}^{L} \ell \cdot \Delta_\tau^{(\ell)}}{\sum_{\ell=1}^{L} \Delta_\tau^{(\ell)}}\), roughly the layer at which an example gets resolved (ignoring those resolved at layer 0). Mixing weights come from training data and say which layers the probe finds useful; cumulative scores come from evaluation data and say how many layers are needed.
  3. Why can’t a probe on a single layer tell where a label becomes predictable?
    Information about a span may be spread across several layers, and the encoder may discard information in higher layers; cumulative probes see all layers up to \(\ell\), so performance can only grow with access to more information.

4 Results

  1. In what order are linguistic tasks encoded across BERT-large’s layers?
    Both metrics agree: POS tags earliest, then constituents and dependencies, then semantic roles and coreference. Basic syntax appears earlier in the network, high-level semantics in higher layers, consistent with Peters et al. (2018b).
  2. How does the localization of syntactic and semantic information differ in BERT?
    Syntactic information is localizable: mixing weights concentrate on a few layers. Semantic information (relations, proto-roles) is spread across the network: weights are close to uniform and examples are resolved gradually across nearly all layers.
  3. Why do differential scores peak early (layers 1–7) while mixing weights peak later (layers 9–20) in BERT-large?
    Many examples can be resolved early from shallow heuristic cues, while hard examples need later layers; the highest mixing weights fall on or just after the last layers that still improve F1 for the task.
  4. How does BERT-base compare with BERT-large in the probing results?
    The same general ordering holds, with a “stretching effect”: each task’s representations concentrate at the same layers relative to the top of the model.

4.1 Per-Example Analysis

  1. How can BERT revise lower-level decisions? Give an example from Tenney et al.
    In “he smoked toronto in the playoffs …”, early layers tag toronto as a city (GPE); once the semantic role is resolved (toronto is what got “smoked”, ARG1), the entity type is revised to ORG, the sports team. The pipeline order holds on average but not for every example.
  2. What happened to “china today” in Tenney et al.’s per-example analysis?
    In “china today blacked out a cnn interview”, today was first tagged as a common noun, date and temporal modifier; higher layers reinterpreted “china today” as a proper noun (a TV network), updating the entity type to ORG and the semantic role to agent (ARG0).

5 Conclusion

  1. What do Tenney et al.’s results suggest about deep language models and linguistic abstraction?
    They can represent the syntactic and semantic abstractions traditionally thought necessary for language processing, in roughly pipeline order, and also model complex interactions between levels, using high-level information like predicate–argument relations to disambiguate low-level decisions like part of speech.

Source