Beyond Global Top-k: Certified Soft Aggregation over Semantic Facets
Abstract
Search, recommendation and RAG applications increasingly ask aggregate questions of semantically retrieved content, such as the average rating of reviews about battery life per category. The standard pipeline answers them with one global top-k vector search followed by aggregation. We show that a single global ranked list is a poor plan for this query shape: it guarantees neither facet coverage nor bounded omitted weight. On a 1.35M-review catalogue with 33 categories, a top-100 retrieval answers only ten, because semantically similar items concentrate in few facets, not because the budget is small. Per-facet (grouped) retrieval repairs coverage and is our strongest baseline, but it still reports no error bound. We treat grouped relevance-weighted (softmax) aggregation as a database operator: per group a Nadaraya-Watson kernel regression estimator, evaluated with the max-shifted online softmax accumulator under exact predicates. We contribute (i) an overflow-safe mergeable execution with 40 bytes of state per facet, where plain SQL fails differently in two engines and PostgreSQL aborts on underflow even in the textbook max-shifted rewrite; (ii) incremental maintenance in which insertion and ordinary deletion are constant-time state updates, four to five orders of magnitude cheaper than recomputation, while deleting a facet's anchor costs one pass over that facet; and (iii) a deterministic per-facet error bound, the omitted softmax weight times the group's value range, with a plan that proposes a truncation from a sketch, verifies it against the true omitted mass, and repairs any facet that misses. Measured in our engine on three corpora (Amazon Reviews, StackExchange, IMDb), every delivered answer met its declared error budget. A row-count analysis assuming a score-ordered per-facet candidate generator shows the same bound could certify answers while reading 0.6-9.3% of the rows.
Create a lesson
Metadata
- Categories
- cs.IR, cs.DB
- Comments
- 10 pages, 2 figures, 3 tables. Accepted to WSDM 2027 (Findings). Code: https://github.com/graphuofm/bruce/tree/wsdm27
Related papers
BASIS: Bridging Hard and Soft Semantic IDs for Graph-based Recommendation
Shared title terminologycs.IRYang Cao, Wei Zhang
Semantic IDs Are Interfaces: Stability-Constrained Evolution for Continual Generative Recommendation
Shared title terminologycs.IRJinfeng Xu, Zheyu Chen, Ziyue Peng et al.
Structure Diffusion Quantization: Learning Stable Coarse-to-Fine Semantic IDs for Generative Recommendation
Shared title terminologycs.IRCong Xu, Zihan Liao, Lingxiao Wei et al.
From Category to Venue: Progressive Category-Collaborative Semantics Aligned Generative POI Recommendation
Shared title terminologycs.IRYuxi Huang, Silin Zhou, Wenwen Zhao et al.
LAMP: Language-Aligned Multi-Intent Parallel Decoding of Semantic IDs for Generative Recommendation
Shared title terminologycs.IRYixuan Xu, Yuheng Chen, Fan Zhang et al.
Jev-GR: Autoregressive Semantic ID Prediction with a Decision LLM for Generative Recommendation
Shared title terminologycs.IRJingyu Li, Chenhao He, Qiuyi Xin et al.