Skip to content

Add WARM to the filter track - #356

Open
dcondrey wants to merge 7 commits into
harsha-simhadri:mainfrom
dcondrey:filter/warm
Open

dcondrey wants to merge 7 commits into
harsha-simhadri:mainfrom
dcondrey:filter/warm

Conversation

@dcondrey

@dcondrey dcondrey commented Nov 6, 2026 •

Copy link
Copy Markdown

Adds neurips23/filter/warm (algorithm key warm): WARM's label-filtered index (writerslogic_warm.FilteredIndex, Rust). Source: https://github.com/writerslogic/warm (Apache-2.0), pinned by the single ARG WARM_COMMIT in neurips23/filter/warm/Dockerfile (cc846be0b61c946db3943282daa044333bf604d5, WARM main after writerslogic/warm#434 merged; the per-class measurements below were taken at its parent branch commit 8d48984f, and the submitted pin was also built and run). The wheel is built with maturin build --release --features python on a pinned Rust 1.99.0 toolchain.

Files: Dockerfile, config.yaml (1 build configuration; 4 search configurations on yfcc-10M; the random-filter-s CI configuration), warm.py (Warm(BaseFilterANN)), and the CI list entry in .github/workflows/neurips23.yml. The adapter reads DATASETS to load the dataset and does not replace any harness dataset class.

Algorithm

  • Each label keeps a sorted list of member ids. Labels with more than ivf_min (1,500) members also keep k-means lists over their own members and a membership bitset when they have at least bitset_min (20,000) members.
  • One product quantizer (48 subvectors, 4-bit codes) is trained over the whole set. List members are stored as fast-scan code blocks of that quantizer.
  • A query is routed by its rarest label. If the rarest label has at most brute_max (600) members, or the intersection with the other labels is small enough, every match is scored exactly. Otherwise the label's lists are probed nearest-centroid first, members that lack the other query labels are skipped, and probing stops once target matches have been scored.
  • The bitsets of the other query labels are resolved once per query and prefetched before the probes.
  • The 4-bit codes screen candidates; the best rerank are rescored exactly on the uint8 rows (exact integer L2, ties broken on the smaller id).
  • target and rerank are set per query class: single-label or multi-label query, and the rarest label's size band (edges 5,000, 30,000, 150,000 members), 8 classes in all. Queries are grouped by label set within a batch.
  • Deletes are tombstones and inserts need a rebuild; the filter track does neither.

Details and sweeps: docs/benchmarks/BIG-ANN-FILTER.md in the WARM repository.

Configuration

Build: ivf_min 1500, cluster_size 500, max_lists 4096, bitset_min 20000, copy_min unbounded, pq_m 48, threads 8.

Search: four configurations, all with brute_max 600, intersect_max 1000000, prefetch 32, class edges 5000/30000/150000 and the rerank and targets per class listed in config.yaml. They differ only in some per-class targets and reranks entries:

config single-label targets (4 bands) multi-label targets (4 bands) single-label reranks
1 2800 2800 5000 3600 1200 450 800 800 64 64 64 96
2 2800 2800 5000 3600 1200 450 600 600 64 64 64 96
3 2800 2800 3600 3600 1200 600 600 600 64 64 64 96
4 2800 2800 5000 3600 1200 450 600 600 64 64 96 96

Multi-label reranks are 48 in every class.

How the per-class settings were chosen

The public queries were split into two halves with a fixed seed. The (target, rerank) pair of each class was chosen on one half from that class's time-versus-recall front (a Lagrangian selection over the per-class fronts). The other half was used only to check the choice. In-process, over the whole query set, configs 1, 2 and 3 scored recall 0.9034, 0.9020 and 0.9018 on the held-out half (0.9043, 0.9031 and 0.9027 on the selection half). Config 4 scored 0.9073 held out (0.9082 on the selection half). The official-protocol runs below used all 100,000 public queries.

