Contrastive text encoders learn by picking out the one matching passage for a query from a crowd of non-matching "negative" passages. A consistent empirical finding, now backed by theory, is that bigger crowds help. The error from having more negatives grows only logarithmically with their number, and the mismatch between the contrastive objective and the downstream task shrinks as more negatives are added. Researchers have built tools, such as gradient caching and momentum queues, to afford tens of thousands of negatives on modest hardware.
All of this assumes the encoder sees its inputs as meaningful units. In biomedical, clinical and technical text, a general-purpose subword tokenizer (the component that splits text into vocabulary pieces) shatters terms like hydroxychloroquine into generic fragments. We propose to test whether this fragmentation quietly erodes the value of adding negatives. The mechanism we have in mind is that fragmented passages come to resemble each other because they share surface pieces, not concepts. Adding negatives then mostly teaches the encoder to tell apart fragment patterns. If that is right, the gain per doubling of negatives should be measurably smaller on heavily fragmented text, and repairing the vocabulary should restore it. That would be a cheaper fix than buying more negatives.
Core Claim
The measurable object is the return to negatives: how much retrieval quality improves each time the negative pool $K$ doubles. We fit, separately for each group of queries binned by fragmentation rate $f$ (average subword tokens per whitespace word in the query and its relevant passages),
$$\text{nDCG@10}(K, f) \approx a_f + b_f \log_2 K .$$
Here $a_f$ is the small-pool quality and $b_f$ is the gain per doubling of $K$. The log-linear form is a descriptive fit over a log-spaced grid of $K$, and we check it for curvature. It is not a consequence of the theory.
The claim has two parts. First, $b_f$ falls as $f$ rises under a general tokenizer. Second, adapting the vocabulary with an embedding initialization designed for contrastive training raises $b_f$ on high-$f$ queries, more than it raises $a_f$. In other words, the tokenizer and the negative pool interact. They do not simply add. Evidence of that interaction is what would be new.
Nobody in the material we examined has measured this interaction. On the negatives side, several papers derive their guarantees over abstract continuous inputs and never model how discrete tokenization produces those inputs: the logarithmic generalization bounds of Generalization Analysis for Contrastive Representation Learning and Generalization Analysis for Deep Contrastive Representation Learning, the $\mathcal{O}(1/K)$ surrogate-gap result of On the Surrogate Gap between Contrastive and Supervised Losses, and the minimizer analysis in Do More Negative Samples Necessarily Hurt In Contrastive Learning?. These papers motivate the question.
The last of them also constrains it. It shows that negatives sharing the anchor's latent class ("collisions") do not hurt, but only under discrete, non-overlapping classes. Fragments shared across unrelated technical terms are a natural way that assumption can fail. Our experiments therefore amount to asking whether fragment sharing behaves like the harmful collisions that theory rules out in the clean case.
On the tokenizer side, Efficient Domain Adaptation of Language Models via Adaptive Tokenization (adds domain n-grams chosen by KL-divergence and mean-initializes them), AweDist (distills new-token embeddings from the hidden states of the fragmented sequence), and Specialised or Generic? (shows radiology text shrinking from about 2.7 to about 1.0 tokens per word) study masked language modeling, classification or generation. None studies contrastive training or negative scaling. We reuse their methods as treatments.
We deliberately do not build the proposal around the obvious "shorter sequences free memory for more negatives" pitch. Gradient caching (Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup) already makes the size of the negative pool independent of GPU memory. Token compression therefore buys throughput, not feasibility. We report the throughput gain, but it is not the claim.
Research Program
The first component is a controlled fragmentation dial, which lets us make causal statements rather than rely on correlations across datasets. Starting from a domain corpus, we fix the concept inventory and vary only how its technical terms are segmented. There are three settings. The first is the general tokenizer. The second is an adapted vocabulary built the Adaptive Tokenization way. The third is an artificial over-segmentation that splits adapted terms into $m$ random pieces, which pushes $f$ above the natural level. Because the text and the relevance labels are identical across settings, any change in $b_f$ can be attributed to segmentation.
The second component trains encoders across a grid of pool sizes. We train bi-encoders at $K \in \{64, 256, 1024, 4096, 16384\}$ using the gradient caching codebase so that $K$ is not limited by memory. The encoders are trained with unsupervised cropping pairs in the style of Contriever on PubMed-like text, and with supervised MS MARCO pairs followed by domain continuation.
The third component is an initialization designed for contrastive training. We expect mean-initialized new tokens to create a cold-start problem that is specific to contrastive learning. Many new tokens start near the average of generic fragments, so under a large pool they may be pushed apart arbitrarily early in training. We will compare mean initialization and AweDist initialization against a small variant of our own. That variant keeps AweDist's hidden-state matching and adds a term that preserves the frozen encoder's in-batch similarity ranking of passages containing the term. The added term directly targets the geometry that InfoNCE (the standard contrastive loss) acts on.
The fourth component is a diagnostic for "diluted negatives." We construct fragment-matched distractors: passages about a different concept whose key terms share at least two subword pieces with the query's term. We then measure how often each encoder ranks them above the true positive as $K$ grows. If the mechanism is right, this error rate stays flat with $K$ under the general tokenizer and falls under the adapted one.
Baselines
The naive reference point is the published unsupervised Contriever checkpoint, evaluated as released. Beside it we train an otherwise identical model on our domain corpus with the general tokenizer, at every $K$ in the grid. That second model is the "do nothing to the tokenizer" condition against which the interaction is measured. Beating it means a larger $b_f$ on the top-fragmentation query tercile, not just a higher average.
The strongest competitor on the actual question, whether vocabulary repair beats more negatives or more domain training, is contrastive domain-adaptive training with the general tokenizer. It sees the same corpus and gets the same GPU-hours, the same number of training tokens and the same hyperparameter search budget. Its only difference from our condition is the vocabulary. Matching GPU-hours means the adapted models see more passages per hour because their sequences are shorter. We report results both at matched hours and at matched passages so that this advantage is visible and not hidden.
For external context we include BM25 and dense-sparse hybrid fusion run through Pyserini. On BEIR, Resources for Brewing BEIR reports an average nDCG@10 of 0.429 for BM25 and 0.493 for Contriever plus SPLADE fusion. That paper also notes dense models failing on rare terminology in BioASQ. We found no per-dataset biomedical nDCG@10 for Contriever reported on Lacuna, so we will reproduce those numbers ourselves with Pyserini. For the supervised pipeline, the gradient-caching paper reports 79.3% top-20 accuracy on Natural Questions with a single-GPU DPR, which we use as a sanity check that our training reproduces.
Three ablations isolate the key ingredient. Mean initialization versus AweDist versus our similarity-preserving initialization isolates the initialization. The artificial over-segmentation setting isolates segmentation itself. And adding tokens but keeping the original sequence length, by padding to the general tokenizer's length, separates concept units from any benefit of shorter sequences.
Why not just…?
Why not just keep scaling the negative pool? If fragmentation merely adds noise, a 131,072-entry queue as in Contriever might wash it out. The fit of $b_f$ answers this directly. If the high-fragmentation groups show the same slope as the low ones, more negatives suffice and our hypothesis is wrong. We extend the grid to 16,384 with gradient caching and add one queue-based run at 131,072, so that "just go bigger" is actually tested.
Why not just do domain-adaptive training with the original tokenizer and let the encoder learn to glue fragments? This is the most serious threat. Adaptive Tokenization found that its approach recovered over 97% of domain-adaptive pretraining's gains at roughly 72× less compute. That result concerns masked language modeling, and "recovered" leaves open whether full domain adaptation is still ahead given enough compute. The matched-compute baseline above settles the question for contrastive training. If it matches the adapted vocabulary on $b_f$, we will report that vocabulary repair offers only efficiency for this problem, not a change in how negatives help.
Why not just use BM25 or a hybrid for technical domains? BM25 is strong in zero-shot evaluation per BEIR, and fusion is stronger still. We report both. They do not answer our question, though, because they sidestep dense encoders instead of explaining why dense encoders fail on rare terms. Hybrid fusion also still needs a dense component, and any gain in that component carries through to the fusion. We will check whether an improved dense model raises the fused score.
Why not mine hard negatives instead? Mining negatives by surface similarity under a fragmented tokenizer may pick exactly the fragment-matched distractors our diagnostic targets, and so may amplify the problem. Our fragment-matched error rate will show which way it goes. We include one BM25-mined hard-negative run under each tokenizer.
Proposed Experiments
The primary evaluation uses the BEIR biomedical and scientific sets: TREC-COVID, NFCorpus, BioASQ, SciFact and SCIDOCS. The same models are also evaluated on the general BEIR sets as a control where fragmentation is low and no interaction is expected. We report nDCG@10 and Recall@100 at every $K$, per fragmentation tercile, together with the fitted $b_f$ and bootstrap confidence intervals over queries. To connect with the theory, we also measure how close class centroids come to the equal-angle arrangement that the minimizer analysis predicts. We do this on a labeled subset: SciDocs categories for text, and Wiki-3029, which the surrogate-gap paper used.
Three results would count as decisive for the claim. The first is a significant negative dependence of $b_f$ on $f$ under the general tokenizer that also appears on the artificial over-segmentation dial, not only across datasets. The second is an adapted-vocabulary slope on the top tercile that exceeds the matched-compute domain-training baseline's slope, with a confidence interval excluding zero. The third is a fragment-matched distractor error that falls with $K$ only after vocabulary repair.
Two outcomes would falsify the claim. If the slopes do not depend on fragmentation, the proposal fails. If the adapted vocabulary raises $a_f$ but not $b_f$, then tokenization and negatives are separate, additive fixes; that would be a useful negative result for anyone deciding where to spend compute.
References
- Generalization Analysis for Contrastive Representation Learning
- Generalization Analysis for Deep Contrastive Representation Learning
- On the Surrogate Gap between Contrastive and Supervised Losses
- Do More Negative Samples Necessarily Hurt In Contrastive Learning?
- Efficient Domain Adaptation of Language Models via Adaptive Tokenization
- Token Distillation: Attention-Aware Input Embeddings for New Tokens
- Specialised or Generic? Tokenization Choices for Radiology Language Models
- Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup
- Unsupervised Dense Information Retrieval with Contrastive Learning
- Resources for Brewing BEIR: Reproducible Reference Models and an Official Leaderboard
- BEIR: A Heterogeneous Benchmark for Zero-shot Evaluation of Information Retrieval Models