Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lilyjge
Copy link
Member

@lilyjge lilyjge commented Aug 19, 2025

Bug in Anserini's SPLADE encoder logic that showed up from BRIGHT's really long queries: queries longer than the max sequence length of 512 have the CLS ending token truncated, resulting in the model going haywire. This is fixed in this PR, but we should probably rerun everything SPLADE ONNX that might have queries that fell in this e.g. ArguAna.
Fixing this resulted in some updates to BRIGHT SPLADEv3 ONNX numbers, updated here. Also fixed a typo in the regression docs.

Added the entire regression pipeline for BRIGHT SPLADEv3 cached, including topic bindings.

@lilyjge lilyjge requested a review from lintool August 19, 2025 01:04
Copy link
Member

@lintool lintool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits - please fix averages, per section + overall.

| Robotics | 0.1091 | 0.1578 |
| Stack Overflow | 0.1626 | 0.1290 |
| Sustainable Living | 0.1613 | 0.1497 |
| **StackExchange** average | **0.1705** | **0.1704** |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The averages change also, right?

queryTokens.add(CLS);
queryTokens.addAll(tokenizer.tokenize(query));
if (queryTokens.size() > MAX_SEQ_LEN - 2) {
queryTokens = queryTokens.subList(0, MAX_SEQ_LEN - 2);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in terms of code alignment, imo a ternary operator, i.e., x = y ? a : b; would look prettier, but don't feel too strongly.

@codecov
Copy link

codecov bot commented Aug 19, 2025

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.83%. Comparing base (17ccf97) to head (25a643e).

Files with missing lines Patch % Lines
...java/io/anserini/encoder/sparse/SpladeEncoder.java 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2928      +/-   ##
============================================
+ Coverage     71.82%   71.83%   +0.01%     
  Complexity     1321     1321              
============================================
  Files           186      186              
  Lines         12280    12294      +14     
  Branches       1413     1414       +1     
============================================
+ Hits           8820     8832      +12     
- Misses         2932     2933       +1     
- Partials        528      529       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lilyjge lilyjge merged commit 0a151c7 into castorini:master Aug 19, 2025
1 check passed
@lilyjge lilyjge deleted the bright-splade branch August 19, 2025 01:51
@lintool
Copy link
Member

lintool commented Aug 20, 2025

For the record, I reran all SPLADE-v3 conditions for BEIR, did not appear to have any score changes.

Finding all the conditions:

$ grep splade-v3 src/main/python/regressions-batch04.txt  | grep beir

Running:

nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-trec-covid.splade-v3.onnx > logs/log.beir-v1.0.0-trec-covid.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-bioasq.splade-v3.onnx > logs/log.beir-v1.0.0-bioasq.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-nfcorpus.splade-v3.onnx > logs/log.beir-v1.0.0-nfcorpus.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-nq.splade-v3.onnx > logs/log.beir-v1.0.0-nq.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-hotpotqa.splade-v3.onnx > logs/log.beir-v1.0.0-hotpotqa.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-fiqa.splade-v3.onnx > logs/log.beir-v1.0.0-fiqa.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-signal1m.splade-v3.onnx > logs/log.beir-v1.0.0-signal1m.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-trec-news.splade-v3.onnx > logs/log.beir-v1.0.0-trec-news.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-robust04.splade-v3.onnx > logs/log.beir-v1.0.0-robust04.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-arguana.splade-v3.onnx > logs/log.beir-v1.0.0-arguana.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-webis-touche2020.splade-v3.onnx > logs/log.beir-v1.0.0-webis-touche2020.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-cqadupstack-android.splade-v3.onnx > logs/log.beir-v1.0.0-cqadupstack-android.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-cqadupstack-english.splade-v3.onnx > logs/log.beir-v1.0.0-cqadupstack-english.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-cqadupstack-gaming.splade-v3.onnx > logs/log.beir-v1.0.0-cqadupstack-gaming.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-cqadupstack-gis.splade-v3.onnx > logs/log.beir-v1.0.0-cqadupstack-gis.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-cqadupstack-mathematica.splade-v3.onnx > logs/log.beir-v1.0.0-cqadupstack-mathematica.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-cqadupstack-physics.splade-v3.onnx > logs/log.beir-v1.0.0-cqadupstack-physics.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-cqadupstack-programmers.splade-v3.onnx > logs/log.beir-v1.0.0-cqadupstack-programmers.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-cqadupstack-stats.splade-v3.onnx > logs/log.beir-v1.0.0-cqadupstack-stats.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-cqadupstack-tex.splade-v3.onnx > logs/log.beir-v1.0.0-cqadupstack-tex.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-cqadupstack-unix.splade-v3.onnx > logs/log.beir-v1.0.0-cqadupstack-unix.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-cqadupstack-webmasters.splade-v3.onnx > logs/log.beir-v1.0.0-cqadupstack-webmasters.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-cqadupstack-wordpress.splade-v3.onnx > logs/log.beir-v1.0.0-cqadupstack-wordpress.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-quora.splade-v3.onnx > logs/log.beir-v1.0.0-quora.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-dbpedia-entity.splade-v3.onnx > logs/log.beir-v1.0.0-dbpedia-entity.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-scidocs.splade-v3.onnx > logs/log.beir-v1.0.0-scidocs.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-fever.splade-v3.onnx > logs/log.beir-v1.0.0-fever.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-climate-fever.splade-v3.onnx > logs/log.beir-v1.0.0-climate-fever.splade-v3.onnx.txt 2>&1 &
nohup python src/main/python/run_regression.py --index --verify --search --regression beir-v1.0.0-scifact.splade-v3.onnx > logs/log.beir-v1.0.0-scifact.splade-v3.onnx.txt 2>&1 &

nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-trec-covid.splade-v3.cached > logs/log.beir-v1.0.0-trec-covid.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-bioasq.splade-v3.cached > logs/log.beir-v1.0.0-bioasq.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-nfcorpus.splade-v3.cached > logs/log.beir-v1.0.0-nfcorpus.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-nq.splade-v3.cached > logs/log.beir-v1.0.0-nq.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-hotpotqa.splade-v3.cached > logs/log.beir-v1.0.0-hotpotqa.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-fiqa.splade-v3.cached > logs/log.beir-v1.0.0-fiqa.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-signal1m.splade-v3.cached > logs/log.beir-v1.0.0-signal1m.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-trec-news.splade-v3.cached > logs/log.beir-v1.0.0-trec-news.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-robust04.splade-v3.cached > logs/log.beir-v1.0.0-robust04.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-arguana.splade-v3.cached > logs/log.beir-v1.0.0-arguana.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-webis-touche2020.splade-v3.cached > logs/log.beir-v1.0.0-webis-touche2020.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-cqadupstack-android.splade-v3.cached > logs/log.beir-v1.0.0-cqadupstack-android.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-cqadupstack-english.splade-v3.cached > logs/log.beir-v1.0.0-cqadupstack-english.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-cqadupstack-gaming.splade-v3.cached > logs/log.beir-v1.0.0-cqadupstack-gaming.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-cqadupstack-gis.splade-v3.cached > logs/log.beir-v1.0.0-cqadupstack-gis.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-cqadupstack-mathematica.splade-v3.cached > logs/log.beir-v1.0.0-cqadupstack-mathematica.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-cqadupstack-physics.splade-v3.cached > logs/log.beir-v1.0.0-cqadupstack-physics.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-cqadupstack-programmers.splade-v3.cached > logs/log.beir-v1.0.0-cqadupstack-programmers.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-cqadupstack-stats.splade-v3.cached > logs/log.beir-v1.0.0-cqadupstack-stats.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-cqadupstack-tex.splade-v3.cached > logs/log.beir-v1.0.0-cqadupstack-tex.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-cqadupstack-unix.splade-v3.cached > logs/log.beir-v1.0.0-cqadupstack-unix.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-cqadupstack-webmasters.splade-v3.cached > logs/log.beir-v1.0.0-cqadupstack-webmasters.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-cqadupstack-wordpress.splade-v3.cached > logs/log.beir-v1.0.0-cqadupstack-wordpress.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-quora.splade-v3.cached > logs/log.beir-v1.0.0-quora.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-dbpedia-entity.splade-v3.cached > logs/log.beir-v1.0.0-dbpedia-entity.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-scidocs.splade-v3.cached > logs/log.beir-v1.0.0-scidocs.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-fever.splade-v3.cached > logs/log.beir-v1.0.0-fever.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-climate-fever.splade-v3.cached > logs/log.beir-v1.0.0-climate-fever.splade-v3.cached.txt 2>&1 &
nohup python src/main/python/run_regression.py --verify --search --regression beir-v1.0.0-scifact.splade-v3.cached > logs/log.beir-v1.0.0-scifact.splade-v3.cached.txt 2>&1 &

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants