BERTops: Studying BERT Representations under a Topological Lens
Preprint
Abstract
Proposing scoring functions to effectively understand, analyze and learn various properties of high dimensional hidden representations of large-scale transformer models like BERT can be a challenging task. In this work, we explore a new direction by studying the topological features of BERT hidden representations using persistent homology (PH). We propose a novel scoring function named "persistence scoring function (PSF)" which: (i) accurately captures the homology of the high-dimensional hidden representations and correlates well with the test set accuracy of a wide range of datasets and outperforms existing scoring metrics, (ii) captures interesting post fine-tuning "per-class" level properties from both qualitative and quantitative viewpoints, (iii) is more stable to perturbations as compared to the baseline functions, which makes it a very robust proxy, and (iv) finally, also serves as a predictor of the attack success rates for a wide category of black-box and white-box adversarial attack methods. Our extensive correlation experiments demonstrate the practical utility of PSF on various NLP tasks relevant to BERT.Keywords
All Related Versions
This publication has 10 references indexed in Scilit:
- Deep Learning-Based Forecasting Approach in Smart Grids With Microclustering and Bidirectional LSTM NetworkIEEE Transactions on Industrial Electronics, 2020
- Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and EntailmentProceedings of the AAAI Conference on Artificial Intelligence, 2020
- Visualizing and Understanding the Effectiveness of BERT2019
- TextBugger: Generating Adversarial Text Against Real-world Applications2019
- Ripser.py: A Lean Persistent Homology Library for PythonJournal of Open Source Software, 2018
- A tutorial on kernel density estimation and recent advancesBiostatistics & Epidemiology, 2017
- SQuAD: 100,000+ Questions for Machine Comprehension of Text2016
- A methodology to compare Dimensionality Reduction algorithms in terms of loss of qualityInformation Sciences, 2014
- Towards persistence-based reconstruction in euclidean spaces2008
- Silhouettes: A graphical aid to the interpretation and validation of cluster analysisJournal of Computational and Applied Mathematics, 1987