Parameter-free Sentence Embedding via Orthogonal Basis

Ziyi Yang, Chenguang Zhu, Weizhu Chen

Abstract: Ziyi Yang, Chenguang Zhu, Weizhu Chen. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP).

2019.

Introduction

In Natural Language Processing (NLP), representing a sentence as a single vector—a sentence embedding—is fundamental for tasks such as semantic search, question answering, and sentiment analysis. Traditionally, researchers have faced a trade-off between two paradigms:

  1. Parameterized Models: Deep learning encoders like BERT or InferSent provide high accuracy but require massive training datasets and significant computational resources (GPUs).
  2. Non-parameterized Models: Simple methods, such as averaging word vectors, are computationally efficient but often fail to capture the nuanced context of a sentence.

This paper introduces Geometric Embedding (GEM), a parameter-free method that bridges this gap. By leveraging linear algebra techniques, GEM achieves context-awareness without the need for expensive training or specialized hardware.

The Geometric Embedding (GEM) Framework

GEM treats a sentence as a geometric subspace. Instead of simple averaging, it calculates a weighted sum of word embeddings where the weights are derived from the local and global geometric properties of the words.

The geometric derivation of word weights based on novelty, significance, and uniqueness.

The weighting scheme consists of three primary components:

  • Novelty ($\alpha_n$): Calculated using the Gram-Schmidt process (QR factorization), this measures the "new" information a word contributes relative to its neighbors. A word is considered novel if its vector is largely perpendicular to the subspace spanned by its surrounding context.
  • Significance ($\alpha_s$): Using Singular Value Decomposition (SVD), GEM identifies the principal semantic directions of the local context. A word is significant if its novel component aligns with these dominant local themes.
  • Uniqueness ($\alpha_u$): This serves as a geometric analogue to Inverse Document Frequency (IDF). It measures a word's uniqueness relative to the entire corpus, effectively downweighting common "noise" words.

Sentence-Dependent Removal (SDR)

Standard post-processing techniques often remove the top principal components from all sentence embeddings to reduce noise. However, GEM introduces Sentence-Dependent Removal (SDR), which recognizes that "noise" is context-dependent. SDR identifies and removes background noise vectors specifically tailored to the content of each individual sentence, ensuring that relevant semantic information is preserved while irrelevant components are discarded.

Experimental Results

The authors evaluated GEM across 11 diverse NLP benchmarks, including the STS Benchmark (STSB), Community Question Answering (CQA), and various classification tasks (SST, TREC, etc.).

Performance comparison of GEM against non-parameterized and parameterized baselines on the STS Benchmark.

Accuracy and Efficiency

On the STS Benchmark, GEM achieved a Pearson correlation of 78.4, significantly outperforming the previous non-parameterized leader, SIF (72.0). Notably, GEM also outperformed several supervised, parameterized models such as InferSent and Sent2Vec.

Beyond accuracy, GEM is exceptionally efficient. In processing the STSB test set, GEM (running on a standard CPU) completed the task in 20.08 seconds. This is faster than SkipThought (43.36s) and InferSent (21.24s), even when those models were accelerated by high-end NVIDIA Tesla P100 GPUs.

Robustness

GEM demonstrates inherent robustness to linguistic noise. In a stress test where stop words were manually removed from a sentence, GEM maintained a cosine similarity of 0.954 between the original and stripped versions. This suggests the model naturally ignores filler words without requiring manual stop-word lists or complex preprocessing.

Conclusion and Future Work

GEM provides a powerful, lightweight alternative to deep learning encoders for sentence representation. By using pure linear algebra, it offers state-of-the-art performance with zero training time.

Future work may involve incorporating subword information to better handle out-of-vocabulary words and exploring dynamic window sizes to capture longer-range dependencies that are currently better addressed by transformer-based architectures.

Summary updated

BibTeX
@inproceedings{yang2019parameter,
  author = {Ziyi Yang and Chenguang Zhu and Weizhu Chen},
  title = {{Parameter-free Sentence Embedding via Orthogonal Basis}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2019},
  url = {https://openreview.net/forum?id=ncAXP4jgoA},
}
Figure