What Is the Cross-Encoder Buying? Replacing GPL's Pseudo-Labels with Loss Geometry

When a search model trained on general web data is moved to a specialized collection such as biomedical abstracts, financial forums, or scientific claims, a common recipe is to adapt it without human labels. The recipe has four steps. A small generator writes synthetic questions for each document. An existing retriever pulls up similar-looking "negative" documents for each question. A large, slow model that reads question and document together (a cross-encoder) scores every pair. Finally, the fast retriever is trained to reproduce those scores. The recipe works, but the scoring step is the expensive part: the heavy model must read hundreds of thousands to millions of question–document pairs offline. This note argues that, in narrow domains, most of what the cross-encoder contributes is one specific geometric correction. It stops the retriever from shoving apart documents that are actually relevant, which the mining step frequently mislabels as negatives. We think a loss function with the right shape can supply the same correction for almost no cost.

The core idea fits in two sentences. In a narrow domain many "hard negatives" are really near-duplicates of the answer, and a standard contrastive loss pushes them away as hard as it can. That breaks up the tight topic clusters the domain depends on. We propose a doubly bounded margin loss. It stops pushing a negative once that negative is safely below the positive, and it also stops pushing a negative that scores implausibly far above the positive, since such a negative is probably a mislabeled relevant document. We will test whether training on raw synthetic questions with this loss recovers the gains of cross-encoder pseudo-labeling, and we will check that claim directly against measurements of how the embeddings spread over the sphere.

Core Claim and Where It Comes From

Contrastive training maps each text to a point on a unit sphere. Wang and Isola showed in Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere that, when the number of negatives is very large, the standard contrastive objective reduces to two forces. Alignment pulls matching pairs together. Uniformity spreads all points evenly over the sphere. Understanding the Behaviour of Contrastive Loss then showed that the temperature, a scaling constant inside the loss, sets how hard the loss focuses on the nearest negatives. It named the resulting trade-off the uniformity–tolerance dilemma: aggressive repulsion gives an even spread but breaks up genuine semantic clusters. These two papers motivate the proposal. A specialized corpus is almost by definition a set of dense clusters, so it is exactly where excess uniformity should hurt.

On The Inadequacy of Optimizing Alignment and Uniformity in Contrastive Learning of Sentence Representations supplies the method. It found that the standard loss behaves well partly because its gradient fades away once a negative is far enough from the anchor, which it calls gradient dissipation. It also showed that margin-bounded losses that make this cutoff explicit raise BERT-base STS from 76.04 to 78.38. That paper worked only on general-domain Wikipedia sentences and bounded the loss on one side only. Balancing Embedding Spectrum for Recommendation and Dual-View Whitening on Pre-trained Text Embeddings for Sequential Recommendation constrain the design space. They show that forcing a perfectly uniform spread fights semantic clustering, and that fixing uniformity after training disrupts the clusters. For that reason we will not use post-hoc whitening as the fix.

GPL: Generative Pseudo Labeling for Unsupervised Domain Adaptation of Dense Retrieval is the system we want to explain. It generates questions with T5, mines negatives with a dense retriever, and trains the student to match cross-encoder score margins. It reports gains of up to 9.3 nDCG@10 over models trained only on MS MARCO. GPL never examines the geometry of the adapted embeddings. Our claim is that its cross-encoder margins act as a soft tolerance signal. When a mined negative is really relevant, the cross-encoder gives it a small margin, so the student does not push it away. If that is the main mechanism, the correction can be written into the loss instead of computed by a heavy model.

For a synthetic question $q$ with its source document $p$ and mined negatives $n$, write $s(\cdot,\cdot)$ for the cosine similarity of the retriever's embeddings. We will train the retriever with

$$\mathcal{L}(q) = \sum_{n} \min\Big(c,\; \max\big(0,\; s(q,n) - s(q,p) + m\big)\Big),$$

Here $m$ is the margin by which the positive must beat each negative. Once a negative falls below that margin, its gradient is zero; this is the lower-side dissipation borrowed from the Inadequacy paper. The ceiling $c$ caps the penalty for negatives that score much higher than the positive. These are the likeliest false negatives, and under the cap they stop driving updates. The second bound is what is new. It expresses tolerance directly in the loss, where the prior margin losses express only the uniformity cutoff. We will set $m$ and $c$ per domain from a quantity that costs no labels: the distribution of $s(q,p)$ over the synthetic pairs, measured with the starting model.

Research Program

The work has three parts, and they depend on each other.

The first part is diagnosis. On five specialized BEIR collections (TREC-COVID, BioASQ, NFCorpus, SciFact, FiQA; BEIR), we will run GPL exactly as published. We will record three things about the mined negatives:

  • how often the cross-encoder scores a mined negative within a small margin of the positive, which is our estimate of the false-negative rate;
  • the alignment and uniformity statistics of the student on held-out in-domain pairs, before and after adaptation;
  • a local uniformity statistic computed only within topic clusters, where clusters are formed by k-means on the starting embeddings.

The mechanism claim predicts two things. Collections with high false-negative rates should show the largest GPL-over-GenQ gains, where GenQ means plain contrastive training on synthetic questions. And plain contrastive training should inflate local uniformity inside clusters on those same collections, meaning it pulls clusters apart.

The second part is replacement. We will train on the same synthetic questions and the same mined negatives with the doubly bounded loss, dropping the cross-encoder entirely. We will then measure retrieval quality and the full offline cost in GPU-hours, broken down into generation, mining, labeling, and training.

The third part checks whether the result holds on domain-adapted backbones. GPL reports that combining it with denoising pre-training on the target corpus (TSDAE) helps. Domain pre-training is also where narrow-distribution training is known to concentrate representations into a narrow cone, a failure called anisotropy. We will therefore repeat the comparison starting from a TSDAE-adapted backbone and ask whether the tolerance correction matters more or less once the backbone has already been pulled toward the domain. The synthetic-generation cost stays fixed throughout: we use GPL's small T5 generator, not the 137B model in Promptagator. The question is how much of the downstream labeling and filtering can be removed, not how much generation can be scaled up.

Baselines

The naive reference point is the general-domain retriever used zero-shot, TAS-B as in GPL. Next to it is BM25, which reaches 43.0 nDCG@10 on BEIR14 according to AugTriever. BM25 stays in the comparison because it is still hard to beat on technical text. Any adapted model that fails to beat BM25 on a given collection has not justified its cost there.

The "do nothing extra" neural baseline is GenQ. It uses the same synthetic questions and the same mined negatives with the standard in-batch contrastive loss at the default temperature. It isolates what the cross-encoder adds on top of synthetic data.

The strongest competitor is GPL itself, which spends the most compute on precisely the problem we target. We will rerun it with its published generator, miner, and cross-encoder on identical synthetic questions and negatives, the same student initialization, and the same number of training steps. For published context, the file reports that GPL improves "up to 9.3 points (nDCG@10)" over MS MARCO-only training. It also reports that JPQ+GPL reaches 0.435 average nDCG@10 against 0.415 for uncompressed TAS-B in Domain Adaptation for Memory-Efficient Dense Retrieval. We found no per-collection GPL result on Lacuna for the five subsets, so our own rerun is the reference.

We will count our method as beating GPL in a useful sense if it recovers at least 80% of GPL's nDCG@10 gain over GenQ, averaged over the five collections, while cutting offline GPU-hours by at least half. It must also do so without losing to GenQ on any single collection. Outright wins over GPL are not required for the claim, but we will report them if they occur.

Two ablations isolate the key ingredient. The first keeps only the lower bound, which is essentially the prior margin loss moved to retrieval. The second keeps only the ceiling. If the ceiling contributes nothing, the tolerance part of the mechanism claim is wrong.

Every loss variant gets the same hyperparameter budget of 12 configurations, tuned on a held-out split of synthetic questions, never on test labels.

Why not just…?

Why not just raise the temperature of the standard contrastive loss? This is the most serious threat. Wang and Liu show that higher temperature buys tolerance, so a well-tuned temperature might recover GPL's gain by itself. We will give GenQ its own 12-configuration temperature sweep. If tuned temperature matches the bounded loss, we will report that finding as it stands. The cross-encoder would still be shown to be buying tolerance, and the cheapest remedy would be a single scalar. What could separate the two is that temperature relaxes repulsion for every negative, whereas the ceiling targets only the suspicious ones. Local-uniformity measurements will show whether that difference appears in the geometry.

Why not just drop suspicious negatives with a cheap filter? One could discard mined negatives whose starting-model similarity exceeds the positive's. That is a zero-cost relative of our ceiling, and it could plausibly work as well. The difference is that hard deletion removes the negatives that carry the most information, echoing the over-pruning that Promptagator's round-trip filter causes on NFCorpus. The cap keeps each such example in the batch while bounding its pull. We will run this filter as a baseline with the same threshold as the ceiling.

Why not just use a smaller cross-encoder? That lowers cost but keeps the labeling stage and its pipeline complexity. UDAPDR moves in the opposite direction, using ensembles of DeBERTa-large rerankers, which suggests the teacher's quality matters. We will include a MiniLM-sized cross-encoder as a cost-matched point on the accuracy-versus-GPU-hours curve.

Why not just continue pre-training with denoising and skip contrastive tuning? GPL already reports that TSDAE alone falls short of TSDAE combined with GPL. We therefore treat TSDAE as a backbone condition in the third part of the program, not as a competing method.

Proposed Experiments and Decisive Checks

The main table will report nDCG@10 and Recall@100 on the five BEIR collections for BM25, zero-shot TAS-B, GenQ, GenQ with tuned temperature, GenQ with the negative filter, GPL with the full-size and small cross-encoders, and our loss with its two ablations. We will run every retriever from both the TAS-B and the TSDAE-adapted backbones and report offline GPU-hours for each. As a robustness check on a different kind of domain shift, we will also run the three cheapest competitive methods on LoTTE's five topic splits using Success@5, with UDAPDR's reported 64.5 → 74.8 on Lifestyle as context rather than a like-for-like baseline, since that system uses a different retriever.

Three outcomes will decide the claim. The first is whether, across collections, the size of GPL's gain over GenQ tracks the cross-encoder-estimated false-negative rate. That correlation is the mechanism test. The second is whether GenQ increases within-cluster uniformity relative to GPL and our loss on the high false-negative collections, which is the geometric test. The third is whether the doubly bounded loss meets the 80%-of-gain, half-the-cost threshold, and whether removing the ceiling erases that result. If all three hold, specialized-domain adaptation can drop its most expensive stage. If the first holds but tuned temperature matches our loss, the finding is still useful but smaller: the costly teacher is buying something one scalar can provide. If the first fails, the cross-encoder is contributing something other than tolerance, and our loss should not be expected to replace it.