Abstract
Jina Embeddings constitutes a set of high-performance sentence embedding models adept at translating textual inputs into numerical representations, capturing the semantics of the text. These models excel in applications like dense retrieval and semantic textual similarity. This paper details the development of Jina Embeddings, starting with the creation of high-quality pairwise and triplet datasets. It underlines the crucial role of data cleaning in dataset preparation, offers in-depth insights into the model training process, and concludes with a comprehensive performance evaluation using the Massive Text Embedding Benchmark (MTEB). Furthermore, to increase the model's awareness of grammatical negation, we construct a novel training and evaluation dataset of negated and non-negated statements, which we make publicly available to the community.
Introduction
Sentence embedding models serve as the foundational infrastructure for modern semantic search and Retrieval-Augmented Generation (RAG) systems. Despite their importance, the development of high-performance embeddings is often hindered by three primary challenges: significant noise in massive web-scale datasets, the computational inefficiency of scaling model parameters, and a persistent "negation blind spot." Most contemporary models fail to distinguish between semantically opposite but syntactically similar statements (e.g., "I am happy" vs. "I am not happy"), leading to failures in logic-sensitive retrieval tasks.
Methodology
Jina Embeddings utilizes the encoder component of the Text-to-Text Transfer Transformer (T5) architecture. The researchers posit that T5's diverse pre-training provides a superior semantic foundation compared to standard BERT-style models. The training process is executed in a sophisticated two-stage pipeline:
- Pairwise Training: The model is first trained on query-target pairs using a bidirectional InfoNCE loss to establish broad semantic alignment.
- Triplet Fine-tuning: The model is refined using (anchor, positive, negative) triplets. This stage employs a multi-faceted loss function that combines an extended InfoNCE loss with a Triplet Margin Loss, specifically designed to push dissimilar items further apart in the vector space.
Data Preparation and Consistency Filtering
A core contribution of this work is the emphasis on data quality over quantity. The researchers aggregated 32 datasets across various domains, including e-commerce and web retrieval. To combat data noise, they implemented a Consistency Filtering pipeline. A smaller "teacher" model (all-MiniLM-L6-v2) was used to score the semantic similarity of 1.6 billion raw pairs; only the top 385 million highest-quality matches were retained.
Furthermore, the researchers applied manual sampling rate adjustments to ensure a balanced representation of data sources, preventing the model from over-fitting to dominant but potentially lower-utility datasets like Reddit.
To address negation blindness, the team developed the Jina Negation Dataset. By taking positive pairs from the SNLI dataset and using GPT-3.5 to generate synthetic "hard negatives" (negated versions of the anchor), the model was explicitly trained to recognize the semantic impact of tokens like "not" or "never."
Experimental Results
Evaluation was conducted using the Massive Text Embedding Benchmark (MTEB), covering 56 datasets across 8 distinct tasks. The results demonstrate that Jina Embeddings "punch well above their weight class."
Specifically, the jina-large-v1 model, with only 330 million parameters, achieved performance parity with models nearly four times its size, such as gtr-t5-xl (1.2B parameters). In the specialized "HardNegation" task, the models saw an accuracy leap from a baseline of ~16% to 65.4% following triplet fine-tuning.
As shown in the performance metrics, Jina models consistently rank at the top of the MTEB leaderboard for their size, particularly excelling in Reranking and Retrieval tasks which are critical for production search systems.
Conclusion and Future Work
The development of Jina Embeddings proves that rigorous data filtering and targeted synthetic data generation can compensate for smaller parameter counts. While the models show state-of-the-art performance in retrieval, future iterations will focus on closing the gap in classification and clustering tasks. Additionally, the team plans to expand the current 512-token sequence limit and explore multilingual training to broaden the utility of the suite.
Summary updated