Skip to content
Research · Aug 23, 2026

Apple ML paper proves P-completeness of Boolean query evaluation over inverted indices

Researchers formalize a retrieval language based on DAGs and show that evaluating complex Boolean queries natively over inverted indices is strictly P-complete, introducing a sparsity-aware algorithm to bound evaluation time.

Trust84
HypeLow hype

1 source · cross-referenced

ShareXLinkedInEmail
TL;DR
  • Apple’s ML Research team published a theoretical result proving that evaluating deeply nested, non-monotonic Boolean queries over inverted indices is strictly P-complete.
  • The paper introduces ComputePN, a deterministic, sparsity-aware algorithm that decouples logical negation from universe-scale materialization to bound evaluation time to O(|Q| · |U_active|).
  • The work formalizes a retrieval language (L_R) based on DAGs and analyzes state-of-the-art query evaluation strategies, showing worst-case exponential blowup for Document-at-a-Time and Ω(|U|) space penalties for Term-at-a-Time.

Apple’s Machine Learning Research group published a paper proving that evaluating complex, non-monotonic Boolean queries compiled into Directed Acyclic Graphs (DAGs) over inverted indices is strictly P-complete. The authors formalize a retrieval language (L_R) and show that the evaluation problem for this language is P-complete, establishing a theoretical upper bound on the tractability of such queries.

The paper analyzes two standard query evaluation strategies over inverted indices. Stateful iterator models (Document-at-a-Time) are shown to be structurally bounded by NC^1 formula evaluation, with a worst-case exponential blowup of O(2^|Q|) when unrolling re-convergent logic. Recursive materialization models (Term-at-a-Time) incur an Ω(|U|) space complexity penalty—the Universal Scan—when evaluating logical negation over the document universe.

To address these limitations, the authors introduce ComputePN, a deterministic, sparsity-aware evaluation algorithm. ComputePN decouples logical negation from universe-scale materialization using a Positive-Negative dual representation and leverages native DAG memoization. The algorithm strictly bounds evaluation time to O(|Q| · |U_active|), avoiding both the combinatorial tree-expansion bottleneck and the universal scan penalty.

The work lays a formal foundation for computational retrieval, particularly relevant to neuro-symbolic reasoning workflows that increasingly depend on search infrastructure to execute complex logical queries over text fields.

Sources
  1. 01Apple — Machine Learning ResearchThe P-Completeness of Inverted Index Traversal: On the Complexity of Evaluating Boolean Query DAGs
Also on Research

Stories may contain errors. Dispatch is assembled with AI assistance and curated by human editors; despite the trust-score filter, mistakes happen. We correct publicly — every article links to its revision history. Nothing here is financial, legal, or medical advice. Verify before relying on any claim.

© 2026 Dispatch. No ads. No sponsorships. No paid placement. Reader-supported via Ko-fi.

Built by a person who cares about honest AI news.