A Distribution-Based Threshold for Determining Sentence Similarity
Gioele Cadamuro Marco Gruppo
We hereby present a solution to a semantic textual similarity (STS) problem
in which it is necessary to match two sentences containing, as the only
distinguishing factor, highly specific information (such as names, addresses,
identification codes), and from which we need to derive a definition for when
they are similar and when they are not. The solution revolves around the use of
a neural network, based on the siamese architecture, to create the
distributions of the distances between similar and dissimilar pairs of
sentences. The goal of these distributions is to find a discriminating factor,
that we call "threshold", which represents a well-defined quantity that can be
used to distinguish vector distances of similar pairs from vector distances of
dissimilar pairs in new predictions and later analyses. In addition, we
developed a way to score the predictions by combining attributes from both the
distributions' features and the way the distance function works. Finally, we
generalize the results showing that they can be transferred to a wider range of
domains by applying the system discussed to a well-known and widely used
benchmark dataset for STS problems.