Optimal synthesis embeddings

Roberto Santana, Mauricio Romero SicrearXiv 2024 · DOI

Abstract

This paper introduces Optimal Synthesis Embeddings (OSE), a novel geometric method for aggregating multiple word vectors into a single representation. By finding a point equidistant from all constituent words while minimizing total distance, OSE creates a "fair" representation that avoids the biases inherent in simple arithmetic averaging. Our evaluation across diverse NLP benchmarks demonstrates that OSE significantly improves performance in linguistic probing tasks and provides a robust mechanism for data augmentation.

The Challenge of Vector Aggregation

In Natural Language Processing (NLP), representing a group of words—such as a sentence or a semantic category—as a single vector is a fundamental requirement. The industry standard is the "Bag of Vectors" (BOV) approach, which simply calculates the arithmetic mean of individual word embeddings.

However, simple averaging can be biased toward clusters of similar words, potentially washing out the unique contributions of disparate terms. The authors argue that a truly representative vector should be "fair," meaning it should be equally similar (equidistant) to every word in the set. OSE addresses the mathematical challenge of finding this equidistant vector in high-dimensional space to investigate whether geometric balance improves downstream machine learning performance.

Methods: Defining Geometric Fairness

The authors frame the task as a constrained optimization problem using cosine similarity. They define the Optimal Synthesis Embedding (OSE) as the solution to finding a vector $x$ that maintains the exact same distance from $N$ other vectors while remaining as close to the set as possible. Mathematically, this involves projecting a target vector onto the orthogonal complement of the subspace spanned by the differences between the constituent word vectors.

OSE is applied in two primary scenarios:

  1. Sentence Representation: Using the OSE of all words in a sentence as its embedding.
  2. Data Augmentation: Generating synthetic examples for a word class by calculating the OSE of $k$ random words from that class.

Experimental Setup

The researchers evaluated OSE using a wide array of embeddings, including fasttext, GloVe, word2vec, BERT, RoBERTa, and the Universal Sentence Encoder (USE). These were tested on two major benchmarks:

  • SEMCAT: A dataset of 6,500+ words in 110 categories used for classification and augmentation tests.
  • SentEval: A comprehensive library featuring 10 Probing Tasks (e.g., sentence length, word content) and 14 Downstream Tasks (e.g., sentiment analysis, paraphrase detection).

Results and Discussion

Probing Task Dominance

OSE demonstrated a clear advantage in capturing linguistic structure. In multi-layer perceptron (MLP) evaluations for probing tasks, OSE outperformed the standard BOV approach in 30 out of 50 combinations of embeddings and tasks.

Table 1: Performance of BOV vs. OSE across linguistic probing tasks. OSE achieves superior results in 30 out of 50 total combinations.

Significant gains were observed in specific tasks like WordContent and TopConstituents, where OSE improved performance by over 6% compared to the best BOV results. This suggests that the equidistant constraint preserves structural information that is typically lost during simple averaging.

Data Augmentation and Classifier Synergy

OSE-based augmentation consistently improved baseline classification accuracy. The method is particularly effective when paired with K-Nearest Neighbors (KNN) classifiers; because OSE is built on distance minimization, it aligns naturally with the logic of distance-based classification.

Figure 1: Impact of OSE-based data augmentation on classification scores across different group sizes.

Limitations and Future Work

A primary limitation of OSE is its sensitivity to outliers. Because the model forces the synthesis vector to be equidistant from all constituents, a single unrelated word can pull the OSE vector significantly away from the intended semantic center.

Future research may explore "weighted" OSE versions to mitigate outlier influence, or investigate OSE's utility in neutralizing social biases by finding equidistant representations between gendered or culturally-loaded variations of terms.

Summary updated

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
WordContentBOV with fasttext embeddingsclassification accuracy80.55MLP sentence classifier on the probing benchmark; best BOV result for WordContent, comp…
Source quote
L337: WordContent │ 80.55 │ 86.91 │ 76.83 │ 77.52 │ 36.32 │ {\bf{86.98}} │ 42.92 │ 36.28 │ 20.85 │ 4.81 │ 70.15 │ 2 │ 3
TopConstituentsBOV with BERT embeddingsclassification accuracy66.56MLP sentence classifier on the probing benchmark; BOV and OSE scores use BERT embeddings.
Source quote
L339: TopConstituents │ 61.37 │ 65.18 │ 57.45 │ 60.43 │ 56.78 │ 57.70 │ 66.56 │ {\bf{73.75}} │ 33.85 │ 29.55 │ 62.82 │ 1 │ 4
TopConstituentsOSE with BERT embeddingsclassification accuracy73.75MLP sentence classifier on the probing benchmark; BOV and OSE scores use BERT embeddings.
Source quote
L339: TopConstituents │ 61.37 │ 65.18 │ 57.45 │ 60.43 │ 56.78 │ 57.70 │ 66.56 │ {\bf{73.75}} │ 33.85 │ 29.55 │ 62.82 │ 1 │ 4
CRBOV with BERT embeddingsclassification accuracy84.72Sentiment Classification
Source quote
L370: CR │ 79.39 │ 79.65 │ 79.73 │ 76.98 │ 77.75 │ 77.72 │ {\bf{84.72}} │ 83.05 │ 66.07 │ 63.95 │ 81.45 │ 4 │ 1
CROSE with BERT embeddingsclassification accuracy83.05Sentiment Classification
Source quote
L370: CR │ 79.39 │ 79.65 │ 79.73 │ 76.98 │ 77.75 │ 77.72 │ {\bf{84.72}} │ 83.05 │ 66.07 │ 63.95 │ 81.45 │ 4 │ 1
BibTeX
@misc{santana2024optimal,
  author = {Roberto Santana and Mauricio Romero Sicre},
  title = {{Optimal synthesis embeddings}},
  year = {2024},
  eprint = {2406.10259},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.10259},
}
Figure