Visualizing and Measuring the Geometry of BERT
arXiv:1906.02715
Abstract
Transformer architectures show significant promise for natural language processing. Given that a single pretrained model can be fine-tuned to perform well on many different tasks, these networks appear to extract generally useful linguistic features. A natural question is how such networks represent this information internally. This paper describes qualitative and quantitative investigations of one particularly effective model, BERT. At a high level, linguistic features seem to be represented in separate semantic and syntactic subspaces. We find evidence of a fine-grained geometric representation of word senses. We also present empirical descriptions of syntactic representations in both attention matrices and individual word embeddings, as well as a mathematical argument to explain the geometry of these representations.
arXiv comment8 pages, 5 figures
References in corpus (6)
- Scikit-learn: Machine Learning in Python
- Distributed Representations of Words and Phrases and their Compositionality
- UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction
- Interpretability Beyond Feature Attribution: Quantitative Testing with Concept Activation Vectors (TCAV)
- What you can cram into a single vector: Probing sentence embeddings for linguistic properties
- Visualizing Attention in Transformer-Based Language Representation Models
Cited by in corpus (17)
- TabTransformer: Tabular Data Modeling Using Contextual Embeddings
- COCO-LM: Correcting and Contrasting Text Sequences for Language Model Pretraining
- Machine Learning for Scent: Learning Generalizable Perceptual Representations of Small Molecules
- Enhancing the Transformer with Explicit Relational Encoding for Math Problem Solving
- Capturing Evolution in Word Usage: Just Add More Clusters?
- A Systematic Analysis of Morphological Content in BERT Models for Multiple Languages
- CommonsenseVIS: Visualizing and Understanding Commonsense Reasoning Capabilities of Natural Language Models
- HUBERT Untangles BERT to Improve Transfer across NLP Tasks
- IsoScore: Measuring the Uniformity of Embedding Space Utilization
- Integrating Multimodal Information in Large Pretrained Transformers
- Combating the Curse of Multilinguality in Cross-Lingual WSD by Aligning Sparse Contextualized Word Representations
- The Rediscovery Hypothesis: Language Models Need to Meet Linguistics
- Exploring Linguistic Properties of Monolingual BERTs with Typological Classification among Languages
- How Far Does BERT Look At:Distance-based Clustering and Analysis of BERTs Attention
- Positional Artefacts Propagate Through Masked Language Model Embeddings
- Unsupervised Word Polysemy Quantification with Multiresolution Grids of Contextual Embeddings
- Circles are like Ellipses, or Ellipses are like Circles? Measuring the Degree of Asymmetry of Static and Contextual Embeddings and the Implications to Representation Learning