# Speeding up Word Mover's Distance and its variants via properties of distances between embeddings

Source: [Speeding up Word Mover's Distance and its variants via properties of distances between embeddings](<https://www.sota2.com/research/paper/68fa67881e209131cea16b49>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2026-01-04T03:16:07.601Z

Authors: Matheus Werner, Eduardo Laber

Published: 2019-12-01T22:08:32.000Z

## Abstract

The Word Mover's Distance (WMD) proposed by Kusner et al. is a distance between documents that takes advantage of semantic relations among words that are captured by their embeddings. This distance proved to be quite effective, obtaining state-of-art error rates for classification tasks, but is also impracticable for large collections/documents due to its computational complexity. For circumventing this problem, variants of WMD have been proposed. Among them, Relaxed Word Mover's Distance (RWMD) is one of the most successful due to its simplicity, effectiveness, and also because of its fast implementations.   Relying on assumptions that are supported by empirical properties of the distances between embeddings, we propose an approach to speed up both WMD and RWMD. Experiments over 10 datasets suggest that our approach leads to a significant speed-up in document classification tasks while maintaining the same error rates.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Document Classification on 20NEWS preprocessed (test)](<https://www.sota2.com/research/sota/document-classification-on-20news-preprocessed-test.md>): Document Classification; 20NEWS preprocessed (test); Runtime (min): 13.4.

- [Document Classification on AMAZON preprocessed (test)](<https://www.sota2.com/research/sota/document-classification-on-amazon-preprocessed-test.md>): Document Classification; AMAZON preprocessed (test); Runtime (min): 4.47.

- [Document Classification on BBCSPORT preprocessed (test)](<https://www.sota2.com/research/sota/document-classification-on-bbcsport-preprocessed-test.md>): Document Classification; BBCSPORT preprocessed (test); Runtime (min): 0.27.

- [Document Classification on CLASSIC preprocessed (test)](<https://www.sota2.com/research/sota/document-classification-on-classic-preprocessed-test.md>): Document Classification; CLASSIC preprocessed (test); Runtime (min): 2.26.

- [Document Classification on OHSUMED preprocessed (test)](<https://www.sota2.com/research/sota/document-classification-on-ohsumed-preprocessed-test.md>): Document Classification; OHSUMED preprocessed (test); Runtime (min): 5.2.

- [Document Classification on RECIPE preprocessed (test)](<https://www.sota2.com/research/sota/document-classification-on-recipe-preprocessed-test.md>): Document Classification; RECIPE preprocessed (test); Runtime (min): 0.55.

- [Document Classification on REUTERS preprocessed (test)](<https://www.sota2.com/research/sota/document-classification-on-reuters-preprocessed-test.md>): Document Classification; REUTERS preprocessed (test); Runtime (min): 1.67.

- [Runtime (min) on Document Classification on TWITTER preprocessed (test)](<https://www.sota2.com/research/sota/runtime-min-on-document-classification-on-twitter-preprocessed-test.md>): Document Classification; TWITTER preprocessed (test); Runtime (min): 0.18.

- [Document Relation Recognition on ARXIV](<https://www.sota2.com/research/sota/document-relation-recognition-on-arxiv.md>): Document Relation Recognition; arXiv; Test Error: 23.16.

- [Document Relation Recognition on WIKIPEDIA](<https://www.sota2.com/research/sota/document-relation-recognition-on-wikipedia.md>): Document Relation Recognition; Wikipedia; Error Rate: 26.9.

- [Document Classification on 20NEWS (test)](<https://www.sota2.com/research/sota/document-classification-on-20news-test.md>): Document Classification; 20NEWS (test); Test Error: 25.22.

- [Document Classification on CLASSIC (test)](<https://www.sota2.com/research/sota/document-classification-on-classic-test.md>): Document Classification; CLASSIC (test); Test Error (%): 3.15.

- [Identifying related documents on ARXIV triplets (test)](<https://www.sota2.com/research/sota/identifying-related-documents-on-arxiv-triplets-test.md>): Identifying related documents; ARXIV triplets (test); Runtime (min): 2.72.

- [Identifying related documents on WIKIPEDIA triplets (test)](<https://www.sota2.com/research/sota/identifying-related-documents-on-wikipedia-triplets-test.md>): Identifying related documents; WIKIPEDIA triplets (test); Runtime (min): 3.36.

- [Text Categorization on AMAZON (test)](<https://www.sota2.com/research/sota/text-categorization-on-amazon-test.md>): Text Categorization; Amazon (test); Test Error: 6.98.

- [Text Categorization on TWITTER (test)](<https://www.sota2.com/research/sota/text-categorization-on-twitter-test.md>): Text Categorization; Twitter (test); Classification Error: 28.95.

- [Text Categorization on RECIPE (test)](<https://www.sota2.com/research/sota/text-categorization-on-recipe-test.md>): Text Categorization; RECIPE (test); Classification Error Rate: 43.2.

- [Text Categorization on OHSUMED (test)](<https://www.sota2.com/research/sota/text-categorization-on-ohsumed-test.md>): Text Categorization; Ohsumed (test); Test Error: 41.26.

- [Text Categorization on BBCSPORT (test)](<https://www.sota2.com/research/sota/text-categorization-on-bbcsport-test.md>): Text Categorization; BBCSPORT (test); Test Error: 4.82.

- [Text Categorization on REUTERS (test)](<https://www.sota2.com/research/sota/text-categorization-on-reuters-test.md>): Text Categorization; Reuters (test); Classification Error: 4.39.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/1912.00509>)

[PDF](<https://arxiv.org/pdf/1912.00509.pdf>)

[Implementation](<https://github.com/matwerner/fast-wmd>)
