For decades, information retrieval relied on an explicit separation between the index and the search model. Whether using sparse term-matching or dense dual-encoders, the core operation remains a geometric search over an external database. Recently, a new paradigm known as Generative Information Retrieval (GIR) or the Differentiable Search Index (DSI) has emerged, as surveyed by Xiaoxi Li et al. in From Matching to Generation: A Survey on Generative Information Retrieval. Instead of computing vector similarities against millions of candidates, a single sequence-to-sequence model (such as a Transformer) internalizes the corpus within its parameters and directly generates the identifier of the relevant document (a DocID) in response to a query.
To make this work, we must answer a fundamental question: What should a document's name be?
Early iterations assigned arbitrary unique integers or random strings to documents. However, as Xiaoyang Chen et al. demonstrate in Understanding Differential Search Index for Text Retrieval, unstructured identifiers turn retrieval into a pure memorization task. The model must learn a massive, flat mapping from queries to meaningless tokens. This approach scales poorly to millions of documents, fails to exploit the natural relationships between items, and completely breaks down when encountering new or unseen documents.
The breakthrough solution is to replace random identifiers with hierarchical semantic identifiers. Instead of an arbitrary number, a document is assigned a sequence of discrete tokens where the prefix represents a broad thematic category, and subsequent tokens denote increasingly specific sub-topics.
Why It Works: Autoregressive Tree Search
Why does this structural change dramatically improve retrieval? When a sequence-to-sequence model generates a hierarchical identifier token-by-token, it is not making a single massive leap from query to document. Instead, it is navigating a conceptual decision tree.
- Step 1: The model generates the first token, selecting a broad semantic neighborhood (e.g., "Science").
- Step 2: The model generates the second token, narrowing the search space to a sub-topic (e.g., "Physics").
- Step 3: The model continues down the branch until it reaches the exact document leaf.
As Weiwei Sun et al. explain in Learning to Tokenize for Generative Retrieval, this prefix-sharing mechanism allows the model to narrow down the search space exponentially with each generated token. Even if the model fails to predict the exact document, it can still land within the correct semantic neighborhood, ensuring graceful degradation rather than catastrophic failure. This property is particularly vital when scaling to massive corpora, a challenge explored by Kai Hui et al. in How Does Generative Retrieval Scale to Millions of Passages?.
Constructing the Semantic Tree
How do we automatically construct these semantic paths? Several distinct methodologies have emerged across the literature:
Hierarchical Clustering of Embeddings
In foundational works like Transformer Memory as a Differentiable Search Index by Dara Bahri et al. and A Neural Corpus Indexer for Document Retrieval by Qi Chen et al., documents are first converted into dense semantic vectors. These vectors are then recursively clustered (e.g., using hierarchical K-means). The path from the root cluster to the final leaf cluster forms the document's identifier string.
Residual Quantization
Rather than explicit clustering, recent recommendation frameworks like those proposed by Enze Liu et al. in Generative Recommender with End-to-End Learnable Item Tokenization and Liu Yang et al. in Unifying Generative and Dense Retrieval for Sequential Recommendation utilize residual quantized variational autoencoders. This maps item attributes directly into a hierarchical sequence of discrete tokens, capturing multi-level semantic relationships end-to-end.
Explicit Taxonomies and Metadata
Instead of purely unsupervised embeddings, identifiers can be anchored to structured human knowledge. For instance, Dingxiao Liu et al. introduce Event GDR: Event-Centric Generative Document Retrieval, which constructs identifiers as semantic paths through a predefined taxonomy of event types extracted from the text. Similarly, Yuxiang Guo et al. build prefix-aware IDs for structured tables based on shared metadata in Birdie: Natural Language-Driven Table Discovery Using Differentiable Search Index.
Advanced Optimization and Structural Priors
To maximize the utility of these identifiers, the optimization process must align with the tree's structure. In Multi-level Relevance Document Identifier Learning for Generative Retrieval, Fuwei Zhang et al. introduce a hierarchical optimization strategy that trains the initial segments of a DocID to capture broad relevance while reserving deeper layers for distinguishing fine-grained differences. This ensures that the most critical semantic information is encoded in the early tokens of the generated sequence, facilitating better clustering of related items.
[Root]
├── Token "1" (Broad Category: e.g., Science)
│ ├── Token "1-1" (Sub-topic: e.g., Physics) -> DocID: 1-1-A
│ └── Token "1-2" (Sub-topic: e.g., Chemistry) -> DocID: 1-1-B
└── Token "2" (Broad Category: e.g., Arts)
└── Token "2-1" (Sub-topic: e.g., Music) -> DocID: 2-1-A
Expanding Beyond Text: Modalities and Structures
The power of hierarchical semantic identifiers extends far beyond standard document retrieval. In T2VIndexer: A Generative Video Indexer for Efficient Text-Video Retrieval, Yili Li et al. apply this paradigm to video retrieval, demonstrating that representing multi-modal items via semantic paths allows the system to maintain high accuracy even when an exact match is missing.
Furthermore, Wenyu Tao et al. develop TreeRAG: Unleashing the Power of Hierarchical Storage for Enhanced Knowledge Retrieval in Long Documents, showing how structural-semantic indexing can bridge the gap between mathematical vector similarity and logical document organization by treating a tree hierarchy as an index table.
Solving the Generalization and Update Dilemma
One of the greatest historical weaknesses of generative retrieval was its rigidity: adding new documents typically required retraining the entire network. Hierarchical semantic identifiers mitigate this by providing a robust structural prior.
As Sanket Vaibhav Mehta et al. show in DSI++: Updating Transformer Memory with New Documents, when new documents are slotted into an existing semantic cluster, the network can exploit the underlying relationships it has already learned, drastically improving its ability to retain knowledge during sequential updates.
This zero-shot navigation capability is pushed to its logical conclusion by Chuhan Wu et al. in LLMTreeRec: Unleashing the Power of Large Language Models for Cold-Start Recommendations, where a hierarchical semantic tree allows large language models to perform highly efficient cold-start recommendations by decomposing a massive search space into nested, manageable subsets.
Key Foundational Work
Transformer Memory as a Differentiable Search Index (2022) — contributed 2 concept elements to this direction.
A Neural Corpus Indexer for Document Retrieval (2022) — contributed 2 concept elements to this direction.
A Topic Transition Map for Query Expansion: A Semantic Analysis of Click-Through Data and Test Collections (2016) — contributed 1 concept elements to this direction.