Can BERT eat RuCoLA? Topological Data Analysis to Explain
Not on the map. Why?
Abstract (arXiv)
This paper investigates how Transformer language models (LMs) fine-tuned for acceptability classification capture linguistic features. Our approach uses the best practices of topological data analysis (TDA) in NLP: we construct directed attention graphs from attention matrices, derive topological features from them, and feed them to linear classifiers. We introduce two novel features, chordality, and the matching number, and show that TDA-based classifiers outperform fine-tuning baselines. We experiment with two datasets, CoLA and RuCoLA in English and Russian, typologically different languages. On top of that, we propose several black-box introspection techniques aimed at detecting changes in the attention mode of the LMs during fine-tuning, defining the LM's prediction confidences, and associating individual heads with fine-grained grammar phenomena. Our results contribute to understanding the behavior of monolingual LMs in the acceptability classification task, provide insights into the functional roles of attention heads, and highlight the advantages of TDA-based approaches for analyzing LMs. We release the code and the experimental results for further uptake.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 20 of its 40 references that are in the map. First posted on arXiv 4 Apr 2023.
Builds on
20 of 40 references.
References · 20
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
- 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 994
- 2018Neural Network Acceptability Judgmentscited by 952
- 2021Measuring and Improving Consistency in Pretrained Language Modelscited by 361
- 2019Revealing the Dark Secrets of BERTcited by 300
- 2020A Survey of the State of Explainable AI for Natural Language Processingcited by 206
- 2020A Diagnostic Study of Explainability Techniques for Text Classificationcited by 158
- 2020When Do You Need Billions of Words of Pretraining Data?cited by 104
- 2021Artificial Text Detection via Examining the Topology of Attention Mapscited by 49
8 more
- 2021Automatic Text Evaluation through the Lens of Wasserstein Barycenterscited by 38
- 2021How transfer learning impacts linguistic knowledge in deep NLP models?cited by 32
- 2020How Furiously Can Colourless Green Ideas Sleep? Sentence Acceptability in Contextcited by 26
- 2022RuCoLA: Russian Corpus of Linguistic Acceptabilitycited by 26
- 2020Linguistic Profiling of a Neural Language Modelcited by 23
- 2022Acceptability Judgements via Examining the Topology of Attention Mapscited by 19
- 2021Shaking Syntactic Trees on the Sesame Street: Multilingual Probing with Controllable Perturbationscited by 10
- 2022BERTops: Studying BERT Representations under a Topological Lenscited by 5
Built on by
Citing papers per year: 2024: 3; 2025: 1; 2026: 1.
5 papers.
- 2025Hallucination Detection in LLMs with Topological Divergence on Attention Graphscited by 18
- 2026Text summarization via global structure awarenesscited by 11
- 2024TaeBench: Improving Quality of Toxic Adversarial Examplescited by 2
- 2024Topological Data Analysis Applications in Natural Language Processing: A Surveycited by 2
- 2024Exploring the Effectiveness of Methods for Persona Extractioncited by 0
- 2026Text summarization via global structure awareness10 Feb 2026
- 2025Hallucination Detection in LLMs with Topological Divergence on Attention Graphs14 Apr 2025
- 2024Topological Data Analysis Applications in Natural Language Processing: A Survey15 Nov 2024
- 2024TaeBench: Improving Quality of Toxic Adversarial Examples8 Oct 2024
- 2024Exploring the Effectiveness of Methods for Persona Extraction12 Jul 2024