Linguistic Profiling of a Neural Language Model

TL;DR

Using 68 probing tasks, the study finds BERT loses linguistic information after fine-tuning, while more readable representations improve NLI accuracy.

cs.CL 🔴 Advanced 2020-10-05 33 views
Alessio Miaschi Dominique Brunato Felice Dell'Orletta Giulia Venturi
BERT probing interpretability native-language identification fine-tuning

Key Findings

Methodology

The authors analyze BERT-base cased, a 12-layer, 768-hidden-unit Transformer. For each layer, the [CLS] sentence representation feeds a Linear Support Vector Regression probe that predicts 68 lexical, morphosyntactic, and syntactic features extracted from Universal Dependencies. Performance is measured with Spearman’s rank correlation coefficient ρ under 5-fold cross-validation and compared with a sentence-length correlation baseline. BERT is then fine-tuned on 10 binary Native Language Identification tasks from TOEFL11; probing and sentence-level error analyses are repeated.

Key Results

  • Pre-trained BERT outperformed the length baseline across every feature group: overall ρ was 0.68, while Vocabulary and TreeStructure both reached 0.78; POS reached 0.68, VerbInflection 0.72, and VerbPredicate 0.60. Thus, the representations contain more than simple length cues.
  • On TOEFL11, fine-tuned BERT achieved 70.03%–85.74% accuracy, versus 52.61%–59.29% for the Zero Rule baseline. KOR-ITA was best at 85.74%, whereas SPA-ITA was lowest at 70.03%, broadly reflecting typological distance from Italian.
  • Fine-tuning generally reduced probing precision, especially in higher layers and for Italian versus German, French, and Spanish. Yet correctly classified sentences usually had lower probing MSE than incorrect ones, linking readable linguistic information to successful downstream prediction.

Significance

The paper connects representational knowledge with concrete model behavior. It shows that pre-trained BERT stores broad linguistic information, but task adaptation can trade this general competence for task-specific signals. Academically, the result sharpens the study of transfer learning and catastrophic knowledge loss beyond aggregate accuracy. Practically, it suggests that a high-performing classifier may still have degraded general linguistic representations, while probing scores on individual inputs could serve as an auxiliary reliability diagnostic. The work therefore reframes interpretability as both a property of representations and a predictor of decisions.

Technical Contribution

The study combines van Halteren’s linguistic-profiling perspective with the probing-task framework of Conneau et al. It supplies a unified pipeline spanning 68 features, 12 BERT layers, one pre-trained model, and 10 fine-tuned models. LinearSVR tests low-capacity linear accessibility; Spearman ρ evaluates recovery of continuous linguistic measurements; Ward hierarchical clustering reveals cross-level organization rather than a simple annotation hierarchy. Wilcoxon rank-sum tests and sentence-level MSE comparisons connect representation quality with correct versus incorrect NLI predictions, extending probing from static capability measurement toward task-conditioned behavioral analysis.

Novelty

Prior work established that BERT encodes surface, syntactic, and semantic properties, often through attention analysis or isolated probes. This paper’s central novelty is to compare linguistic profiles before and after downstream fine-tuning and to test whether the retained information predicts sentence-level success. It does not introduce a new architecture or training objective; instead, its contribution is an unusually broad empirical bridge among layerwise linguistic encoding, task-specific adaptation, typological difficulty, and prediction correctness.

Limitations

  • Probe accuracy is not proof of causal use. LinearSVR may exploit indirect correlates, and compressing a sentence into one [CLS] vector can miss token-level information or allow shortcuts such as length.
  • The evidence is restricted to English UD annotations and TOEFL11 learner essays, with Italian paired against other languages in binary tasks. Fixed prompts, genre, and learner effects limit transfer to natural multilingual text.
  • Correlations and Wilcoxon significance do not identify which feature drives a decision; causal interventions are absent.

Future Work

Future research should add token-level and compositional probes, counterfactual sentences, masking, and representation editing to test causal dependence. Broader multilingual, multi-genre, and multi-task evaluations are needed, as are controls for sentence length and prompt effects. Parameter-efficient fine-tuning, continual-learning constraints, representation distillation, or auxiliary linguistic losses could be tested to preserve general linguistic knowledge without sacrificing downstream accuracy.

AI Executive Summary

Neural language models often make accurate predictions without revealing what they know. This paper examines BERT through three questions: which sentence-level linguistic properties are encoded across its 12 layers, how Native Language Identification (NLI) fine-tuning changes them, and whether that knowledge affects classification. The authors use 23,943 sentences from UD English-ParTUT, GUM, and English Web Treebank, plus TOEFL11 essays representing 11 first languages.

The method is deliberately broad. A LinearSVR probe receives each layer’s [CLS] representation and predicts 68 features covering sentence length, lexical richness, POS distributions, verb inflection, dependency structure, word order, and subordination. With 5-fold cross-validation and Spearman ρ, pre-trained BERT reaches 0.68 overall, including 0.78 for Vocabulary and TreeStructure, above a length-based baseline. After fine-tuning on ten Italian-versus-other-language tasks, accuracy ranges from 70.03% to 85.74%, compared with 52.61%–59.29% for Zero Rule; KOR-ITA is strongest and SPA-ITA weakest.

The central result is a trade-off. Fine-tuning generally makes higher-layer representations less precise for linguistic probing, particularly when distinguishing typologically similar languages. Nevertheless, correctly classified sentences tend to have lower probing mean-square error than incorrect ones, even for the pre-trained model. Linguistic readability therefore correlates with task success, although it does not establish causation. The study offers a useful diagnostic framework, while leaving open whether future interventions can preserve general language knowledge during specialization.

Deep Analysis

Background

Research on BERT has used neuron analysis, attention inspection, representation correlations, and probing tasks to show that contextual embeddings encode surface, morphosyntactic, syntactic, and semantic information. Jawahar et al. reported lower-layer surface sensitivity and higher-layer syntactic/semantic sensitivity; Tenney et al. described a pipeline-like progression. What remained less clear was whether encoded information is used for downstream decisions and how much is lost during task adaptation.

Core Problem

The paper asks what BERT knows before fine-tuning, how NLI training changes that knowledge, and whether sentence-level linguistic competence predicts correct classification. The challenge is separating genuine structure from sentence-length shortcuts, measuring many heterogeneous properties consistently, and linking representational accessibility to behavior rather than merely reporting probe accuracy.

Innovation

The work makes three advances. First, it creates a unified linguistic profile from 68 features across raw, lexical, morphosyntactic, and syntactic levels. Second, it compares one pre-trained BERT with ten NLI-specialized versions under the same probes. Third, it combines layerwise analysis, Ward clustering, Wilcoxon tests, and sentence-level MSE. The resulting clusters cross traditional annotation boundaries, showing that BERT’s organization is empirical rather than strictly pipeline-like.

Methodology

  • �� Data: 23,943 UD sentences from ParTUT, GUM, and EWT; ten TOEFL11 binary subsets, each pairing Italian essays with one other L1 and averaging 33,756 sentences.
  • �� Representations: BERT-base cased, 12 layers and 768 hidden units; extract [CLS] activations.
  • �� Probes: train LinearSVR models for 68 feature values; evaluate with 5-fold Spearman ρ and compare with sentence-length correlations.
  • �� Structure: cluster layerwise feature profiles using Euclidean distance and Ward variance minimization.
  • �� Behavior: fine-tune on NLI, repeat probing, and compare absolute errors and MSE for correctly versus incorrectly classified sentences using Wilcoxon rank-sum tests.

Experiments

The pre-training profile uses gold UD annotations. For each of ten NLI pairs, 50% of the data is used for training/development and 50% for testing, with 40% and 10% assigned to training and development. NLI is evaluated by accuracy against Zero Rule. The final analysis separates correct and incorrect sentences, compares probe errors, and trains an additional length-only LinearSVR to test whether apparent differences are merely caused by longer correct sentences.

Results

Average pre-trained ρ scores are RawText 0.68, Vocabulary 0.78, POS 0.68, VerbInflection 0.72, VerbPredicate 0.60, TreeStructure 0.78, Order 0.72, SyntacticDep 0.69, and Subord 0.71, versus overall baseline 0.38. Fine-tuning lowers high-layer probe scores, most strongly for SPA-ITA, FRE-ITA, and GER-ITA. Verb-tense features such as VBZ and VBD decline significantly across models, likely because common prompts make them poor NLI cues.

Applications

The framework can audit fine-tuning, diagnose NLI errors, evaluate educational NLP systems, and monitor whether model specialization preserves general linguistic competence. Teams could track probe ρ and input-level probe error alongside task accuracy to detect brittle reliance on surface cues. Deployment requires multilingual validation and careful interpretation: probe accessibility should be treated as evidence about representations, not a complete explanation of decisions.

Limitations & Outlook

The study focuses on English representations, learner essays, and binary NLI. Shared prompts and genre may suppress useful morphology, while typological conclusions are based on Italian-centered pairs. Linear probes reveal accessibility but not causal use; [CLS] also compresses token information. The experiments do not compare alternative fine-tuning objectives or establish whether preserving probe scores improves robustness. Future work should add causal interventions, multilingual natural text, token-level analyses, and knowledge-preserving adaptation.

Plain Language Accessible to non-experts

