This is a Sentence Transformers SparseEncoder / SPLADE-style model fine-tuned for financial filing retrieval.
The practical recommendation from the experiments below is to index document vectors after top-128 pruning. In the current proxy retrieval benchmark, top-128 keeps almost all unpruned quality while reducing each document to about 126 active sparse terms.
Naming note: the model is not document-only. It is an asymmetric query/document sparse encoder, following the OpenSearch model-family convention where the heavier document-side path is emphasized. Use encode_query(...) for online queries and encode_document(...) for offline document/chunk indexing.
This is an experiment report as much as a model card. It describes what was tried, why decisions were made, what worked, and what remains unproven.
Why this exists
Financial filing search is not generic semantic similarity. Queries often refer to company events, accounting concepts, risk factors, segment details, and filing-specific language. A learned sparse model is attractive because it can improve ranking while preserving an Elasticsearch/OpenSearch-style sparse retrieval path.
The goal here was to train a domain-adapted sparse encoder that can be deployed as weighted sparse terms, then test whether the learned sparse signal is meaningfully better than both the base sparse model and a lexical BM25 baseline.
Starting point
This experiment started after the Sentence Transformers v5.5.0 release and its new train-sentence-transformers agent skill. The release made it easier to create a complete sparse-encoder training workflow: base model choice, loss selection, sparse regularization, top-k pruning checks, and model-card packaging.
Before training, the important constraints were:
Use a sparse encoder suitable for Elasticsearch/OpenSearch-style retrieval.
Keep vectors sparse enough to index in practice.
Use the user's existing Hugging Face dataset and local Apple Silicon machine.
Avoid overclaiming from pairwise training accuracy alone.
Reason: it already has separate query/document sparse encoding behavior and is aligned with OpenSearch neural sparse retrieval. Starting here means fine-tuning adapts a serving-compatible sparse model rather than building a new retrieval stack from scratch.
The doc wording in the base model name does not mean queries are encoded with the document encoder. This model should be used with the routed Sentence Transformers sparse API:
In practice, query encoding is the lightweight online side, while document encoding is the heavier offline/indexing side. The top-k pruning recommendation applies to document vectors before indexing.
accuracy = fraction of rows where positive scores higher than the paired negative
model
doc pruning
accuracy
mean margin
query dims
positive doc dims
base sparse
unpruned
49.6%
0.451
15.2
371.1
fine-tuned sparse
unpruned
78.1%
3.004
15.2
340.9
fine-tuned sparse
top-128
78.0%
2.992
15.2
126.7
fine-tuned sparse
top-64
75.9%
2.988
15.2
64.0
Interpretation: the fine-tuned model learned the domain signal strongly. Top-128 preserved almost all pairwise quality.
Evaluation 2: in-memory retrieval proxy
A retrieval candidate pool was built from the held-out test split:
1,000 held-out queries
all unique positives from those rows
all unique first hard negatives from those rows
1,912 unique candidate chunks total
For each query, the known positive chunk is the only labeled relevant document. The model ranks all 1,912 candidate chunks by sparse dot product. BM25 ranks the same candidate corpus with a local lexical implementation.
Metrics:
Recall@1
Recall@5
Recall@10
Recall@20
MRR@10
nDCG@10
median rank
model
pruning
Recall@1
Recall@5
Recall@10
Recall@20
MRR@10
nDCG@10
median rank
fine-tuned sparse
unpruned
39.0%
58.9%
67.5%
75.0%
0.479
0.526
3
fine-tuned sparse
top-128
38.6%
57.8%
67.2%
73.9%
0.473
0.521
3
fine-tuned sparse
top-64
35.0%
55.7%
64.8%
72.4%
0.442
0.491
4
base sparse
unpruned
32.1%
56.5%
63.7%
69.9%
0.431
0.481
3
base sparse
top-128
31.4%
54.4%
62.7%
69.7%
0.422
0.472
3
base sparse
top-64
29.5%
52.6%
59.5%
66.5%
0.396
0.444
4
BM25
lexical
24.0%
58.2%
64.1%
68.6%
0.397
0.457
3
Interpretation:
Top-128 fine-tuned sparse is the best current deployment candidate.
BM25 is competitive at Recall@10, but worse at early precision and ranking quality.
Fine-tuning mostly improved early ranking: Recall@1 rose from 32.1% for the base sparse model to 39.0% unpruned, and 38.6% at top-128.
Top-64 is usable only if index size or latency dominates quality.
Recommended serving configuration
Use document top-k pruning:
document_top_k = 128
Rationale:
setting
Recall@10
nDCG@10
doc active dims
unpruned
67.5%
0.526
319.8
top-128
67.2%
0.521
126.5
top-64
64.8%
0.491
64.0
Top-128 gives almost the same retrieval quality as unpruned with a much smaller sparse index footprint.
Usage
python
1from sentence_transformers.sparse_encoder import SparseEncoder
23model = SparseEncoder("oneryalcin/financial-filings-sparse-encoder-v1")45query_vectors = model.encode_query([6"What does the company say about liquidity risk?"7])89document_vectors = model.encode_document([10"The company discusses liquidity and capital resources in the MD&A section..."11])
For production-style sparse indexing, keep the highest-weighted 128 dimensions per document vector before indexing.
Reproduction
The local runs used uv with a package-date cutoff: