ACORN — Approximate Nearest Neighbor Constraint-Optimized Retrieval Network — is an algorithm that makes filtered vector search fast without sacrificing recall. It is designed to solve a specific weakness of graph-based indexes like HNSW: when you apply a metadata filter, many of the nodes the graph wants to visit are excluded, which can break the navigability of the graph and force a slow fallback.
ACORN addresses this by making the graph traversal aware of the active filter. Instead of walking to a neighbour and then discarding it because it fails the filter, the algorithm predicts which neighbours are likely to satisfy the constraint and prioritises them during search. This keeps the graph navigable even under restrictive filters, avoiding the recall cliff that plagues naive post-filtering.
The practical result is that complex queries — for example, find the most similar documents that are also in a specific category and published after a certain date — run at near-unfiltered speed. ACORN and similar adaptive-traversal techniques are a key reason modern vector databases can serve metadata-heavy production workloads efficiently.