Measured results (not the organisers' evaluation)

All runs are Azure Standard_E8bds_v5 or GCP Ice Lake VMs. The Azure Standard_E8bds_v5 has the same Xeon 8370C CPU as the organisers' Standard_D8lds_v5 but is not that VM (the D8lds_v5 size had no quota). These are not official results and not a leaderboard placement; QPS and timing on the official VM are for the organisers to measure.

python run.py --neurips23track filter --algorithm warm --dataset yfcc-10M (Docker mode, 100,000 public queries). Recall@10 is the same in every run. QPS per search configuration (configs as in the table above):

run WARM image config 3 (0.902239) config 2 (0.902562) config 1 (0.903873) config 4 (0.907729)
GCP run 1 8d48984f wheel copied in 117,823 117,302 117,572 115,334
GCP run 2 8d48984f wheel copied in 117,757 117,523 115,792 115,548
Azure AZ-2 run 1 8d48984f rebuilt wheel on the previous image 132,145 132,765 132,085 129,184
Azure AZ-2 run 2 8d48984f rebuilt wheel on the previous image 133,861 133,961 132,825 130,442
Azure AZ-3, this branch's Dockerfile 8d48984f install.py 136,036 134,862 134,092 134,153
Azure AZ-3, this branch's Dockerfile cc846be0 (submitted pin) install.py 135,999 134,414 132,903 130,205
  • GCP runs: n2-custom-8-16384, 8 vCPU, 16 GiB, 5 runs per configuration with the best kept, cold cache. Build 462 s and 454 s; harness index size 5.42e6 KB (5.17 GiB); container memory peak (cgroup, includes page cache) 11.6 GiB in run 2. The image was the harness's neurips23 base with a wheel built outside the image and copied in.
  • Azure AZ-2 runs: 16 GiB container, no swap. Build 410.7 s and 410.6 s; GNU time max RSS 10.66 GiB; cgroup peak 11.53 GiB of 16 GiB, oom_kill 0. The image was built from the previous filter image with the WARM clone checked out at 8d48984f and the wheel rebuilt; it was not built from this PR's updated Dockerfile.
  • Azure AZ-3 runs: the image was built with python install.py --neurips23track filter --algorithm warm from this branch's Dockerfile as written, with no change to the Dockerfile or wrapper. Image build 138 s (pin 8d48984f, branch commit 4284b9b) and 154 s (pin cc846be0). Harness build time 411.3 s and 411.2 s, index size 5.42e6 KB, complete elapsed time 432 s per run. Peak RSS summed over the container's processes 10.64 GiB (largest single-process high-water mark 10.66 GiB), cgroup peak 11.63 GiB of 16 GiB, oom_kill 0. These two runs are one run each at the pins listed.
  • Memory limit in these Azure runs: the unmodified benchmark/runner.py receives the host's available memory as the container limit for every track (main.py passes it in; the 8 GiB line for streaming is not reached). A first filter run with no limit was aborted. The Azure runs applied a one-line change to runner.py (if mem_limit is None: replaced by if True:, with the filter limit set to 16 GiB) so that the container had the 16 GiB limit stated in neurips23/README.md. This is a harness change in our runs, not part of this PR.
  • CI dataset: run.py, plot.py and data_export.py on random-filter-s with this branch's image exit 0 (2 results).
  • The spread between configurations and runs on one host is a few percent; the AZ-3 cc846be0 row is lower than the 8d48984f row on configs 1 and 4 and the two builds have the same recall.
  • Public queries only; the private query set was not run.
  • The previous entry in this PR (6091c519, one configuration at 5000:1750) measured 47,920 and 45,768 QPS at recall 0.9064 on the GCP host; it is replaced by this entry.

Commands (Linux, Azure D8lds_v5 procedure)

python install.py --neurips23track filter --algorithm warm
python create_dataset.py --dataset yfcc-10M
python run.py --neurips23track filter --algorithm warm --dataset yfcc-10M
python data_export.py --output res.csv
python eval/show_operating_points.py --csv res.csv --algorithm warm --dataset yfcc-10M --threshold 0.9

(show_operating_points.py takes the file with --csv; the README's positional form does not parse.)

Not checked

  • Any run on the Standard_D8lds_v5 evaluation VM, and the private queries.
  • Whether the AZ-3 cc846be0 build differs in speed from the 8d48984f build beyond run-to-run spread (one run each; the per-class measurements and tuning were done at 8d48984f; the commits between them are two lint-titled fixes and the merge, whose effect on results was not measured separately).
  • The random-filter-s CI job on GitHub-hosted runners for this head (the same dataset ran with exit 0 through run.py, plot.py and data_export.py on Azure).

@dcondrey
dcondrey marked this pull request as ready for review November 6, 2026 20:46
@dcondrey

Copy link
Copy Markdown
Author

Repinned WARM to the v0.7.4 tag (005c27d42450bc9f606061af0ee7fdc3dea09181). WARM's public history was rewritten, so the commit pinned before no longer resolves and the image build would fail at git checkout. The wrapper's calls and config parameters were checked against v0.7.4 and are unchanged. The numbers quoted above were measured at the earlier commit and have not been re-run at v0.7.4.

This branch has not been deployed

No deployments
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.

1 participant