Skip to main content
QUICK REVIEW

[Paper Review] Exploring text datasets by visualizing relevant words

Franziska Horn, Leila Arras|arXiv (Cornell University)|Jul 17, 2017
Topic ModelingComputer Science11 references8 citations
TL;DR

This paper proposes visualizing 'relevant words' from text datasets using word clouds to accelerate exploratory data analysis. It compares three methods—tf-idf aggregation, layerwise relevance propagation (LRP), and a novel word frequency ratio score—for identifying distinguishing terms per class or cluster, demonstrating that the frequency-ratio method best reveals salient topics in scientific publications and trending news topics from New York Times snippets.

ABSTRACT

When working with a new dataset, it is important to first explore and familiarize oneself with it, before applying any advanced machine learning algorithms. However, to the best of our knowledge, no tools exist that quickly and reliably give insight into the contents of a selection of documents with respect to what distinguishes them from other documents belonging to different categories. In this paper we propose to extract `relevant words' from a collection of texts, which summarize the contents of documents belonging to a certain class (or discovered cluster in the case of unlabeled datasets), and visualize them in word clouds to allow for a survey of salient features at a glance. We compare three methods for extracting relevant words and demonstrate the usefulness of the resulting word clouds by providing an overview of the classes contained in a dataset of scientific publications as well as by discovering trending topics from recent New York Times article snippets.

Motivation & Objective

  • To address the lack of tools that quickly reveal what distinguishes documents in different classes or clusters within text datasets.
  • To enable rapid, intuitive understanding of dataset contents before applying complex machine learning models.
  • To identify and visualize salient, distinguishing words for each class or cluster to support exploratory analysis.
  • To evaluate multiple methods for extracting relevant words and determine which best captures meaningful distinctions in text data.
  • To demonstrate utility in both labeled datasets (e.g., scientific publications) and unlabeled datasets (e.g., recent news snippets) for trend detection.

Proposed method

  • Preprocess text data by tokenizing, removing stopwords, and converting to tf-idf feature vectors.
  • Apply three methods to extract relevant words: (1) summing tf-idf scores per class, (2) using layerwise relevance propagation (LRP) to attribute classifier scores to input features, and (3) computing a word relevancy score based on relative frequency in target vs. other classes.
  • Generate word clouds for each class or cluster using the top-ranked relevant words from each method.
  • For unlabeled data, cluster documents using DBSCAN with cosine similarity threshold of 0.55 and minimum cluster size of 3.
  • Highlight relevant words in individual documents to interpret classification decisions and detect training set biases.
  • Use open-source Python library 'textcatvis' to reproduce experiments and visualize results.

Experimental results

Research questions

  • RQ1Which method most reliably identifies words that distinguish documents in a specific class from those in other classes?
  • RQ2Can word clouds based on relevant words provide an intuitive, high-level overview of dataset contents without full model training?
  • RQ3How effective are different word relevance extraction techniques in identifying trending topics in unlabeled news text data?
  • RQ4Can visualizing relevant words help detect biases or misclassifications in training data?
  • RQ5How does the performance of each method vary across datasets with imbalanced class sizes or small clusters?

Key findings

  • The frequency-ratio method, which computes word relevancy based on relative occurrence in a target class versus all others, outperforms tf-idf aggregation and LRP for exploratory analysis of both labeled and unlabeled datasets.
  • Word clouds generated using the frequency-ratio method clearly revealed salient topics such as 'inauguration', 'Trump', and 'protest' in New York Times article snippets from January 2017.
  • The method successfully identified distinct clusters corresponding to real-world events like the nomination of Betsy DeVos and an avalanche in Italy, even when clusters contained as few as three documents.
  • LRP was most effective for interpreting individual classification decisions and identifying features contributing to misclassifications, particularly in trained models.
  • tf-idf aggregation often failed to distinguish class-specific terms, especially when terms were common across multiple classes.
  • The approach enabled rapid, human-readable insight into dataset structure, with word clouds providing a scalable alternative to manual inspection of individual documents.

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.