# Generalized Word Shift Graphs: A Method for Visualizing and Explaining Pairwise Comparisons Between Texts

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

## Key facts

- Cited by 21 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 5 Aug 2020.

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

- [Marked Personas: Using Natural Language Prompts to Measure Stereotypes in Language Models](https://mlsanity.com/paper/2305.18189/) (2023)
- [Ethics Sheet for Automatic Emotion Recognition and Sentiment Analysis](https://mlsanity.com/paper/2109.08256/) (2021)
- [Wikibio: a Semantic Resource for the Intersectional Analysis of Biographical Events](https://mlsanity.com/paper/2306.09505/) (2023)
- [LibertyMFD: A Lexicon to Assess the Moral Foundation of Liberty](https://mlsanity.com/paper/2209.06750/) (2022)
- [PEST: Parameter Efficient Steering of Blackbox VLMs via Agentic Few-shot Alignment for Hateful Meme Moderation](https://mlsanity.com/paper/2601.04692/) (2026)
- [Coordinated Reply Attacks in Influence Operations: Characterization and Detection](https://mlsanity.com/paper/2410.19272/) (2024)
- [Quantifying language changes surrounding mental health on Twitter](https://mlsanity.com/paper/2106.01481/) (2021)
- [Mapping the Italian Telegram Ecosystem: Communities, Toxicity, and Hate Speech](https://mlsanity.com/paper/2504.19594/) (2025)
- [Augmenting semantic lexicons using word embeddings and transfer learning](https://mlsanity.com/paper/2109.09010/) (2021)
- [MNet-Sim: A Multi-layered Semantic Similarity Network to Evaluate Sentence Similarity](https://mlsanity.com/paper/2111.05412/) (2021)
- [Who is better at math, Jenny or Jingzhen? Uncovering Stereotypes in Large Language Models](https://mlsanity.com/paper/2407.06917/) (2024)
- [The Rise of Large Language Models and the Direction and Impact of US Federal Research Funding](https://mlsanity.com/paper/2601.15485/) (2026)
- [Ousiometrics: The essence of meaning aligns with a power-danger-structure framework instead of valence-arousal-dominance](https://mlsanity.com/paper/2110.06847/) (2021)
- [Curating corpora with classifiers: A case study of clean energy sentiment online](https://mlsanity.com/paper/2305.03092/) (2023)
- [An assessment of measuring local levels of homelessness through proxy social media signals](https://mlsanity.com/paper/2305.08978/) (2023)
- [The Resume Paradox: Greater Language Differences, Smaller Pay Gaps](https://mlsanity.com/paper/2307.08580/) (2023)
- [HMAMP: Hypervolume-Driven Multi-Objective Antimicrobial Peptides Design](https://mlsanity.com/paper/2405.00753/) (2024)
- [LML: A Novel Lexicon for the Moral Foundation of Liberty](https://mlsanity.com/paper/2407.11862/) (2024)
- [Do Androids Dream of Unseen Puppeteers? Probing for a Conspiracy Tendencies in Large Language Models](https://mlsanity.com/paper/2511.03699/) (2025)
- [Misalignment of LLM-Generated Personas with Human Perceptions in Low-Resource Settings](https://mlsanity.com/paper/2512.02058/) (2025)
- [Rank-Turbulence Delta and Interpretable Approaches to Stylometric Delta Metrics](https://mlsanity.com/paper/2604.19499/) (2026)

## Abstract (arXiv)

A common task in computational text analyses is to quantify how two corpora differ according to a measurement like word frequency, sentiment, or information content. However, collapsing the texts' rich stories into a single number is often conceptually perilous, and it is difficult to confidently interpret interesting or unexpected textual patterns without looming concerns about data artifacts or measurement validity. To better capture fine-grained differences between texts, we introduce generalized word shift graphs, visualizations which yield a meaningful and interpretable summary of how individual words contribute to the variation between two texts for any measure that can be formulated as a weighted average. We show that this framework naturally encompasses many of the most commonly used approaches for comparing texts, including relative frequencies, dictionary scores, and entropy-based measures like the Kullback-Leibler and Jensen-Shannon divergences. Through several case studies, we demonstrate how generalized word shift graphs can be flexibly applied across domains for diagnostic investigation, hypothesis generation, and substantive interpretation. By providing a detailed lens into textual shifts between corpora, generalized word shift graphs help computational social scientists, digital humanists, and other text analysis practitioners fashion more robust scientific narratives.
