Skip to main content
QUICK REVIEW

[Paper Review] Text comparison using word vector representations and dimensionality reduction

Hendrik Heuer|arXiv (Cornell University)|Jul 2, 2016
Topic ModelingComputer Science5 references11 citations
TL;DR

This paper proposes a visualization technique for comparing text sources using word2vec embeddings and t-SNE dimensionality reduction to map semantically similar words into spatial clusters. The method enables users to explore topic similarities and differences across text sources—such as Wikipedia revisions or summaries—by color-coding unique, shared, and exclusive words in a 2D interactive map, offering a geographical-like interface for text comparison with no empirical validation beyond illustrative use cases.

ABSTRACT

This paper describes a technique to compare large text sources using word vector representations (word2vec) and dimensionality reduction (t-SNE) and how it can be implemented using Python. The technique provides a bird's-eye view of text sources, e.g. text summaries and their source material, and enables users to explore text sources like a geographical map. Word vector representations capture many linguistic properties such as gender, tense, plurality and even semantic concepts like "capital city of". Using dimensionality reduction, a 2D map can be computed where semantically similar words are close to each other. The technique uses the word2vec model from the gensim Python library and t-SNE from scikit-learn.

Motivation & Objective

  • To develop a visual text comparison tool that supports editorial decision-making in summarization by revealing topic coverage across sources.
  • To address limitations of traditional text visualization methods like word clouds, which ignore semantic similarity and focus only on frequency.
  • To enable users to explore text sources as a geographical map, where semantically similar words are spatially proximate.
  • To demonstrate the utility of word vector representations and dimensionality reduction in detecting subtle topic changes across text revisions.
  • To provide an open-source, interactive tool for comparing text sources using Python-based implementations of word2vec and t-SNE.

Proposed method

  • Word2vec embeddings are generated from text using the gensim library, capturing semantic and syntactic relationships between words.
  • t-SNE is applied to reduce the high-dimensional word vectors to a 2D space, preserving local semantic similarities.
  • Three word sets are computed: words unique to source A, unique to source B, and the intersection of both sources.
  • Each word set is assigned a distinct color for visual differentiation in the 2D map.
  • The resulting 2D map is rendered as an interactive, zoomable visualization, allowing users to explore clusters and toggle visibility of word sets.
  • The tool is implemented with a full-stack Python and JavaScript pipeline, with data exported as JSON and visualized via a web-based front-end.

Experimental results

Research questions

  • RQ1Can word2vec and t-SNE be effectively combined to create an interpretable, interactive visualization of text topic similarity?
  • RQ2How well do the resulting 2D maps reveal semantic clusters and topic differences between two text sources, such as Wikipedia revisions?
  • RQ3To what extent can this method support editorial decisions in summarization by visually highlighting covered and missing topics?
  • RQ4Can the technique detect subtle topic shifts over time, such as the addition or removal of named entities in evolving texts?
  • RQ5How does the color-coded, interactive map improve the exploration of text sources compared to traditional word frequency or cloud-based methods?

Key findings

  • The technique successfully generates 2D visualizations where semantically similar words are grouped into spatial clusters, enabling intuitive topic exploration.
  • The visualization allows users to identify which words are unique to one source, shared between sources, or absent in one, offering a clear view of topic coverage.
  • For the Game of Thrones Wikipedia article, the tool clearly shows new characters added and old ones removed between 2013 and 2015 revisions, with red and orange markers indicating such changes.
  • The global cluster maps of different articles—such as the United States, World War 2, and Game of Thrones—demonstrate distinct semantic structures, reflecting differing topic compositions.
  • The tool enables interactive exploration with zooming and toggling, allowing users to analyze both broad similarities and fine-grained differences across text sources.
  • The method is effective for comparing heterogeneous sources, such as search queries and keywords, and can be applied to personal data like Google search histories.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.