The Topological BERT: Transforming Attention into Topology for Natural Language Processing
Not on the map. Why?
Abstract (arXiv)
In recent years, the introduction of the Transformer models sparked a revolution in natural language processing (NLP). BERT was one of the first text encoders using only the attention mechanism without any recurrent parts to achieve state-of-the-art results on many NLP tasks. This paper introduces a text classifier using topological data analysis. We use BERT's attention maps transformed into attention graphs as the only input to that classifier. The model can solve tasks such as distinguishing spam from ham messages, recognizing whether a sentence is grammatically correct, or evaluating a movie review as negative or positive. It performs comparably to the BERT baseline and outperforms it on some tasks. Additionally, we propose a new method to reduce the number of BERT's attention heads considered by the topological classifier, which allows us to prune the number of heads from 144 down to as few as ten with no reduction in performance. Our work also shows that the topological model displays higher robustness against adversarial attacks than the original BERT model, which is maintained during the pruning process. To the best of our knowledge, this work is the first to confront topological-based models with adversarial attacks in the context of NLP.
Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Builds on 22 of its 40 references that are in the map. First posted on arXiv 30 Jun 2022.
Builds on
22 of 40 references.
References · 22
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2016Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localizationcited by 6,733
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,899
- 2019Optuna: A Next-generation Hyperparameter Optimization Frameworkcited by 2,501
- 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 1,003
- 2018Neural Network Acceptability Judgmentscited by 958
- 2019Attention is not Explanationcited by 929
- 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 856
- 2019Are Sixteen Heads Really Better than One?cited by 816
- 2020A Primer in BERTology: What we know about how BERT workscited by 815
- 2013Generating Sequences With Recurrent Neural Networkscited by 554
10 more
- 2019Linguistic Knowledge and Transferability of Contextual Representationscited by 383
- 2019Revealing the Dark Secrets of BERTcited by 301
- 2015Persistence Images: A Stable Vector Representation of Persistent Homologycited by 236
- 2019PersLay: A Neural Network Layer for Persistence Diagrams and New Graph Topological Signaturescited by 126
- 2020When BERT Plays the Lottery, All Tickets Are Winningcited by 114
- 2020giotto-tda: A Topological Data Analysis Toolkit for Machine Learning and Data Explorationcited by 55
- 2021Artificial Text Detection via Examining the Topology of Attention Mapscited by 49
- 2021Persformer: A Transformer Architecture for Topological Machine Learningcited by 19
- 2022Acceptability Judgements via Examining the Topology of Attention Mapscited by 19
- 2021Persistence Homology of TEDtalk: Do Sentence Embeddings Have a Topological Shape?cited by 3
Built on by
Citing papers per year: 2022: 4; 2023: 3; 2024: 3.
10 papers.
- 2024Position: Topological Deep Learning is the New Frontier for Relational Learningcited by 66
- 2022Attribution and Obfuscation of Neural Text Authorship: A Data Mining Perspectivecited by 41
- 2023TOPFORMER: Topology-Aware Authorship Attribution of Deepfake Texts with Diverse Writing Stylescited by 10
- 2022Topological Data Analysis for Speech Processingcited by 9
- 2022miCSE: Mutual Information Contrastive Learning for Low-shot Sentence Embeddingscited by 7
- 2023Detecting out-of-distribution text using topological features of transformer-based language modelscited by 2
- 2024Topological Data Analysis Applications in Natural Language Processing: A Surveycited by 2
- 2022DeepCuts: Single-Shot Interpretability based Pruning for BERTcited by 1
- 2023A Novel Ehanced Move Recognition Algorithm Based on Pre-trained Models with Positional Embeddingscited by 0
- 2024SEVEN: Pruning Transformer Model by Reserving Sentinelscited by 0
- 2024Topological Data Analysis Applications in Natural Language Processing: A Survey15 Nov 2024
- 2024SEVEN: Pruning Transformer Model by Reserving Sentinels19 Mar 2024
- 2024Position: Topological Deep Learning is the New Frontier for Relational Learning14 Feb 2024
- 2023Detecting out-of-distribution text using topological features of transformer-based language models22 Nov 2023
- 2023TOPFORMER: Topology-Aware Authorship Attribution of Deepfake Texts with Diverse Writing Styles22 Sep 2023
- 2023A Novel Ehanced Move Recognition Algorithm Based on Pre-trained Models with Positional Embeddings14 Aug 2023
- 2022DeepCuts: Single-Shot Interpretability based Pruning for BERT27 Dec 2022
- 2022Topological Data Analysis for Speech Processing30 Nov 2022
- 2022miCSE: Mutual Information Contrastive Learning for Low-shot Sentence Embeddings9 Nov 2022
- 2022Attribution and Obfuscation of Neural Text Authorship: A Data Mining Perspective19 Oct 2022