paper-with-me

홈 › Papers

The Topological BERT: Transforming Attention into Topology for Natural Language Processing

2022-06-30 · Ilan Perez, Raphael Reinauer

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.

📄 PDF Abstract BibTeX arXiv:2206.15195

Code (0)

등록된 구현이 없습니다.

Tasks

SentenceTopological Data Analysis

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Pruning 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Position-Wise Feed-Forward Layer 설명 없음
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Label Smoothing Label Smoothing is a regularization technique that introduces noise for the labels. This accounts for the fact that datasets may have mistakes in them, so maximizing the…
Weight Decay 설명 없음

Similar Papers 제목 키워드 기반

Betti numbers of attention graphs is all you really need

2020-10-10 · Anonymous

We apply methods of topological analysis to the attention graphs, calculated on the attention heads of the BERT model (Devlin et al. (2019)). Our research shows that the classifier built upon basic persistent topological…

AllClassificationtext-classificationText Classification

Betti numbers of attention graphs is all you really need

2022-07-05 · Laida Kushnareva, Dmitri Piontkovski, Irina Piontkovskaya

We apply methods of topological analysis to the attention graphs, calculated on the attention heads of the BERT model ( arXiv:1810.04805v2 ). Our research shows that the classifier built upon basic persistent topological…

AllClassificationtext-classificationText Classification

TopoBench: A Framework for Benchmarking Topological Deep Learning

2024-06-09 · Lev Telyatnikov, Guillermo Bernardez, Marco Montagna, Mustafa Hajij 외

This work introduces TopoBench, an open-source library designed to standardize benchmarking and accelerate research in topological deep learning (TDL). TopoBench decomposes TDL into a sequence of independent modules for …

BenchmarkingDeep Learning

Topological Expressivity of ReLU Neural Networks

2023-10-17 · Ekin Ergen, Moritz Grillo

We study the expressivity of ReLU neural networks in the setting of a binary classification problem from a topological perspective. Recently, empirical studies showed that neural networks operate by changing topology, tr…

Binary Classification

Acceptability Judgements via Examining the Topology of Attention Maps

2022-05-19 · Daniil Cherniavskii, Eduard Tulchinskii, Vladislav Mikhailov, Irina Proskurina 외

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 underex…

CoLALinguistic AcceptabilitySentenceTopological Data Analysis