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

Document Trees as Search Indexes for Non-Overlapping Retrieval

Many real collections are nested. Sentences sit inside passages, passages inside sections, and sections inside documents. A good search system over such a collection should return the right size of unit for each query: a single paragraph when the answer is local, a whole section when the answer is spread out. It should also never return a unit together with a unit that contains it, because the reader then sees the same text twice. Older work on structured document search solved the second problem by retrieving a ranked list and then deleting nested duplicates afterwards. Modern fast search engines solve a different problem: finding the best items among hundreds of millions without scoring them all. They do this over flat, independent chunks and never see the nesting.

This note proposes to treat the document's own containment tree as the search index. With a learned sparse retriever, whose term weights are never negative, the element-wise maximum of a section's vectors gives a provable upper bound on the score of anything inside that section. A best-first search down the containment tree can therefore return the exact result of the classical "drop nested duplicates" filter while scoring only a small fraction of units. Accepting a unit then immediately discards its whole subtree. Removing overlap becomes the stopping rule of the search instead of a cleanup pass. The open question is empirical and can be settled either way: are containment-tree bounds tight enough to beat the obvious alternative, a fast flat index over every granularity with extra candidates fetched and filtered afterwards?

Core Claim

Let each node $v$ of a document tree carry two sparse vectors. The first is its own representation $x_v$, used to score $v$ as a retrievable unit. The second is a bound vector $u_v$, defined as the element-wise maximum of $x_w$ over every node $w$ in $v$'s subtree. For a query $q$ with nonnegative weights, the score of any node in the subtree cannot exceed the bound:

$$\max_{w \in \mathrm{subtree}(v)} \langle q, x_w \rangle \;\le\; \langle q, u_v \rangle .$$

This inequality holds because every coordinate of $u_v$ dominates the matching coordinate of each $x_w$, and both $q$ and $x_w$ are nonnegative. It turns the containment tree into a branch-and-bound index. Search keeps two queues. The frontier holds unexpanded nodes ordered by their bound $\langle q, u_v\rangle$. The scored pool holds nodes whose own score is known. A scored node is accepted when three things are true: its own score exceeds the largest bound left on the frontier, no accepted node is its ancestor, and no accepted node is its descendant. When a node is accepted, its entire subtree leaves the frontier.

This procedure provably returns the same $k$ units, in the same order, as greedy overlap filtering (the method of Using Language Models for Flat Text Queries in XML Retrieval) applied to an exhaustive ranking of all elements. Its cost is set by how tight the bounds are, not by the size of the collection. The claim to test is that on real hierarchies, meaning Wikipedia articles and web documents split into sections and passages, this cost grows sublinearly in the number of units. We also claim that the structure stores each span of text once. By contrast, a flat multi-granularity index stores it once per level.

Relation to Prior Work

Three sources supply the method. Seismic, evaluated at the 138-million-passage scale in Investigating the Scalability of Approximate Sparse Retrieval Algorithms to Massive Datasets, groups the lists of documents that contain each term into blocks. Each block has a max-style summary vector, and a block is skipped when its summary cannot beat the current threshold. We reuse the summary idea but form the blocks from containment rather than from clustering within term lists. JTR (Constructing Tree-based Index for Efficient and Effective Dense Retrieval) learns a tree over flat passages under a "max-heap" rule: each parent's score should dominate its children's. Our bound vectors satisfy that rule by construction rather than by training. JTR's deliberate duplication of documents across clusters is exactly what an overlap-free result list forbids, which is why we build the tree from containment instead. The greedy filter of Ogilvie and Callan defines the target output. We change when it runs, not what it computes.

Other work motivates the problem. The overlap problem in content-oriented XML retrieval evaluation found that propagating relevance up the tree made the INEX 2003 recall base 182% larger than necessary. That paper also introduced overlap-aware gain metrics, which we adopt for evaluation. An Element-based Approach to XML Retrieval showed that indexing every level separately counts the same text several times and distorts collection statistics. Our index avoids this multiple counting in storage. Separately, we test whether it harms score calibration across levels.

One line of work constrains the design. Filtered Vector Search: State-of-the-art and Research Challenges and JAG: Joint Attribute Graphs for Filtered Nearest Neighbor Search report that filtering during a greedy walk over a similarity graph breaks connectivity and traps the search. This is why we use tree branch-and-bound, which cannot get stuck, rather than enforcing the no-nesting rule inside a graph walk such as HNSW.

The order-theoretic view in Contrastive Antichains in Hierarchies shows that any non-redundant multi-granularity selection is an antichain, meaning a set in which no element contains another. That paper mines such sets offline in quadratic time over category counts. We borrow only the formal target and make no claim about its interestingness objective.

Research Program

The system has three layers. The bottom layers are the containment trees themselves: document, then section, then passage, then optionally sentence. Every node stores $x_v$ and $u_v$. Above the document roots, a shallow k-means layer groups documents by their root bound vectors so that search does not start by scanning millions of roots. This is the only layer not given by the documents.

We study two choices of section representation $x_v$ because they change the problem. Under mean pooling, the section vector is the average of its children's vectors. A section's score is then the average of its children's scores, so it outranks its best child only when relevance is broad. This choice encodes the exhaustivity-versus-specificity trade-off of the INEX work and needs no re-encoding. Under direct encoding, the sparse encoder is run on the section's own truncated text. The resulting score is not derivable from the children.

The main risk is loose bounds. A long document's element-wise maximum contains many nonzero terms. We therefore run two modes. The exact mode uses full bound vectors. The approximate mode keeps only the coordinates carrying a fraction $\alpha$ of each bound vector's mass, following Seismic's summary pruning, and trades the guarantee for speed. We measure bound tightness directly: across queries, how far the bound of expanded nodes exceeds the score of the best unit in their subtree. This quantity explains every downstream latency number.

Baselines

The naive reference is exhaustive scoring of every element at every granularity, followed by the Ogilvie–Callan greedy filter. It defines the exact target output. All exactness numbers are measured against it, and it anchors linear-cost latency.

The strongest competitor is flat multi-granularity Seismic with overfetch. Every section and passage is indexed as an independent sparse vector in Seismic (Investigating the Scalability of Approximate Sparse Retrieval Algorithms to Massive Datasets). The system retrieves $mk$ candidates for an overfetch factor $m$ and applies the greedy filter. On flat passages this engine reports query latency "as low as 3 milliseconds" on 138 million MS MARCO v2 passages, and it is "3.0x faster than HNSW" at 97% accuracy. No reported result was found on Lacuna for any engine run over multi-granularity or nested units.

It is the right competitor because greedy filtering over a large enough candidate pool recovers our exact output. The whole contribution therefore reduces to cost and memory. Fairness requires the same encoder vectors, the same machine and thread count, and an equal tuning grid for both systems: block size, summary pruning $\alpha$, and $m$ for Seismic; $\alpha$ and fan-out for ours. We beat it if, at matched 99% agreement with the exhaustive greedy output, we are faster and use less memory on the full collection. Winning on memory alone would be a weaker but still reportable result.

A second baseline is leaf retrieval plus rollup. Seismic retrieves passages only. The ancestors of the retrieved passages are then scored by fetching their children, which is exact for mean-pooled sections, and the greedy filter runs over the union.

The third baseline is title-prepended passages with no hierarchy at all, the fix studied in DAPR: A Benchmark on Document-Aware Passage Retrieval. That work attributes 53.5% of errors to missing document context, but it gives no numeric score for the prepended variant, so we will measure one.

Two ablations isolate the ingredients. The first turns off subtree removal on acceptance and filters afterwards, which isolates in-search overlap pruning. The second replaces the containment tree with a k-means tree of equal fan-out over the same units, which isolates whether containment yields tighter bounds than similarity clustering.

Why not just…?

Why not just fetch more candidates from a flat index and filter afterwards? This is the real threat. The overfetch factor needed is roughly the number of nested variants per relevant region, which is a constant related to tree depth, not a function of collection size. If Seismic with $m \le 2$ already reaches 99% agreement at lower latency, our method adds nothing on speed and we will say so. It would still have to win on memory, since the flat index stores each span once per level. The overfetch curve, meaning agreement as a function of $m$ at each collection size, settles the question.

Why not just retrieve passages and roll their scores up to sections? With mean-pooled sections the rollup is exact once all siblings of a retrieved passage are fetched. It could match our method on shallow web documents. It fails when a section is relevant as a whole but no single child ranks in the leaf top-$k$, and it cannot handle directly encoded sections at all. We report both representations so that the regime where rollup suffices is visible.

Why not just prepend titles and return passages? Prepending fixes the output granularity at the passage and cannot return a section. DAPR also reports the "Genomics exception", a technical domain where prepending hurt retrieval. We include it as a baseline measured by answer recall per token read, where it may well be competitive on the NQ collection.

Proposed Experiments

We use three collections. The first is INEX 2003: 12,107 IEEE articles with real XML structure and overlap-aware relevance judgments, scored with the cumulated-gain metric MA(n)CG. The second is Wikipedia with article, section, and passage structure recovered for the passage collection of Dense Passage Retrieval for Open-Domain Question Answering, evaluated on Natural Questions. DPR reports top-20 accuracy of 79.4% there. Because sections are longer, we score answer recall under a fixed token budget rather than a fixed number of units. The third is the MS MARCO v2 passages grouped under their source documents for the scaling study.

For scaling, we build nested subsamples of MS MARCO v2 ranging from about 1 million passages up to the full 138 million. We record the number of vector scores per query at a fixed $k$ and fit the growth exponent. Sublinearity is supported if the fitted exponent stays clearly below one in the exact mode.

The first decisive check is exactness. The exact mode must reproduce the exhaustive greedy output on every INEX query and on a sampled subset of NQ queries, verified by comparing the returned lists. The second decisive check is the head-to-head against overfetched flat Seismic on latency, memory, and build time at matched agreement.

The project fails if either of two outcomes occurs: the fitted exponent approaches one because document-level bounds expand more than a tenth of all documents, or the k-means-tree ablation matches containment on both bounds and latency. In the second case the right conclusion is that containment matters only for defining the output, not for indexing it.