[Paper Review] What do you learn from context? Probing for sentence structure in contextualized word representations
The paper introduces edge probing tasks to analyze what information contextualized word embeddings encode about sentence structure, showing strong syntactic encoding but more limited semantic gains beyond lexical baselines, with BERT delivering notable improvements.
Contextualized representation models such as ELMo (Peters et al., 2018a) and BERT (Devlin et al., 2018) have recently achieved state-of-the-art results on a diverse array of downstream NLP tasks. Building on recent token-level probing work, we introduce a novel edge probing task design and construct a broad suite of sub-sentence tasks derived from the traditional structured NLP pipeline. We probe word-level contextual representations from four recent models and investigate how they encode sentence structure across a range of syntactic, semantic, local, and long-range phenomena. We find that existing models trained on language modeling and translation produce strong representations for syntactic phenomena, but only offer comparably small improvements on semantic tasks over a non-contextual baseline.
Motivation & Objective
- Motivate probing of contextualized word representations to understand what linguistic information is encoded at each token position.
- Introduce edge probing as a uniform framework to assess syntactic and semantic structure using fixed-context embeddings.
- Evaluate four major contextual models (CoVe, ELMo, GPT, BERT) across a broad suite of sub-sentence tasks.
- Compare contextualized representations against lexical baselines to isolate the contribution of contextual information.
Proposed method
- Define an edge probing task design that casts each NLP labeling task as predicting binary labels on token spans or pairs of spans.
- Use a fixed, pretrained encoder to generate contextual vectors and a span pooling + MLP classifier to predict task labels.
- Probing model accesses only embeddings within given spans, ensuring analysis reflects information available to the encoder.
- Examine eight labeling tasks (POS, constituents, dependencies, named entities, SRL, coreference, SPR, relation classification) derived from OntoNotes and UD treebanks.
- Compare four encoders (CoVe, ELMo, GPT, BERT) with lexical baselines and extended baselines (CNN on top of lexical features, random ELMo) to gauge architectural vs. pretrained effects.
Experimental results
Research questions
- RQ1What information about sentence structure is encoded at each token position by contextualized embeddings?
- RQ2To what extent do contextual representations capture syntactic versus semantic phenomena?
- RQ3How much of the observed gains come from architecture versus pretraining and long-range dependencies?
- RQ4Do contextual models rely primarily on local context or do they encode long-range dependencies?
- RQ5How do different models (CoVe, ELMo, GPT, BERT) compare on a diverse set of sub-sentence tasks?
Key findings
- Contextual embeddings generally improve over lexical baselines on syntactic tasks (e.g., dependencies and constituents) more than on semantic tasks.
- ELMo and GPT outperform CoVe significantly; BERT further improves with larger gains especially on coreference, with BERT-large achieving substantial reductions in error on several tasks.
- Scalar mixing (mix) of layer activations often yields better results than simple concatenation, particularly for deep Transformer models like BERT and GPT.
- On semantic tasks, gains are present but smaller; semantic proto-roles and Winograd-style coreference show more limited improvements, though relation classification benefits markedly from contextual encoding.
- A CNN-based local context extension explains most of the gains on syntactic tasks, while certain semantic tasks benefit from true long-range information provided by the full encoders.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.