An Efficient Shared-memory Parallel Sinkhorn-Knopp Algorithm to Compute the Word Mover's Distance

05/14/2020
by   Jesmin Jahan Tithi, et al.
1

The Word Mover's Distance (WMD) is a metric that measures the semantic dissimilarity between two text documents by computing the cost of moving all words of a source/query document to the most similar words of a target document optimally. Computing WMD between two documents is costly because it requires solving an optimization problem that costs O(V^3log(V)) where d is the number of unique words in the document. Fortunately, the WMD can be framed as the Earth Mover's Distance (EMD) (also known as the Optimal Transportation Distance) for which it has been shown that the algorithmic complexity can be reduced to O(V^2) by adding an entropy penalty to the optimization problem and a similar idea can be adapted to compute WMD efficiently. Additionally, the computation can be made highly parallel by computing WMD of a single query document against multiple target documents at once (e.g., finding whether a given tweet is similar to any other tweets happened in a day). In this paper, we present a shared-memory parallel Sinkhorn-Knopp Algorithm to compute the WMD of one document against many other documents by adopting the O(V^2) EMD algorithm. We used algorithmic transformations to change the original dense compute-heavy kernel to a sparse compute kernel and obtained 67× speedup using 96 cores on the state-of-the-art of Intel 4-sockets Cascade Lake machine w.r.t. its sequential run. Our parallel algorithm is over 700× faster than the naive parallel python code that internally uses optimized matrix library calls.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/14/2021

A New Parallel Algorithm for Sinkhorn Word-Movers Distance and Its Performance on PIUMA and Xeon CPU

The Word Movers Distance (WMD) measures the semantic dissimilarity betwe...
research
11/15/2016

SimDoc: Topic Sequence Alignment based Document Similarity Framework

Document similarity is the problem of estimating the degree to which a g...
research
08/05/2016

Bridging the Gap: Incorporating a Semantic Similarity Measure for Effectively Mapping PubMed Queries to Documents

The main approach of traditional information retrieval (IR) is to examin...
research
03/06/2019

PBBFMM3D: a parallel black-box algorithm for kernel matrix-vector multiplication

We introduce PBBFMM3D, a parallel black-box method for computing kernel ...
research
09/05/2017

Semantic Document Distance Measures and Unsupervised Document Revision Detection

In this paper, we model the document revision detection problem as a min...
research
12/14/2018

Parallel and Scalable Heat Method

The heat method is a popular approach to computing geodesic distances on...
research
07/31/2023

Sequential and Shared-Memory Parallel Algorithms for Partitioned Local Depths

In this work, we design, analyze, and optimize sequential and shared-mem...

Please sign up or login with your details

Forgot password? Click here to reset