A New Parallel Algorithm for Sinkhorn Word-Movers Distance and Its Performance on PIUMA and Xeon CPU
Not on the map. Why?
Abstract (arXiv)
The Word Movers Distance (WMD) measures the semantic dissimilarity between two text documents by computing the cost of optimally moving all words of a source/query document to the most similar words of a target document. Computing WMD between two documents is costly because it requires solving an O(V3log(V)) optimization problem where V is the number of unique words in the document. Fortunately, WMD can be framed as an Earth Mover's Distance (EMD) for which the algorithmic complexity can be reduced to O(V2) by adding an entropy penalty to the optimization problem and solving it using the Sinkhorn-Knopp algorithm. Additionally, the computation can be made highly parallel by adopting a batching approach, i.e., computing the WMD of a single query document against multiple target documents at once. Sinkhorn WMD is a key kernel used in many ML/NLP applications. and usually gets implemented in Python. However, a straightforward Python implementation may leave significant performance on the table even though it may internally call optimized C++ BLAS routines. We present a new sparse Parallel Algorithm for Sinkhorn-Knopp Word-movers Distance to compute the semantic distance of one document to many other documents by adopting the O(V2) EMD algorithm. We algorithmically transform O(V2) dense compute-heavy EMD version into an equivalent sparse one using new fused SDDMM-SpMM (sparse selection of dense-dense matrix-, sparse-dense matrix-multiplication) kernels. We implemented and optimized this algorithm for two very different architectures -- the new Intel Programmable Integrated Unified Memory Architecture (PIUMA) and Intel Xeon CPUs. We show that we were able to reach close to peak performance on both platforms.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 7 of its 19 references that are in the map. First posted on arXiv 14 Jul 2021.
Builds on
7 of 19 references.
References · 7
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,346
- 2018Deep contextualized word representationscited by 2,285
- 2013Sinkhorn Distances: Lightspeed Computation of Optimal Transportation Distancescited by 2,277
- 2020Sparse GPU Kernels for Deep Learningcited by 138
- 2018Word Mover's Embedding: From Word2Vec to Document Embeddingcited by 26
- 2016Using Centroids of Word Embeddings and Word Mover's Distance for Biomedical Document Retrieval in Question Answeringcited by 6
Built on by
Not cited yet.