Imagine BERT as an editor who has read an enormous library. Researchers first give the editor 23,943 English sentences and inspect a compact memory card for each sentence. They ask simple questions: How long is it? How varied are its words? What kinds of words appear? What form do the verbs take? How are the main parts of the sentence connected? The editor does well on 68 families of questions, meaning the memory card contains much more than a crude measure of length.

Next, the editor is trained for a special contest: guess whether an English learner’s first language is Italian or something else. The contest works well, reaching 70.03%–85.74% accuracy, but specialization has a cost. After training, the editor becomes less precise about some general language patterns, especially when comparing Italian with closely related languages. It is like learning a secret style code while paying less attention to ordinary writing structure.

The clearest sentences for the editor are also usually the ones it classifies correctly. Still, this is a relationship, not proof that one particular grammar clue caused the answer.

ELI14 Explained like you're 14

Think of BERT as a super-powered game character that reads English and tries to guess a writer’s first language. Before the real game, researchers test its hidden memory with 68 mini-quiz types: Is the sentence long? Are the words varied? Is a verb in the past? Where do the subject and object go? It is not asked to explain itself; researchers simply check whether the answers can be pulled from its memory.

BERT performs strongly. Then it trains for ten versions of a language-guessing game using TOEFL11 essays. Its accuracy reaches 70.03% to 85.74%, while a dumb strategy that always picks the common choice gets only 52.61% to 59.29%. The Korean-Italian game is easiest for BERT at 85.74%; Spanish-Italian is hardest at 70.03%.

Here is the twist: training for the game can make BERT forget some ordinary language patterns, especially for similar languages. It is like practicing one map in a video game until you stop remembering other maps. Sentences BERT gets right usually have clearer hidden language information. But correlation is not magic proof—another experiment is needed to show exactly what makes it win!

Glossary

BERT

A Transformer language model that builds contextual representations using information from both directions. This paper uses BERT-base cased with 12 layers and 768 hidden units.

It is the model profiled, fine-tuned, and represented through [CLS].

Probing task

A supervised test asking whether a representation makes a particular property recoverable. Success shows accessibility, not necessarily causal use by the original model.

The study defines 68 probes over UD-derived linguistic features.

LinearSVR

A linear support-vector regression algorithm that fits continuous targets while controlling margin-based error and complexity. Its limited capacity makes it a diagnostic probe.

It predicts every linguistic feature from layer-specific [CLS] vectors.

Spearman’s ρ

A rank-correlation measure assessing whether predicted and gold values have similar ordering. It is robust to monotonic rather than strictly linear relationships.

It is the cross-validated probing metric.

Fine-tuning

Continued training of a pre-trained model on a task-specific dataset. It can improve task performance while reducing accessibility of general knowledge.

BERT is fine-tuned on ten TOEFL11 NLI pairwise tasks.

Native Language Identification

Classification of a writer’s first language from production in another language. Linguistic transfer patterns can provide the discriminative evidence.

It is the downstream task, centered on Italian-versus-other L1 pairs.

Open Questions Unanswered questions from this research

  • 1 High probe scores may reflect indirect cues rather than knowledge used by the classifier. Masking, counterfactual rewriting, and representation editing are needed to establish causal dependence.
  • 2 It remains unclear whether the observed trade-off persists in multilingual natural text, other genres, larger models, and generative systems rather than English learner essays.

Applications

Immediate Applications

Fine-tuning audit

Model developers can run selected probes before and after adaptation, tracking ρ for POS, lexical, and syntactic features. A sharp drop can flag loss of general competence even when downstream accuracy rises, guiding checkpoint selection or regularization.

NLI error diagnosis

Educational and assessment platforms can compare probe MSE for correct and incorrect sentences. Features with especially large gaps can guide targeted data augmentation, human review, or curriculum design for difficult learner-language distinctions.

Long-term Vision

Knowledge-preserving adaptation

Future training systems could combine task loss with representation distillation, probe-based regularization, or auxiliary linguistic objectives. The goal is a model that specializes in classification while retaining broad, auditable language structure.

Abstract

In this paper we investigate the linguistic knowledge learned by a Neural Language Model (NLM) before and after a fine-tuning process and how this knowledge affects its predictions during several classification problems. We use a wide set of probing tasks, each of which corresponds to a distinct sentence-level feature extracted from different levels of linguistic annotation. We show that BERT is able to encode a wide range of linguistic characteristics, but it tends to lose this information when trained on specific downstream tasks. We also find that BERT's capacity to encode different kind of linguistic properties has a positive influence on its predictions: the more it stores readable linguistic information of a sentence, the higher will be its capacity of predicting the expected label assigned to that sentence.

cs.CL cs.AI