Skip to content
AI.info

Research

When Annotators Disagree, Topology Explains: Mapper, a Topological Tool for Exploring Text Embedding Geometry and Ambiguity

When Annotators Disagree, Topology Explains: Mapper, a Topological Tool for Exploring Text Embedding Geometry and Ambiguity Overview Research area: Natural Language Processing — interpretability of la

When Annotators Disagree, Topology Explains: Mapper, a Topological Tool for Exploring Text Embedding Geometry and Ambiguity
arXiv
2510.17548
Published
2025-10-20
Authors
Nisrine Rair, Alban Goupil, Valeriu Vrabie, Emmanuel Chochoy

AI summary

When Annotators Disagree, Topology Explains: Mapper, a Topological Tool for Exploring Text Embedding Geometry and Ambiguity

Overview

Research area: Natural Language Processing — interpretability of language model representations, topological data analysis (TDA), and annotator disagreement in subjective classification tasks.

Technical level: Intermediate to Advanced. Readers need some familiarity with embedding spaces, fine-tuning of transformer encoders, and graph-based data analysis; the Mapper algorithm itself is explained from scratch in the paper.

Scope: The paper applies the Mapper algorithm from topological data analysis to the internal representations of a fine-tuned RoBERTa-Large model on the MD-Offense dataset, showing that fine-tuning reorganizes ambiguous examples into modular, non-convex, prediction-aligned regions.

What This Paper Is About

Language models for subjective tasks are usually judged by scalar metrics such as accuracy or F1, but those numbers say nothing about how a model internally encodes examples on which human annotators disagree. The authors argue that geometric tools like PCA and UMAP flatten or misrepresent this internal organization, and they instead use Mapper, a graph-based topological tool, to see how the embedding space of a fine-tuned model is actually connected. The goal is a diagnostic account of where and how a model resolves ambiguity into confident, region-level predictions.

Key Contributions

  1. A topological diagnostic for ambiguity in NLP. The authors apply Mapper to the final-layer [CLS] embeddings of RoBERTa-Large, comparing pretrained and fine-tuned representations across agreement levels (A0, A+, A++) of the MD-Offense dataset, and demonstrate a fragmented, interwoven structure that UMAP projections flatten into a single compact cluster.

  2. A set of topological evaluation metrics. They formalize three metrics on the Mapper graph — Component Purity (CP), Edge Agreement (EA), and Majority Match (MM) — to quantify class homogeneity within graph components, label consistency across edges, and agreement between predicted and ground-truth majority labels at the component level.

  3. Empirical evidence of "structural confidence" under disagreement. The paper reports that after fine-tuning, over 98% of connected components exhibit ≥90% prediction purity, even in the most ambiguous A0 subset, while Majority Match in A0 remains 77.7%, revealing a tension between structural confidence and label uncertainty.

  4. Robustness checks and open release. Results are repeated with 2D lenses and with other encoder-only models, and all code and experiment configurations are released at https://github.com/NisrineRair/tda-nlp-representations.

Main Findings

  • Fine-tuning restructures the space into modular, non-convex regions. Rather than producing simple linearly separable clusters, fine-tuning consolidates diffuse components into coherent, class-aligned regions that remain distributed across disconnected areas of the graph.

  • Nearly all components are prediction-pure after fine-tuning. Over 98% of connected components exhibit ≥90% prediction purity. Table 1 gives per-agreement-level values for components exceeding the 90% purity threshold: A0 — CP(GT) 31.5 ± 10.1, CP(Pred) 98.0 ± 2.4, MM 77.7 ± 20.5; A+ — CP(GT) 54.8 ± 15.1, CP(Pred) 98.0 ± 3.2, MM 94.1 ± 12.0; A++ — CP(GT) 81.8 ± 10.6, CP(Pred) 99.5 ± 1.2, MM 97.1 ± 3.9. Results are averaged across all 1D lenses and reported as mean ± std.

  • Ground-truth alignment degrades as ambiguity rises. While CP(Pred) stays near 98% or above across all subsets, CP(GT) falls from 81.8% in A++ to 54.8% in A+ and 31.5% in A0, and MM drops to 77.7% in A0.

  • Fine-tuning improves both local and global structure. Component purity and edge agreement both increase after fine-tuning, with the weakest gains in the A0 subset, where annotator disagreement limits geometric consolidation.

  • Predictions operate at the level of regions, not points. In the A0 graph, most connected components carry a single predicted label; only one region (bottom right of Figure 4(b)) shows a gradual transition from non-offensive to offensive through a small mixed area, described as a rare visible decision boundary.

  • Ambiguity is reorganized, not ignored. The authors conclude that models do not merely reflect label noise but impose their own structured certainty, confidently projecting a single label per topological region even where human disagreement dominates.

  • Findings are not tied to a single setup. Applying 2D lenses produced Mapper graphs and purity trends indistinguishable from the 1D case, and repeating the analysis with other encoder-only models yielded the same patterns: modular prediction-aligned regions, near-perfect prediction purity, and the largest prediction label gap in A0.

  • Linear probes are argued to be insufficient. Because the learned geometry remains multimodal, the authors suggest linear probes, which assume unimodal linear separability, miss the nonlinear structure that persists after training.

Methodology in Plain English

