atlas

Research map / Architectures and efficiency / Attention and transformers

A Lens into Interpretable Transformer Mistakes via Semantic Dependency

ICML 2025 · Architectures and efficiency › Attention and transformers · approach: Efficient language transformers

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Uses token-perturbation sensitivity in transformer final layers to measure semantic dependencies, showing tokens largely retain their own meaning, encode truthful dependencies, and that QA mistakes stem from falsely encoded dependencies in shared attention heads.

Problem

How semantic dependencies are encoded and propagated within transformer tokens, and how such encodings cause incorrect answers in models.

Approach

Measure token-level semantic dependency by randomly replacing one input token and quantifying how much each final-layer token changes; use this to test whether QA mistakes correspond to wrong answer tokens strongly influencing question tokens, and localize attention heads responsible.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Measure whether final-layer tokens retain their corresponding input-token informationTransformer models · Six datasetsself-information retention (%): 75.15 to 99.62 across modelsHelped
Measure propagation of input-token information to final-layer tokensTransformer models · Six datasetssequence-level semantic aggregation (%): 93.42 to 100.00 across modelsHelped
Compare final-layer dependency groups with SpaCy semantic dependency groupsTransformer models · GLUE dependency casesaverage alignment score (%): 82.44 to 93.41 across modelsHelped
Compare incorrect-answer and correct-answer dependencies on question tokensTransformer models · SQuAD 1.1 validation failure casesP(fθ) (%): 48.04 to 81.80 across modelsMixed
Use shared attention heads to encode both correct and false semantic dependenciesQA attention head groups · Failed QA casessemantic dependency encodingMixed
Add irrelevant context or change the order of independent context sequencesTransformer token dependency encoding · Independent sentence contextsdependency alteration scoreHurt

Surprising findings

Limitations

Experimental setup

Datasets: GSM8K Yelp GLUE CNN/DailyMail OpenOrca WikiText SQuAD 1.1

Benchmarks: SQuAD 1.1

Metrics: self-information retention percentage sequence-level aggregation percentage alignment score F1 percentage of false dependency cases

Baselines: attention flow head pruning

Builds on: Gandelsman et al. 2024 attention head decomposition perturbed masking

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy