# LayerFlow: Layer-wise Exploration of LLM Embeddings using Uncertainty-aware Interlinked Projections

arXiv: https://arxiv.org/abs/2504.10504 · HTML: https://mlsanity.com/paper/2504.10504/

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Builds on 15 of its 46 references that are in the map.
- First posted on arXiv 9 Apr 2025.

## Builds on (most cited first, 15 of 15)

- [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://mlsanity.com/paper/1810.04805/) (2018)
- [Distributed Representations of Words and Phrases and their Compositionality](https://mlsanity.com/paper/1310.4546/) (2013)
- [A Primer in BERTology: What we know about how BERT works](https://mlsanity.com/paper/2002.12327/) (2020)
- [How Contextual are Contextualized Word Representations? Comparing the Geometry of BERT, ELMo, and GPT-2 Embeddings](https://mlsanity.com/paper/1909.00512/) (2019)
- [Neuron-level Interpretation of Deep NLP Models: A Survey](https://mlsanity.com/paper/2108.13138/) (2021)
- [Embedding Comparator: Visualizing Differences in Global Structure and Local Neighborhoods via Small Multiples](https://mlsanity.com/paper/1912.04853/) (2019)
- [Emblaze: Illuminating Machine Learning Representations through Interactive Comparison of Embedding Spaces](https://mlsanity.com/paper/2202.02641/) (2022)
- [embComp: Visual Interactive Comparison of Vector Embeddings](https://mlsanity.com/paper/1911.01542/) (2019)
- [Visual Comparison of Language Model Adaptation](https://mlsanity.com/paper/2208.08176/) (2022)
- [Beware the Rationalization Trap! When Language Model Explainability Diverges from our Mental Models of Language](https://mlsanity.com/paper/2207.06897/) (2022)
- [Visually Analyzing Contextualized Embeddings](https://mlsanity.com/paper/2009.02554/) (2020)
- [Quantitative Evaluation of Time-Dependent Multidimensional Projection Techniques](https://mlsanity.com/paper/2002.07481/) (2020)
- [InstanceFlow: Visualizing the Evolution of Classifier Confusion on the Instance Level](https://mlsanity.com/paper/2007.11353/) (2020)
- [Edge-Path Bundling: A Less Ambiguous Edge Bundling Approach](https://mlsanity.com/paper/2108.05467/) (2021)
- [Characterizing Uncertainty in the Visual Text Analysis Pipeline](https://mlsanity.com/paper/2209.13498/) (2022)

## Built on by (most cited first, 2 of 2)

- [AwesomeLit: Towards Hypothesis Generation with Agent-Supported Literature Research](https://mlsanity.com/paper/2603.22648/) (2026)
- [Visualising Information Flow in Word Embeddings with Diffusion Tensor Imaging](https://mlsanity.com/paper/2601.05713/) (2026)

## Abstract (arXiv)

Large language models (LLMs) represent words through contextual word embeddings encoding different language properties like semantics and syntax. Understanding these properties is crucial, especially for researchers investigating language model capabilities, employing embeddings for tasks related to text similarity, or evaluating the reasons behind token importance as measured through attribution methods. Applications for embedding exploration frequently involve dimensionality reduction techniques, which reduce high-dimensional vectors to two dimensions used as coordinates in a scatterplot. This data transformation step introduces uncertainty that can be propagated to the visual representation and influence users' interpretation of the data. To communicate such uncertainties, we present LayerFlow - a visual analytics workspace that displays embeddings in an interlinked projection design and communicates the transformation, representation, and interpretation uncertainty. In particular, to hint at potential data distortions and uncertainties, the workspace includes several visual components, such as convex hulls showing 2D and HD clusters, data point pairwise distances, cluster summaries, and projection quality metrics. We show the usability of the presented workspace through replication and expert case studies that highlight the need to communicate uncertainty through multiple visual components and different data perspectives.
