Learning to Select: Query-Aware Adaptive Dimension Selection for Dense Retrieval
Paper β’ 2602.03306 β’ Published
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Implementation of Learning to Select: Query-Aware Adaptive Dimension Selection for Dense Retrieval on SciFact with Qwen3-Embedding-0.6B.
| Method | NDCG@10 | Dims Used |
|---|---|---|
| Baseline | 0.702 | 100% (1024) |
| QADS (peak) | 0.845 | 32% (328) |
| QADS (@30%) | 0.839 | 30% (307) |
QADS learns a per-query dimension importance predictor β a single linear layer f_ΞΈ: β^D β β^D β that identifies which embedding dimensions are most relevant for each query. At inference, only the top-k dimensions are used for similarity computation, improving retrieval over full-dimensional baselines.
Training pipeline:
# Requires GPU (T4 or better)
pip install torch transformers>=4.51.0 sentence-transformers datasets trackio huggingface_hub numpy
python qads_scifact.py
| Parameter | Value |
|---|---|
| Optimizer | AdamW |
| Learning rate | 1e-4 |
| Weight decay | 0.01 |
| Batch size | 256 |
| Dropout | 0.1 |
| Hard-negative pool K | 1000 |
| Sampled negatives M | 64 |
| Temperature Ο | grid: {0.0001 β¦ 0.05} |
| Epochs | grid: {20, 30, 50, 75, 100, 200} |
| Model selection | maximise Ξ£ NDCG@10 at {D, D/2, D/4, D/8} on validation |
qads_scifact.py β Complete end-to-end pipeline (embedding β oracle β train β evaluate)best_predictor.pt β Trained predictor weights (uploaded after training)results.json β Full evaluation results (uploaded after training)