Data. The study uses MD-Offense, a collection of 10,753 English tweets, each annotated by five U.S. annotators, spanning COVID-19, the 2020 U.S. presidential election, and racial justice. Each instance gets a binary label (offensive / non-offensive) via majority vote, called the ground-truth label, plus an agreement level: A++ (5/5), A+ (4/5), or A0 (3/5). A++ is treated as unambiguous and A0 as highly ambiguous. Splits (train / validation / test) are stratified by domain and agreement level; Appendix A reports, for example, test-set sizes of 856 (A0), 909 (A+), and 1292 (A++) with offensive ratios of 45.1%, 39.6%, and 21.1% respectively. Prior work reports F1 dropping from approximately 0.91 for A++ to 0.62 for A0, a trend the authors replicate across several models in Appendix B.

Model and embeddings. RoBERTa-Large is fine-tuned on the full training set using ground-truth labels across all agreement levels, with 3 training epochs, batch size 8, and learning rate 2·10⁻⁵. The [CLS] embedding from the final hidden layer (d = 1024) is extracted for each test instance, since it feeds the classifier.

The Mapper pipeline. Mapper builds a graph from high-dimensional data in three stages: a lens function projects points into a low-dimensional space; the image is covered by overlapping intervals or hypercubes; and each preimage is clustered in the original high-dimensional space, with nodes representing clusters and edges representing shared points. The authors use six 1D lenses — centroid projection (alignment with the decision boundary), PCA first component (global variance), eccentricity (maximum cosine distance to training points), L2 norm (activation magnitude), and two random projections as baselines. All lens statistics are computed on the training set only to avoid leakage. Covering uses resolution r = 40 with 30% overlap (ε = 0.3); clustering uses HDBSCAN with cosine distance and minimum cluster size 2. Implementation uses KeplerMapper and NetworkX.

Metrics. Component Purity measures the share of a component's points carrying the dominant label; Edge Agreement measures the proportion of edges whose endpoints share the same majority label; Majority Match compares predicted versus ground-truth majority labels at the component level.

Why This Matters

Impact on research. The paper argues that scalar metrics and distance-based geometric tools hide the structure that determines how models behave on ambiguous inputs. By reframing ambiguity as a topological property of the representation space, it offers interpretability researchers a complementary lens to probing and projection-based analysis, and it connects three previously separate strands: output-level ambiguity modeling, geometric studies of fine-tuning, and TDA in NLP.

Real-world applications:

  • Content moderation: understanding why an offensive-language classifier issues confident verdicts on tweets where human annotators disagreed, and where those confident regions lie.
  • Dataset auditing and annotation design: using region-level purity and Majority Match to see whether disagreement in a dataset is being collapsed into a dominant class rather than represented.
  • Model selection and validation for subjective tasks: evaluating fine-tuned encoders on structural coherence (component purity, edge agreement) alongside accuracy and F1.
  • Trust and failure diagnosis: identifying overconfident clusters and boundary collapses that would be invisible in aggregate F1 scores.

Industry relevance. Any deployed system handling subjective classification — hate speech, sentiment, policy review — faces the same problem of confident predictions on genuinely contested inputs. The released code (https://github.com/NisrineRair/tda-nlp-representations) makes the diagnostic pipeline reproducible, and the authors suggest topological metrics could inform proactive modeling strategies such as subset selection, fine-tuning regimes, and robustness evaluations focused on ambiguous regions.

Future Directions

  • Testing generality beyond one task and dataset. The authors note that it is an open question whether disconnected decision regions and regional predictive consistency appear in other tasks, such as natural language inference or sentiment analysis, or in datasets with different forms of ambiguity.

  • Better lens design. The study relies mainly on simple geometric lenses (PCA, centroid distances, eccentricity, L2 norm, random projections); task-specific or adaptive lenses — saliency-guided projections, uncertainty-aware mappings, semantic nonlinear transformations — may expose structures tied to pragmatic or contextual sources of ambiguity.

  • Determining whether region-level certainty is generalization or overfitting. The paper explicitly leaves open whether the observed resolution of ambiguity reflects true generalization or an overfit to misleading surface patterns.

  • Building hybrid, validated pipelines. The authors call for combining topological summaries with statistical validation, comparisons to alternative graph structures, and multi-model, multi-task replication, since their metrics are Mapper-specific and inherently correlational.

Target Audience

This paper is most useful to NLP interpretability researchers, computational linguists studying annotator disagreement and subjectivity, and machine learning engineers who deploy classifiers on contested text. It also suits researchers in topological data analysis looking for natural-language applications, and practitioners responsible for dataset quality or model auditing in content moderation. Readers without prior exposure to TDA will need to work through the self-contained Mapper section and the appendices before the metric tables are fully interpretable.

Authors’ abstract

Language models are often evaluated with scalar metrics like accuracy, but such measures fail to capture how models internally represent ambiguity, especially when human annotators disagree. We propose a topological perspective to analyze how fine-tuned models encode ambiguity and more generally instances. Applied to RoBERTa-Large on the MD-Offense dataset, Mapper, a tool from topological data analysis, reveals that fine-tuning restructures embedding space into modular, non-convex regions aligned with model predictions, even for highly ambiguous cases. Over $98\%$ of connected components exhibit $\geq 90\%$ prediction purity, yet alignment with ground-truth labels drops in ambiguous data, surfacing a hidden tension between structural confidence and label uncertainty. Unlike traditional tools such as PCA or UMAP, Mapper captures this geometry directly uncovering decision regions, boundary collapses, and overconfident clusters. Our findings position Mapper as a powerful diagnostic tool for understanding how models resolve ambiguity. Beyond visualization, it also enables topological metrics that may inform proactive modeling strategies in subjective NLP tasks.

Read the original paper