Skip to the content.

Depth, Seeds, and Training Budget in BERT Bi-Encoder Retrieval

A controlled ablation across three BEIR tasks.

Headline. At 20K training steps, BERT bi-encoder depth from L3 to L12 is invariant within seed noise. At 80K steps, every depth degrades on zero-shot BEIR transfer — catastrophically on fiqa (−45% NDCG@10 for L12). L6 is the single most robust operating point across both training budgets, while encoding ~20% faster than L12.


The experiments

Five controlled runs. Depth is the only within-experiment variable.

Experiment Batch Steps Seed Purpose
A 256 20K 42 Large-batch baseline
B 32 20K 42 Standard batch-32 run
C 32 20K 43 Seed variance
D 32 20K 44 Seed variance
E 32 80K 42 Training saturation (4× B)

Each experiment trains four depths ({3, 6, 9, 12}) identically and evaluates on nfcorpus, scifact, fiqa with NDCG@10, MRR@10, Recall@10, Recall@100.


Headline figures

Depth × training budget: seed-averaged 20K with ±2σ and single-seed 80K overlaid

Figure 1. At 20K the depth curve is flat within the shaded band; at 80K every depth has dropped, and the drop is largest at L12.

Per-benchmark NDCG@10 change from 20K to 80K

Figure 2. nfcorpus and scifact move within noise; fiqa crashes for every depth — worst for L12 (−45%).

Seed variance by depth at 20K

Figure 3. L12’s σ across three seeds is 0.0069, vs. σ ≤ 0.001 for L3/L6/L9. Deep models are undertrained at 20K; shallow models have already converged.

Pareto frontier across training budgets

Figure 4. L6 sits on the Pareto frontier at both training budgets — tied-best at 20K, clearly best at 80K.


Read the writeup


Contributions, calibrated

This is a small, well-controlled empirical study — not a new method, architecture, or training recipe. Specifically:

  1. A depth-dependent seed-variance signal. σ_L12 is 7–23× larger than σ_L3/L6/L9 at the same training budget. Usable as a cheap undertraining diagnostic for depth-ablation studies.
  2. A clean depth × training-budget interaction. More training compute makes every depth worse on zero-shot BEIR transfer; deeper models degrade more. DRAGON-consistent, but demonstrated with the depth axis attached.
  3. A pointwise robustness claim: L6. Top-2 at 20K, top-1 at 80K, ~20% faster than L12 to serve. Not “L6 is the best bi-encoder depth in general” — but “under this recipe, if you don’t know whether you will under- or over-train, L6 dominates L12 in expectation.”

See the report’s Related Work for how this relates to DRAGON, DPR, and Contriever.


Reproduce

git clone https://github.com/MohanKrishnaGR/bert-bi-encoder-depth-ablation.git
cd bert-bi-encoder-depth-ablation

# Experiment B (the canonical batch=32 run)
bash scripts/run_b32.sh --config config_b32.yaml

~75 GPU-hours total across all five experiments on a single H100.


What this does not claim

Full list in report.md → Limitations and Open Questions.