← Latest papers
🤖 machine learning

Filtered ANN as a Phase Transition: When Selectivity-Estimation Error Causes Plan Regret

This paper characterizes selectivity-estimation errors in filtered approximate-nearest-neighbor queries as a phase transition phenomenon, demonstrating that execution plan regret is concentrated in critical boundary regions where strategy performance cliffs occur, and that these errors follow universal finite-size scaling laws independent of corpus size.

Original authors: Madhulatha Mandarapu, Sandeep Kunkunuru

Published 2026-06-16
📖 5 min read🧠 Deep dive

Original authors: Madhulatha Mandarapu, Sandeep Kunkunuru

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are running a massive library with millions of books (vectors). A customer walks in and asks for the 10 best books on a specific topic, but with a catch: they only want books that meet a certain rule, like "published after 2020" or "under $10."

This is a Filtered ANN query. The library has three main ways to find these books:

  1. Pre-filter: First, throw away every book that doesn't meet the rule, then search the remaining pile for the best 10.
  2. Post-filter: Search the entire library for the best 10 books, then throw away the ones that don't meet the rule.
  3. In-filter: Search carefully, only looking at books that meet the rule as you go.

The problem is: Which method should you use?

  • If the rule is very strict (e.g., "books written by a specific author who died in 1900"), only 0.1% of books pass. Pre-filter is best because you save time by ignoring 99.9% of the library.
  • If the rule is very loose (e.g., "books published in the 21st century"), 90% of books pass. Post-filter is best because you don't want to waste time checking the rule for every single book; just grab the top 10 and check them at the end.
  • If the rule is in the middle, In-filter is usually the winner.

The library manager (the system) has to guess how strict the rule is (this guess is called selectivity) and pick a strategy. If they guess wrong, they might pick the slow method, wasting time and missing good books.

The Big Discovery: It's Like Weather, Not Math

The authors of this paper discovered that this isn't just a simple math problem; it's like weather patterns.

They found that the "best strategy" changes abruptly at specific tipping points, creating phases (like solid, liquid, and gas).

  • Deep inside a phase: If the rule is very strict, Pre-filter is so much better than the others that even if the manager guesses the strictness wrong, they will still pick the right method. It's like being in a heavy rainstorm; even if you guess the rain is 10% heavier than it is, you still know to bring an umbrella. No regret.
  • At the boundary (The Cliff): This is where things get dangerous. There is a very thin line where Pre-filter and Post-filter are almost equally good. If the manager's guess is even slightly off here, they might jump from "Pre-filter" to "Post-filter" and pick the wrong one.

The "Regret Wedge"

The paper calls the area of danger a "Regret Wedge."

  • Imagine a sharp cliff. If you are standing far away from the edge, a small stumble doesn't matter.
  • But if you are standing right on the edge, a tiny slip (a small estimation error) sends you falling down a steep cliff, causing a big loss in performance (you miss the best books).
  • The authors proved that this "fall" only happens in a tiny, critical zone right around the boundary. The size of this zone depends on how bad the manager's guess is.

Two Specific "Cliffs"

The paper identifies two specific places where these cliffs happen, using different math from other fields:

  1. The Post-Filter Cliff: This happens when the rule is so strict that the "top 10" you grab from the whole library likely contains very few valid books. Mathematically, this happens when the strictness is roughly 10 / (Total Books Checked).
  2. The In-Filter Cliff: This happens when the rule is so strict that if you try to navigate the library only through valid books, the path breaks. It's like a bridge where if you remove too many planks, the bridge collapses. The paper found this happens at a specific point (about 0.83 divided by the number of connections in the library map), regardless of how big the library is.

The "Universal Wedge"

The most surprising finding is that this "Regret Wedge" is scale-invariant.
Whether you have 100,000 books or 10 million books, if you zoom in on the boundary and adjust for the size of the library and the size of the manager's error, the shape of the "fall" looks exactly the same. It's a universal pattern.

The Real Problem: The Map, Not the Guess

The authors tested this on real, messy data (not just perfect math). They found two types of failure:

  1. The Transient Wedge: If your guess is slightly off, you fall off the cliff. This is unavoidable but limited to that tiny boundary zone.
  2. The Persistent Band: If your cost model (the map you use to decide which strategy is "cheaper") is biased or wrong, you create a permanent zone of failure. Even if your guess is perfect, you might still pick the wrong strategy because your map is wrong. No amount of better guessing can fix a broken map.

Summary

  • The System: Choosing how to search a filtered list of items.
  • The Phenomenon: It acts like a phase transition (like water freezing).
  • The Danger: Mistakes only hurt you when you are standing right on the edge between two strategies.
  • The Shape: The danger zone is a "wedge" that looks the same no matter how big your data is.
  • The Lesson: You can't fix a bad strategy selection just by guessing better. If your underlying model of "cost" is biased, you will always have a zone of failure that estimation errors can't fix.

The paper doesn't invent a new search engine; it just draws a map showing exactly where and why the current search engines get confused, proving that the danger is concentrated in tiny, critical zones.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →