SPINE: SParse Interpretable Neural Embeddings

Anant Subramanian, Danish Pruthi, Harsh Jhamtani, Taylor Berg-Kirkpatrick, Eduard H. Hovy

Introduction

In Natural Language Processing (NLP), word embeddings like GloVe and word2vec serve as the foundational representations for most models. These embeddings map words into high-dimensional vector spaces where semantic similarity is represented by spatial proximity. However, these vectors are typically "dense," meaning nearly every dimension contains a non-zero value. To a human observer, these individual dimensions are uninterpretable coordinates in a mathematical space. This lack of transparency makes it difficult to debug models or understand the underlying logic of neural network predictions.

Cognitive science suggests that humans categorize concepts using a small set of sparse, positive traits (e.g., "has wings" or "can fly" for a bird). SPINE (SParse Interpretable Neural Embeddings) addresses this gap by transforming dense, "black-box" embeddings into sparse, non-negative representations that align with human-centric logic without sacrificing performance on downstream tasks.

Methodology: The SPINE Architecture

SPINE utilizes a denoising $k$-sparse autoencoder to "retrofit" existing dense embeddings. An autoencoder is a neural network designed to compress an input into a hidden representation and subsequently reconstruct the original input. To ensure this hidden layer is interpretable, the authors introduced three primary technical innovations:

  1. Capped ReLU Activation: Unlike standard ReLU, which allows values to range from zero to infinity, SPINE employs a "Capped ReLU" that squashes activations into the $[0, 1]$ range. This binary-leaning scale makes it clear whether a feature is "off" (0), "on" (1), or partially active.
  2. Partial Sparsity Loss (PSL): This novel loss term penalizes activations that fall in the "mushy middle" (between 0 and 1). It forces the model to make definitive decisions about whether a specific semantic trait applies to a word.
  3. Average Sparsity Loss (ASL): This constraint ensures that only a small fraction of dimensions are active across the entire vocabulary at any given time, preventing the model from reverting to a dense representation.
Architecture of the SPINE denoising autoencoder, showing how dense input is mapped to sparse, semantically meaningful hidden units.

By incorporating denoising—adding random noise to the input during training—the model learns robust, stable features rather than simply memorizing the input data.

Key Insights and Interpretability

The core thesis of SPINE is that sparsity equals interpretability. By forcing the model to use fewer dimensions and non-negative values, the dimensions naturally align with human concepts.

A significant advantage of this approach is its ability to handle polysemy (words with multiple meanings). Because the embeddings are sparse, a single word can activate distinct dimensions corresponding to its different senses. For example, the word "remote" can simultaneously activate dimensions related to geographical distance and dimensions related to electronic control devices.

Comparison of semantic clusters across different embedding methods. SPINE produces clear, interpretable groupings compared to the noise in initial dense vectors.

Experimental Results

The researchers evaluated SPINE using both human-centric and task-based metrics:

  • Human Interpretability: Using a "Word Intrusion" test (where humans identify a random word hidden among words from the same dimension), SPINE achieved a precision of 68.35% for GloVe and 74.83% for word2vec. This significantly outperformed the original dense baselines, which scored between 23-26%.
  • Downstream Performance: Contrary to the common assumption that interpretability requires a performance trade-off, SPINE improved accuracy on several benchmarks. On Question Classification (TREC), SPINE (word2vec) reached 92.40% accuracy, compared to 88.40% for the original word2vec.
  • Efficiency: The resulting 1000-dimensional vectors are extremely sparse, offering potential computational advantages for sparse-matrix operations in large-scale applications.

Conclusion and Future Work

SPINE demonstrates that it is possible to create word representations that are both high-performing and human-readable. While currently implemented as a post-processing "retrofitting" step, future research may explore training these sparse constraints jointly with the original language model objective. Additionally, investigating deeper, hierarchical sparse architectures could potentially capture even more complex semantic relationships.

Summary updated

BibTeX
@inproceedings{subramanian2018spine,
  author = {Anant Subramanian and Danish Pruthi and Harsh Jhamtani and Taylor Berg-Kirkpatrick and Eduard H. Hovy},
  title = {{SPINE: SParse Interpretable Neural Embeddings}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.1609/aaai.v32i1.11935},
}
Figure