Abstract
In Natural Language Processing, cosine similarity is the standard metric for measuring the relationship between word or sentence embeddings. However, as a single scalar value, it remains a "black box" that fails to explain why two vectors are considered similar. This paper proposes a method to transform dense, distributed embeddings into an interpretable space using Independent Component Analysis (ICA). By projecting embeddings onto sparse, concept-specific axes, the authors decompose cosine similarity into a sum of statistically significant "semantic similarities." Evaluation across static (GloVe) and contextualized (BERT, GPT-2) models demonstrates that this approach enhances interpretability, aligns concepts across languages, and allows for efficient reconstruction of human-rated similarity scores using only a few dimensions.
Introduction
While cosine similarity is ubiquitous, it is notoriously uninterpretable. A similarity score of 0.485 indicates a relationship but provides no insight into the specific shared concepts. Standard embeddings are dense, meaning information is smeared across all dimensions, and even Principal Component Analysis (PCA) typically fails to produce human-readable axes.
This research addresses this limitation by decomposing the similarity score into a set of interpretable, additive components. The goal is to move from a single opaque number to a transparent sum of shared meanings, such as [biology], [finance], or [space].
Methodology
The proposed pipeline involves three core stages:
- ICA Transformation: Unlike PCA, which maximizes variance, ICA seeks to make components as statistically independent as possible. This encourages a sparse representation where specific axes correspond to distinct semantic features.
- Normalization: ICA-transformed embeddings are normalized to unit length. This step is critical for maintaining the fidelity of word rankings along each axis and removing norm-derived artifacts.
- Statistical Axis Selection: The authors derive theoretical probability distributions for component values (Normal) and their products (modified Bessel function of the second kind). This allows for the calculation of p-values to identify which axes are statistically significant for a given word pair.
The core mathematical intuition is that cosine similarity is the sum of shared semantic features: $$\text{cos}(w_i, w_j) = \sum_{\ell=1}^{d} \text{sem}_\ell(w_i, w_j)$$ where $\text{sem}_\ell$ represents the similarity contribution of a specific axis $\ell$.
Experimental Setup
The authors evaluated their approach using a variety of models and benchmarks:
- Embeddings: Static GloVe (300D) and contextualized models including BERT-base, RoBERTa-base, GPT-2, and Pythia-160m.
- Benchmarks: Word intrusion tasks were used to measure human-readable interpretability. Word similarity and analogy sets (MEN, WS353, SimLex999, Google Analogy) were used to test the reconstruction of similarity using sparse axes.
Key Results and Insights
Sparsity and Interpretability
ICA-transformed embeddings exhibit significantly higher sparsity and interpretability compared to PCA. In word intrusion tasks, humans were far more successful at identifying outliers in ICA-transformed sets. For example, GloVe ICA Normalized achieved an interpretability score of ~1.40, compared to ~0.86 for PCA.
Additive Compositionality
The research demonstrates that similarity is not just an angle but a sum of shared concepts. For the word pair "ultraviolet" and "light," the similarity is almost entirely dominated by a single axis representing the [spectrum]. This sparsity allows for the reconstruction of human-rated similarity scores using as few as 10–50 ICA dimensions, whereas PCA requires significantly more to achieve comparable accuracy.
Cross-Model and Multilingual Consistency
Surprisingly, ICA axes appear consistent across different architectures. An axis representing [environment] in GloVe often correlates with a similar axis in BERT. Furthermore, the transformation successfully aligns concepts across languages; the word "boat" maps to the same semantic axes (e.g., [ship-and-sea]) in English, Spanish, Chinese, and Japanese.
Limitations and Future Work
Despite its advantages, the method has several constraints. ICA (specifically FastICA) is computationally expensive, requiring hours for large vocabularies. While the axes are statistically independent, they still require manual labeling by humans or LLMs to assign semantic tags like [chemistry]. Additionally, the method requires centered and whitened embeddings, which differs from the raw embeddings used in most downstream applications. Future work may focus on automating the labeling process and optimizing the computational overhead of the transformation.
Summary updated