Abstract
Traditional dense retrievers often struggle with logical constraints, particularly negation, due to a heavy reliance on semantic co-occurrence. This paper introduces NS-IR (Neuro-Symbolic Information Retrieval), a framework that integrates First-Order Logic (FOL) with neural embeddings. By translating queries into symbolic representations and applying logic-aware reranking techniques, NS-IR significantly improves retrieval accuracy for complex queries containing negative constraints.
Introduction: The Co-occurrence Trap
Modern information retrieval systems excel at identifying semantically related content but frequently falter when faced with explicit logical exclusions. A common failure mode occurs with "negative-constraint queries," such as "Find RAG methods that do not involve prompt engineering."
As shown in Figure 1, a standard retriever identifies the keywords "RAG" and "prompt engineering" and prioritizes documents where these terms appear together, effectively ignoring the negation. This "co-occurrence trap" highlights a fundamental lack of logical consistency in current embedding-based models.
Methodology: NS-IR Framework
To address this, the authors propose NS-IR, a reranking pipeline that injects formal logic into neural representations. The process involves three primary stages:
- Initial Retrieval: A base retriever (e.g., BGE) identifies a broad set of candidate documents.
- NL-to-FOL Translation: An LLM (GPT-4o) converts the natural language (NL) query and documents into First-Order Logic (FOL) formulas (e.g., $X(x) \wedge \neg Y(x)$).
- Neuro-Symbolic Reranking: The core of the framework uses two novel mechanisms to refine embeddings:
- Logic Alignment (LA): Utilizes Optimal Transport (OT) to align the distribution of NL embeddings with their corresponding FOL structures.
- Connective Constraint (CC): An attention-based mechanism that explicitly handles logical operators. For negation, it subtracts the embedding of the forbidden concept from the query vector.
Evaluation and Results
The framework was tested on standard benchmarks (BEIR, TREC DL) and a newly curated NegConstraint dataset. NegConstraint specifically targets logical "traps" using Wikipedia-sourced queries.
Key Performance Metrics
- NegConstraint Benchmark: NS-IR achieved a Mean Average Precision (MAP) of 53.3, a substantial improvement over the baseline BGE score of 36.3.
- TREC DL'20: The model reached an nDCG@10 of 70.5, outperforming the 63.4 baseline.
- Zero-Shot Capability: NS-IR demonstrates strong performance without task-specific fine-tuning, leveraging the inherent reasoning capabilities of LLMs and the geometric properties of the proposed reranking.
Discussion and Insights
The success of NS-IR stems from treating logic as a geometric regularizer. By visualizing embedding spaces via t-SNE, the researchers observed that vanilla embeddings often place queries near "negative" documents. NS-IR's Logic Alignment "pushes" these vectors apart based on symbolic constraints. The Connective Constraint effectively treats negation as vector subtraction, providing a mathematically intuitive way to handle "not."
Limitations and Future Work
While effective, NS-IR introduces latency due to the LLM translation step, making it most suitable for high-precision reranking rather than first-stage retrieval. Furthermore, the system's accuracy is bounded by the LLM's ability to correctly parse logic. Future research will focus on expanding the framework to handle more complex operations like universal quantification and set intersections.
Summary updated