Skip to main content
QUICK REVIEW

[Paper Review] Text classification with word embedding regularization and soft similarity measure

Vít Novotný, Eniafe Festus Ayetiran|arXiv (Cornell University)|Mar 10, 2020
Topic ModelingComputer Science7 citations
TL;DR

This paper proposes word embedding regularization via orthogonalization and quantization to improve text classification performance and efficiency. It demonstrates that the soft cosine measure (SCM) with regularized embeddings outperforms the Word Mover’s Distance (WMD) in both accuracy and speed—achieving 39% average test error reduction and over 10,000× faster inference—making it viable for deployment on resource-constrained systems.

ABSTRACT

Since the seminal work of Mikolov et al., word embeddings have become the preferred word representations for many natural language processing tasks. Document similarity measures extracted from word embeddings, such as the soft cosine measure (SCM) and the Word Mover's Distance (WMD), were reported to achieve state-of-the-art performance on semantic text similarity and text classification. Despite the strong performance of the WMD on text classification and semantic text similarity, its super-cubic average time complexity is impractical. The SCM has quadratic worst-case time complexity, but its performance on text classification has never been compared with the WMD. Recently, two word embedding regularization techniques were shown to reduce storage and memory costs, and to improve training speed, document processing speed, and task performance on word analogy, word similarity, and semantic text similarity. However, the effect of these techniques on text classification has not yet been studied. In our work, we investigate the individual and joint effect of the two word embedding regularization techniques on the document processing speed and the task performance of the SCM and the WMD on text classification. For evaluation, we use the $k$NN classifier and six standard datasets: BBCSPORT, TWITTER, OHSUMED, REUTERS-21578, AMAZON, and 20NEWS. We show 39% average $k$NN test error reduction with regularized word embeddings compared to non-regularized word embeddings. We describe a practical procedure for deriving such regularized embeddings through Cholesky factorization. We also show that the SCM with regularized word embeddings significantly outperforms the WMD on text classification and is over 10,000 times faster.

Motivation & Objective

  • To evaluate the impact of word embedding regularization on document-level tasks, particularly text classification.
  • To compare the performance and efficiency of the soft cosine measure (SCM) and Word Mover’s Distance (WMD) when using regularized word embeddings.
  • To investigate whether regularization techniques that reduce memory and improve training speed also enhance classification accuracy.
  • To establish a practical method for deriving regularized word embeddings using Cholesky factorization and orthogonalization.
  • To enable efficient, high-performance text classification suitable for mobile and embedded systems by replacing WMD with SCM on regularized embeddings.

Proposed method

  • Apply orthogonalization to word embeddings using Cholesky factorization to reduce redundancy and improve similarity matrix sparsity.
  • Use quantization to reduce embedding dimensionality and memory footprint, while maintaining semantic fidelity.
  • Integrate regularization into the soft cosine measure (SCM) by modifying the similarity matrix to favor negative similarities between unrelated words.
  • Optimize SCM hyperparameters (e.g., $C$, $o$, $t$, $k$, IDF, symmetry, domain) across six benchmark datasets using grid search.
  • Implement a $k$-nearest neighbors (k-NN) classifier with SCM and WMD for document classification using regularized and non-regularized embeddings.
  • Use Cholesky decomposition to derive orthogonalized embeddings from pre-trained word vectors, ensuring mathematical consistency and computational efficiency.

Experimental results

Research questions

  • RQ1Does word embedding regularization improve text classification performance beyond word-level tasks?
  • RQ2How does the performance of the soft cosine measure (SCM) with regularized embeddings compare to the Word Mover’s Distance (WMD) on text classification tasks?
  • RQ3What is the impact of orthogonalization and quantization on document processing speed and classification accuracy?
  • RQ4Can regularized embeddings make the SCM a practical alternative to WMD in terms of speed and accuracy?
  • RQ5What optimal hyperparameter configurations maximize SCM performance with regularized embeddings across diverse text classification datasets?

Key findings

  • The soft cosine measure (SCM) with regularized word embeddings achieves a 39% average reduction in $k$-NN test error compared to non-regularized embeddings.
  • The SCM with regularized embeddings significantly outperforms the WMD on all six benchmark datasets, including $k$-NN classification on bbcsport, twitter, ohsumed, reuters-21578, amazon, and 20news.
  • The SCM with regularized embeddings is over 10,000× faster than the WMD, with a 13,685× speedup on the 20news dataset due to reduced time complexity.
  • Quantized embeddings reduce positive bias in cosine similarity between unrelated words, improving document separability and reducing $k$-NN test error.
  • Orthogonalization reduces the worst-case time complexity of SCM from quadratic to linear, though sparse matrix operations cause a 2.73× slowdown compared to dense SCM.
  • The optimal parameter configuration for SCM with orthogonalized embeddings includes $C=100$, $o=4$, $t=-1$, and $k=1$ for most datasets, with IDF and symmetry settings being critical for performance.

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.