NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Uncertainty Annotated Databases - A Lightweight Approach for Approximating Certain Answers

Su Feng, Aaron Huber, Boris Glavic, Oliver Kennedy

Handling uncertainty in databases usually forces a choice between two extremes: the "principled but slow" approach of computing certain answers, or the "fast but reckless" approach of just picking a best guess. A new paper by researchers from the Illinois Institute of Technology and the University at Buffalo proposes a middle ground: Uncertainty Annotated Databases (UA-DBs).

TL;DR

UA-DBs provide a lightweight way to handle uncertain data by "sandwiching" the true certain answers between a fast under-approximation (labeled certain) and a "best-guess" over-approximation. This approach offers the performance of standard relational databases while maintaining principled reliability and higher utility than traditional methods.

What Problem Does This Paper Address?

Data uncertainty is a reality in everything from sensor networks and data cleaning to machine learning imputations. Traditionally, the gold standard for querying this data is the Certain Answer semantics—returning only the results that appear in every possible interpretation (world) of the data.

However, certain answers have two major flaws:

  1. Complexity: Computing them is generally coNP-hard. For large datasets, this is a non-starter.
  2. Utility: They are extremely conservative. By excluding anything that isn't 100% certain, they often discard the most useful "best guess" results that a user actually needs.

Most practitioners ignore these issues and use Best-Guess Query Processing (BGQP), which picks one likely interpretation and treats it as fact. This is fast, but it loses all information about which parts of the result are actually reliable.

Methods

The authors introduce UA-DBs to bridge this gap. A UA-DB is built around a single "best-guess" world, but it annotates each tuple with a certainty label.

Figure 1: UA-DBs provide both an under- and over-approximation of certain answers.

As illustrated in Figure 1, the UA-DB "sandwiches" the true certain answers:

  • Over-approximation: The "Best-Guess" world includes all certain answers plus some likely but uncertain ones.
  • Under-approximation: A subset of these is explicitly labeled as "certain."

The core technical contribution is generalizing this concept using $K$-relations (semiring annotations). This allows UA-DBs to work not just for simple sets, but also for bag semantics (where certainty is a lower bound on a tuple's count) and even access control.

The system is implemented as a SQL query-rewriting middleware. When a user submits a query, the system rewrites it to propagate these certainty labels through standard relational operators (Join, Project, Select, Union) using standard DBMS hardware.

Datasets

The researchers evaluated UA-DBs using a mix of synthetic benchmarks and real-world data:

  • PDBench: A modified TPC-H benchmark designed for uncertain data.
  • Real-World Open Data: Nine datasets from portals like the City of Chicago and San Francisco, covering building violations, crime reports, food inspections, and library surveys. Uncertainty was introduced by using SparkML to impute missing values.
  • Synthetic C-tables: Used to test performance against complex, constraint-based uncertainty models.

Key Insights and Ideas

  • The "Sandwich" Property: By maintaining both an upper and lower bound, UA-DBs ensure that a user never misses a certain answer, even if they occasionally see an uncertain one flagged as such.
  • Closure under Queries: Unlike many approximation techniques, UA-DBs are "closed" under relational algebra. You can run a complex chain of queries, and the resulting certainty labels remain mathematically sound bounds.
  • Utility over Purity: The authors argue that a "mislabeled" certain answer (one that is certain but marked uncertain) is still present in the result. This is far better than traditional certain answer semantics, which would simply delete the tuple if it couldn't prove certainty efficiently.
  • Mathematical Elegance: The proof that these bounds are preserved during queries relies on the property that the "certainty" operation in a semiring is superadditive and supermultiplicative.

Key Results

  • Minimal Overhead: UA-DB queries typically add less than 4% execution time overhead compared to standard deterministic queries.
  • Scalability: In tests against MayBMS (a state-of-the-art probabilistic database), UA-DBs were orders of magnitude faster as the amount of uncertainty in the data increased.
  • High Precision: In real-world scenarios, the "false negative" rate—certain answers that the system was too shy to label as certain—was remarkably low, often under 1%.
  • Superior Utility: Compared to conservative certain-answer methods (like Libkin’s approach), UA-DBs provided much higher recall (finding more of the "ground truth" results) while maintaining 80-90% precision.

Limitations and Future Work

While powerful, the current implementation has some constraints:

  • Tuple-level Granularity: The system currently labels entire rows. The authors suggest that attribute-level annotations (marking specific cells as certain) could provide even finer precision.
  • Query Limitations: The current framework primarily supports positive relational algebra ($RA^+$). Extending this to handle negation (NOT IN) and aggregation (SUM, AVG) is a key area for future research.
  • Complex Correlations: While it handles common models like TI-DBs and x-DBs well, extremely complex data dependencies might lead to looser (less useful) bounds.

Summary updated

BibTeX
@inproceedings{feng2019uncertainty,
  author = {Su Feng and Aaron Huber and Boris Glavic and Oliver Kennedy},
  title = {{Uncertainty Annotated Databases - A Lightweight Approach for Approximating Certain Answers}},
  booktitle = {SIGMOD},
  year = {2019},
  doi = {10.1145/3299869.3319887},
}
Figure