Dmitri Piontkovski
2022
Acceptability Judgements via Examining the Topology of Attention Maps
Daniil Cherniavskii
|
Eduard Tulchinskii
|
Vladislav Mikhailov
|
Irina Proskurina
|
Laida Kushnareva
|
Ekaterina Artemova
|
Serguei Barannikov
|
Irina Piontkovskaya
|
Dmitri Piontkovski
|
Evgeny Burnaev
Findings of the Association for Computational Linguistics: EMNLP 2022
The role of the attention mechanism in encoding linguistic knowledge has received special interest in NLP. However, the ability of the attention heads to judge the grammatical acceptability of a sentence has been underexplored. This paper approaches the paradigm of acceptability judgments with topological data analysis (TDA), showing that the geometric properties of the attention graph can be efficiently exploited for two standard practices in linguistics: binary judgments and linguistic minimal pairs. Topological features enhance the BERT-based acceptability classifier scores by 8%-24% on CoLA in three languages (English, Italian, and Swedish). By revealing the topological discrepancy between attention maps of minimal pairs, we achieve the human-level performance on the BLiMP benchmark, outperforming nine statistical and Transformer LM baselines. At the same time, TDA provides the foundation for analyzing the linguistic functions of attention heads and interpreting the correspondence between the graph features and grammatical phenomena. We publicly release the code and other materials used in the experiments.
2021
Artificial Text Detection via Examining the Topology of Attention Maps
Laida Kushnareva
|
Daniil Cherniavskii
|
Vladislav Mikhailov
|
Ekaterina Artemova
|
Serguei Barannikov
|
Alexander Bernstein
|
Irina Piontkovskaya
|
Dmitri Piontkovski
|
Evgeny Burnaev
Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing
The impressive capabilities of recent generative models to create texts that are challenging to distinguish from the human-written ones can be misused for generating fake news, product reviews, and even abusive content. Despite the prominent performance of existing methods for artificial text detection, they still lack interpretability and robustness towards unseen models. To this end, we propose three novel types of interpretable topological features for this task based on Topological Data Analysis (TDA) which is currently understudied in the field of NLP. We empirically show that the features derived from the BERT model outperform count- and neural-based baselines up to 10% on three common datasets, and tend to be the most robust towards unseen GPT-style generation models as opposed to existing methods. The probing analysis of the features reveals their sensitivity to the surface and syntactic properties. The results demonstrate that TDA is a promising line with respect to NLP tasks, specifically the ones that incorporate surface and structural information.