CoDeR: Local Constraint-Compatible Retrieval Beyond Semantic Similarity
About
Information retrieval systems have long treated semantic similarity as a proxy for relevance. For constraint-sensitive queries, this proxy can fail when a document is topically close to the query but supports the opposite constraint direction, such as satisfying an attribute that should be excluded or affirming a relation that should be negated. We study this failure as constraint-violating evidence exposure and propose CoDeR, a local constraint-compatible dense retrieval method that separates topical relevance from constraint compatibility. CoDeR keeps a standard topical encoder for candidate coverage and adds a compatibility scorer, implemented as a bi-encoder, trained with lexical-polarity supervision over contrastive satisfying and violating evidences. The compatibility signal can be used to rescore topical candidates or to retrieve an auxiliary compatibility-oriented candidate set, producing a ranked document list without external Large Language Model~(LLM) calls at inference time. We evaluate CoDeR on controlled diagnostics and public negative-constraint retrieval benchmarks. Across three controlled diagnostic sets targeting antonymy, negation, and exclusion, CoDeR reduces V@2 by 20.59, 23.53, and 5.77 points relative to the strongest non-CoDeR baselines, and improves FVR by pushing the first violating document deeper in the ranking.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Question Answering | NevIR 20 randomly sampled queries | Accuracy40 | 8 | |
| Constraint-aware Retrieval | Antonym self-constructed | V@259.8 | 8 | |
| Constraint-aware Retrieval | Negation self-constructed | V@250.98 | 8 | |
| Constraint-aware Retrieval | Exclusion self-constructed | Recall@250 | 8 | |
| Information Retrieval | NevIR | V@230.2 | 8 | |
| Information Retrieval | ExcluIR | V@247.7 | 8 | |
| Information Retrieval | NegConstraint | Recall@596.97 | 3 |