Skip to content
Edit this page

Measurements

Everything here was run by this project and says what happened under the stated conditions. None of it is a result about the methods in general. One SAE was trained at the size of its reference; everything else is small, and no retrieval recipe has been run at the scale of its source.

Page What was run
SAE training on real encoders short SAE runs on ruri-v3 and modernbert-ja encoders, their per-text and per-latent statistics, reranking with nothing trained, BM25 over summed activations
The published SAE the 65,536-latent SAE of modernbert-ja-310m that this project publishes: one billion tokens, against the published SAE of the same encoder, what its most frequent latents cost before and after retrieval training, and an SAE with twice the latents next to it
Retrieval training the SAE head against the vocabulary head on a 30M encoder (three seeds) and on a 310M encoder with a published SAE
Probability threshold the experimental normalised scores of the vocabulary head against the shift and the SAE head
Capacity the experimental cap on the share of texts an entry appears in
A smaller encoder for queries a 30M query encoder next to a 310M document encoder, with a vocabulary head and with an SAE head, and the time to encode a query
A dense retriever next to the sparse heads one encoder, ruri-v3-pt-310m, trained as a dense retriever, with a frozen SAE head and with a grafted vocabulary head, next to the published ruri-v3-310m
Recipes one small run of seven of the nine recipes
Sparse backward pass step time and memory against dense autograd on CPU, MPS and CUDA

In short

All retrieval training is small: 2,000 steps of 16 queries, evaluated on JQaRA. None of it is a result about the methods in general. On modernbert-ja-30m, with three seeds:

  • A frozen SAE head (8,192 latents, trained on 30 million tokens) against a shifted vocabulary head with 16 logits per position: on 800 test queries the SAE head is 0.081 nDCG@10 lower (95% interval 0.062 to 0.099, over runs and queries). On the development split, where every query has 50 candidates and scores sit near 0.87, the difference is 0.015 to 0.022.
  • The scale of the contrastive loss matters more than any other setting tried. Multiplying the scores by 0.2 instead of 1 raised both heads on the development split (the vocabulary head by 0.02 to 0.03, with vectors three to six times as dense) and removed most of the variation between seeds.
  • bfloat16 autocast lowered the SAE head clearly in one comparison; the runs above are float32.
  • Distillation from rerankers added 0.014 on the test queries for the SAE head and helped the vocabulary head mainly when its vectors were capped.

On modernbert-ja-310m, with the published SAE of that encoder (65,536 latents, about a billion tokens) and one seed, the picture changes: the frozen SAE head and the shifted vocabulary head both reach 0.637 on the test queries, and with vectors capped at 64 and 256 weights the SAE head is 0.016 ahead (0.005 to 0.027 over queries). The gap on the small encoder belongs to the small SAE or the small encoder, not to SAE heads. The tables are under Retrieval training. An SAE of the same size trained here on one billion tokens is level with the published one, in reconstruction and as a frozen head over three seeds: The published SAE.

The experimental probability threshold of the vocabulary head, with two seeds: on modernbert-ja-30m it is 0.017 to 0.051 ahead of the shifted head at the closest vector size, loses at most 0.018 when its vectors are cut to 64 weights, and stays at about 100 weights per document without any sparsity regulariser, where the shifted head grew to about 400 in one run. On modernbert-ja-310m, without a regulariser, it is 0.036 below the shifted head (0.027 to 0.046) and 0.032 below the SAE head, with vectors a sixth to a third of their size; why is not known. The tables are under Probability threshold and Capacity.

Seven of the recipes were each run once under the same small conditions on modernbert-ja-30m. The two SPARSEUP recipes and SlideOn trained; the three that pool the language-model head's logits without a shift ended with empty or nearly empty vectors, and the SAE-SPLADE recipe, on a poorly trained SAE, got worse than the untrained model. The numbers, and what the diagnostics showed before the first update, are under Recipes.

The head is also tested for correctness: its vectors equal the ones probe-sae scores, on a tiny model and on ruri-v3-30m with its real tokenizer; its gradients equal a dense computation; and a few training steps on a tiny model update the encoder and leave a frozen SAE unchanged.

The latents of the published SAE that are active in more than half of the training documents, 101 of 65,536, carry about two fifths of the FLOPS of a trained SAE-head retriever and none of its accuracy: left out when searching, nDCG@10 changes by +0.001 (-0.001 to +0.002, three seeds), and a model trained without them is level without a cap and 0.007 ahead with capped vectors. The table is under The published SAE.

An SAE with twice the latents, 131,072, trained on the same corpus for the same billion tokens, reconstructs better (a fraction of variance unexplained of 0.138 against 0.153) and is no better as a head: 0.006 lower on the test queries (0.000 to 0.011, three seeds) and level with capped vectors. The tables are under Twice the latents.

One encoder as a dense retriever and with two sparse heads: on ruri-v3-pt-310m, a checkpoint that ranks well as a dense retriever before any fine-tuning, with an SAE trained here and a vocabulary head grafted from modernbert-ja-310m, three seeds. After the same 2,000 steps the SAE head is 0.018 nDCG@10 above the dense retriever on the test queries (0.010 to 0.027) and the vocabulary head 0.016 above it (0.006 to 0.026); with the dense loss at other scales the difference stays. The fine-tuned model the encoder's authors publish is 0.03 to 0.05 above all three, and on JaGovFaqs, away from the training texts, the sparse heads are below the dense retriever. The short training with small batches gives the dense retriever little, so this is no result about dense and sparse retrieval in general. The tables are under A dense retriever next to the sparse heads.

A smaller encoder for queries (guide), modernbert-ja-30m next to modernbert-ja-310m for documents, with three seeds: with a vocabulary head it is 0.051 nDCG@10 below the symmetric model (0.041 to 0.060) and encodes a query in 23 ms instead of 114 ms on four CPU threads. The stitched SAE head was 0.30 below after the same 2,000 steps and its loss was still falling. The tables are under A smaller encoder for queries.