Interactive Semantic Featuring for Text Classification

Camille Jandot, Patrice Y. Simard, Max Chickering, David Grangier, Jina SuharXiv 2016

Introduction

Traditional text classification models often rely on a "Bag-of-Words" (BoW) representation. While statistically powerful, BoW models suffer from two significant drawbacks: a lack of interpretability due to high feature dimensionality, and "context blindness," where words are treated in isolation regardless of their semantic role. This paper introduces smoothed dictionary features, a method that leverages human-defined semantic concepts (dictionaries) and refines them using local context. By integrating this into an interactive teaching process, the authors create models that are highly interpretable yet match or exceed the performance of traditional BoW approaches.

Methods

Smoothed Dictionary Features

The primary technical innovation is the move from literal keyword matching to contextual probability. Instead of a binary check for a word's presence in a dictionary, the model calculates the probability $P(w \in D | \text{context})$ that a word $w$ belongs to a dictionary $D$ given its surrounding window of words. This is achieved using a logistic regression model (powered by Naive Bayes scores) that analyzes the words immediately preceding and following a target term.

Contextual disambiguation of the word "may" based on surrounding words.

As illustrated in the figure above, this "smoothing" allows the model to distinguish between different uses of the same word. For example, the word "may" is assigned a high probability of belonging to a Months dictionary when surrounded by other date-related terms, but a low probability when used as a modal verb. This acts as a semantic filter, allowing a single dictionary to be much more precise than a raw list of synonyms.

Interactive Teaching Process

The authors propose a principled loop where a human "teacher" interacts with the learner. The teacher identifies examples where the model is "feature-blind"—confused because it lacks a specific concept—and introduces or modifies a dictionary to help the model generalize. This process shifts the human's role from labeling individual data points to defining high-level semantic features.

Evaluation and Results

The researchers evaluated their approach using the Open Directory Project (ODP) dataset, focusing on "Health" and "Music" classification tasks. To simulate a real-world scenario where a teacher builds a model from scratch, the training set was limited to 300 documents.

Performance comparison of BoW, DICT, and SMOO features on Health and Music tasks.

As summarized in the results table, the smoothed dictionary features (SMOO) performed remarkably well compared to both literal dictionaries (DICT) and Bag-of-Words (BoW). In both tasks, the smoothed features actually outperformed BoW in terms of AUC, despite using orders of magnitude fewer features. While a BoW model might need ~7,000 features to reach peak performance, the dictionary-based models achieved similar results using only 24 to 27 features.

Key Insights

  • Dimensionality Reduction: By using semantic concepts instead of individual words, the model's complexity is reduced by orders of magnitude without sacrificing accuracy.
  • Interactive Discovery: The context model can suggest new words to the teacher. If a teacher starts a dictionary with "January, February," the model can identify "April, August" as candidates based on their appearance in similar contexts within unlabeled data.
  • Interpretability: Because each feature corresponds to a human-understandable concept (e.g., "Musical Instruments" or "Medical Conditions"), model decisions are transparent and easy to debug.

Conclusion

By combining human semantic knowledge with statistical context modeling, the authors demonstrate a path toward text classifiers that are both powerful and transparent. The "smoothing" of dictionaries effectively bridges the gap between rigid keyword lists and the nuanced reality of natural language, providing a scalable framework for interactive machine teaching.

Summary updated

Abstract

In text classification, dictionaries can be used to define human-comprehensible features. We propose an improvement to dictionary features called smoothed dictionary features. These features recognize document contexts instead of n-grams. We describe a principled methodology to solicit dictionary features from a teacher, and present results showing that models built using these human-comprehensible features are competitive with models trained with Bag of Words features.
BibTeX
@misc{jandot2016interactive,
  author = {Camille Jandot and Patrice Y. Simard and Max Chickering and David Grangier and Jina Suh},
  title = {{Interactive Semantic Featuring for Text Classification}},
  year = {2016},
  eprint = {1606.07545},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1606.07545},
}
Figure