Local Topology Measures of Contextual Language Model Latent Spaces With Applications to Dialogue Term Extraction
Benjamin Matthias Ruppik, Michael Heck, Carel van Niekerk, Renato Vukovic, Hsien-chin Lin, Shutong Feng, Marcus Zibrowius, Milica Gašić
TL;DR
This work tackles the limitation of conventional sequence tagging that ignores corpus‑level context by introducing local topological measures of the latent space around contextual embeddings. It defines neighborhoods around embeddings and computes persistent homology descriptors (persistence images and Wasserstein norms) plus codensity, forming topological features that are fused with LM vectors in a BIO tagging model. Empirical evaluation on dialogue term extraction shows that contextual topological features yield statistically significant improvements over a baseline LM‑only approach and outperform a static topological baseline, both in full data and transfer settings. The approach is reproducible, does not require access to the original feature generator, and holds promise for broader applicability, though it currently focuses on RoBERTa base with considerations for computational cost on larger corpora.
Abstract
A common approach for sequence tagging tasks based on contextual word representations is to train a machine learning classifier directly on these embedding vectors. This approach has two shortcomings. First, such methods consider single input sequences in isolation and are unable to put an individual embedding vector in relation to vectors outside the current local context of use. Second, the high performance of these models relies on fine-tuning the embedding model in conjunction with the classifier, which may not always be feasible due to the size or inaccessibility of the underlying feature-generation model. It is thus desirable, given a collection of embedding vectors of a corpus, i.e., a datastore, to find features of each vector that describe its relation to other, similar vectors in the datastore. With this in mind, we introduce complexity measures of the local topology of the latent space of a contextual language model with respect to a given datastore. The effectiveness of our features is demonstrated through their application to dialogue term extraction. Our work continues a line of research that explores the manifold hypothesis for word embeddings, demonstrating that local structure in the space carved out by word embeddings can be exploited to infer semantic properties.
