Dense image retrieval is accurate but offers limited interpretability and attribution, and it can be compute-intensive at scale. We present BM25-V, which applies Okapi BM25 scoring to sparse visual-word activations from a Sparse Auto-Encoder (SAE) on Vision Transformer patch features. Across a large gallery, visual-word document frequencies are highly imbalanced and follow a Zipfian-like distribution, making BM25's inverse document frequency (IDF) weighting well suited for suppressing ubiquitous, low-information words and emphasizing rare, discriminative ones. BM25-V retrieves high-recall candidates via sparse inverted-index operations and serves as an efficient first-stage retriever for dense reranking. Across seven benchmarks, BM25-V achieves Recall@200 ≥ 0.993, enabling a two-stage pipeline that reranks only K=200 candidates per query and recovers near-dense accuracy within 0.2% on average. An SAE trained once on ImageNet-1K transfers zero-shot to seven fine-grained benchmarks without fine-tuning, and BM25-V retrieval decisions are attributable to specific visual words with quantified IDF contributions.
Figures & tables
Text BM25
BM25-V (visual)
Document d
Image I
Term vocabulary {t}
SAE dimensions {0,…,eD−1}
Term frequency ft(d)
v[i]=∑pH~[p,i] (sum-pool)
Document length ∣d∣
∥v∥1 (L1 norm)
Document freq dft
dfi=∣{j:vj[i]>0}∣
IDFt
IDFi=ln(1+dfi+0.5N−dfi+0.5)
Table 1: The text–vision BM25 analogy is structural, not metaphorical. Sum-pooling SAE activations across all P patch tokens is mathematically equivalent to counting term occurrences across document tokens. Here H~∈RP×eD denotes the SAE activation matrix ( H~[p,i] is the activation of dimension i at patch p ), and eD is the SAE feature dimension.
CUB-200
Cars-196
Aircraft
Pets
Flowers-102
DTD
Food-101
Method
R@1
R@5
R@10
R@1
R@5
R@10
R@1
R@5
R@10
R@1
R@5
R@10
R@1
R@5
R@10
R@1
R@5
R@10
R@1
R@5
R@10
Dense †
.767
.948
.975
.922
.988
.996
.707
.915
.966
.912
.982
.990
.989
.997
.998
.762
.912
.946
.954
.987
.992
FAISS-HNSW †
.768
.948
.975
.922
.988
.996
.708
.915
.966
.912
.982
.990
.989
.997
.998
.762
.912
.946
.954
.987
.992
FAISS-IVF+PQ †
.734
.918
.947
.897
.978
.987
.715
.918
.958
.915
.957
.965
.941
.956
.958
.706
.847
.880
.941
.974
.980
BM25-V (ours)
.472
.738
.835
.715
.900
.946
.523
.765
.851
.771
.923
.962
.954
.986
.993
.747
.888
.930
.865
.947
.965
Two-stage K=100 (ours)
.744
.929
.960
.914
.983
.990
.701
.908
.960
.916
.979
.988
.990
.997
.998
.769
.919
.955
.946
.980
.986
Table 2: R@1/5/10 on cross-domain fine-grained retrieval (7 datasets). SAE trained on ImageNet-1K, zero-shot. Two-stage: BM25-V top- K candidates → dense cosine rerank. † Dense-only methods (no interpretability).
k
R@1
Index size (MB)
16
0.508
35.8
32
0.483
61.7
64
0.396
97.2
128
0.038
140.6
Table 3: Effect of sparsity k on CUB-200-2011 (R@1 and sparse index size). Low k preserves discriminative structure; k=128 collapses.
Method
Memory/vec
Compression
Query ops
Dense (exact)
4D
1×
2DN
HNSW [ 17 ]
4(D+2M)
≈1×
2D⋅ef
IVF+PQ [ 10 ]
m⋅bPQ
up to 192×
nlnpmN
BM25-V (ours)
6L0
48×
VactiveC⋅L02N†
Two-stage (ours)
4D+6L0
≈1×
VactiveC⋅L02N+KD
Table 4: Efficiency comparison. Memory is per-vector storage; query cost counts scoring operations for one query against N reference images. D : dense embedding dimension; M , ef: HNSW graph degree and search budget; m , bPQ : PQ sub-quantizers and bytes per code; np , nl : IVF probe and list counts; L0 : non-zeros per sparse vector; C : FLOPs per BM25 posting entry. Our config: D=1152 , M=32 , ef=100 , m=48 , bPQ=1 , nl=100 , np=1 , L0=16 , K=200 . †Vactive ranges from 527 to 3,240 across our benchmarks; as N grows, Vactive→Ds and cost →CL02N/Ds ( Eq. 11 ).
Figure 1: Normalized rank-frequency log-log plot for all 7 datasets. Each curve is normalized so rank-1 frequency =1 . Near-parallel lines confirm a common power-law family with α∈[1.20,2.32] ; slopes steeper than text Zipf ( α≈1 ) show that visual words are more heavy-tailed than natural language.