TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/Can BERT eat RuCoLA? Topological Data Analysis to Explain

Can BERT eat RuCoLA? Topological Data Analysis to Explain

Irina Proskurina, Irina Piontkovskaya, Ekaterina Artemova

2023-04-04Text ClassificationTopological Data AnalysisLinguistic Acceptability
PaperPDFCodeCode(official)

Abstract

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.

Results

TaskDatasetMetricValueModel
Linguistic AcceptabilityRuCoLAAccuracy85.7Ru-RoBERTa+TDA
Linguistic AcceptabilityRuCoLAMCC0.594Ru-RoBERTa+TDA
Linguistic AcceptabilityRuCoLAAccuracy80.1Ru-BERT+TDA
Linguistic AcceptabilityRuCoLAMCC0.478Ru-BERT+TDA
Linguistic AcceptabilityCoLAMCC0.726BERT+TDA
Linguistic AcceptabilityCoLAMCC0.695RoBERTa+TDA

Related Papers

Making Language Model a Hierarchical Classifier and Generator2025-07-17GNN-CNN: An Efficient Hybrid Model of Convolutional and Graph Neural Networks for Text Representation2025-07-10The Trilemma of Truth in Large Language Models2025-06-30Robustness of Misinformation Classification Systems to Adversarial Examples Through BeamAttack2025-06-30Lipschitz Bounds for Persistent Laplacian Eigenvalues under One-Simplex Insertions2025-06-26Perspectives in Play: A Multi-Perspective Approach for More Inclusive NLP Systems2025-06-25The Shape of Consumer Behavior: A Symbolic and Topological Analysis of Time Series2025-06-24TDACloud: Point Cloud Recognition Using Topological Data Analysis2025-06-23