Information retrieval system using a hierarchical corpus encoder

The hierarchical corpus encoder with co-training and hierarchy-aware loss function addresses the inefficiencies of conventional systems by optimizing document hierarchy and semantic understanding, resulting in enhanced retrieval performance and scalability.

WO2026072128A1PCT designated stage Publication Date: 2026-04-02MICROSOFT TECHNOLOGY LICENSING LLC
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

Conventional information retrieval systems face challenges in efficiently indexing and retrieving relevant documents from large datasets, particularly in terms of scalability and semantic understanding, especially when exact keyword matching fails.

Method used

A hierarchical corpus encoder is used with co-training and a hierarchy-aware loss function to generate vector embeddings, employing agglomerative clustering and tiered negative samples, enabling efficient and scalable retrieval by leveraging semantic understanding and optimizing the document hierarchy.

Benefits of technology

The system achieves improved performance in both supervised and unsupervised scenarios, enhancing retrieval efficiency and scalability while maintaining computational efficiency, outperforming traditional dense and generative retrieval models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US2025036372_02042026_PF_FP_ABST
    Figure US2025036372_02042026_PF_FP_ABST
Patent Text Reader

Abstract

A dense encoder is adapted as a hierarchical corpus encoder in an information retrieval system to use negative samples from sibling nodes in a hierarchical tree of vector embeddings for documents in a corpus. Both the encoder and hierarchical tree are co-trained using a loss function that takes the document hierarchy into account. The hierarchical corpus encoder may be used in both supervised training cases where query-document relevance judgments are present and in zero-shot cases where a query dataset is absent. The hierarchical corpus encoder demonstrates significant performance improvements over a variety of dense encoder and generative retrieval baselines, under both supervised and unsupervised scenarios, thereby establishing the effectiveness of jointly learning a document hierarchy.
Need to check novelty before this filing date? Find Prior Art

Description

INFORMATION RETRIEVAL SYSTEM USING A HIERARCHICAL CORPUS ENCODER BACKGROUND

[0001] Information retrieval (IR) systems are designed to help users find relevant information from large collections of data or documents. These systems typically work by indexing a corpus of documents, processing user queries, and returning ranked results that best match the query. SUMMARY

[0002] An information retrieval system includes a hierarchical corpus encoder for indexing a corpus document set with or without supervision. Co-training is provided to the hierarchical corpus encoder which operates under dense encoder principles and is also provided to a tiered hierarchical model of the document set to thereby jointly optimize the encoder and the hierarchy. The hierarchical corpus encoder computes vector embeddings for the document set which are grouped using agglomerative clustering to create the tree-based model of the corpus. During training, a hierarchy-aware loss function is utilized by which positive samples (i.e., documents having relevance to a given training query to the system) are contrasted against sibling nodes on tiers of the hierarchy tree as negative samples (i.e., irrelevant documents). Re-clustering of the hierarchical tree can be triggered if training indicates that another representation of the corpus would be more optimal for information retrieval.

[0003] The vector embeddings produced by the hierarchical corpus encoder to generate the hierarchical tree for the documents are also fed into an external document index. During runtime of the information retrieval system, when receiving user queries, the system employs the external document index using, for example, MIPS (maximum inner-product search), to identify and retrieve relevant documents that are responsive to the queries.

[0004] Use of tiered hierarchical negative samples mimics the sequence model-based training dynamics used in hierarchical generative retrieval systems while being implemented in the dense retrieval-based hierarchical corpus encoder. This approach advantageously provides the benefits of both generative and dense retrieval machine learning models. Performance is improved compared to conventional dense encoders that use contrastive learning. In addition, improvements in both zero-shot adaptation to new corpora and domains and supervised learning scenarios are realized compared to conventional generative retrieval because new documents can be encoded and added to the MIPS index without the need for additional training. The hierarchical corpus encoder is also readily scalable to large corpora while maintaining efficiency for optimized information retrieval.

[0005] The information retrieval system with hierarchical corpus encoder providesperformance improvements over a variety of traditional dense encoder and generative retrieval systems on the BEIR (Benchmarking IR) benchmark for the evaluation of information retrieval models. For both supervised and unsupervised training scenarios, the joint learning of encoder and document hierarchy is demonstrated to consistently provide significant measurable improvements.

[0006] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter. Furthermore, the claimed subject matter is not limited to implementations that solve any or all disadvantages noted in any part of this disclosure. It will be appreciated that the above-described subject matter may be implemented as a computer-controlled apparatus, a computer process, a computing system, or as an article of manufacture such as one or more computer-readable storage media. These and various other features will be apparent from a reading of the following Detailed Description and a review of the associated drawings. DESCRIPTION OF THE DRAWINGS

[0007] FIG 1 shows an illustrative use environment for the present information retrieval system using a hierarchical corpus encoder;

[0008] FIG 2 shows an illustrative overview of user interactions with an exemplary information retrieval system;

[0009] FIG 3 shows illustrative downstream tasks;

[0010] FIG 4 shows an illustrative hierarchical corpus encoder arranged in accordance with the present principles;

[0011] FIG 5 illustratively shows how a machine learning model is trained using a loss function;

[0012] FIG 6 shows an illustrative hierarchical tree representation of a document corpus with a depth of three that is generated using agglomerative clustering;

[0013] FIG 7 shows illustrative training of a dense encoder in which a query is contrasted with tiered negative samples;

[0014] FIG 8 shows a chart comparing the performance of the present hierarchical corpus encoder with various other conventional information retrieval models;

[0015] FIGs 9, 10, and 11 show illustrative methods that may be performed when implementing the present information retrieval system using a hierarchical corpus encoder; and

[0016] FIG 12 is a simplified block diagram of an illustrative computer system that may be used at least in part to implement the present information retrieval system using a hierarchicalcorpus encoder.

[0017] Like reference numerals indicate like elements in the drawings. Elements are not drawn to scale unless otherwise indicated. DETAILED DESCRIPTION

[0018] Disclosed herein is a dense encoder, operable on a computing device such as a server, that is adapted as a hierarchical corpus encoder in an information retrieval system to use negative samples from sibling nodes in a hierarchical tree of vector embeddings for documents in a corpus. Both the encoder and hierarchical tree are co-trained using a loss function that takes the document hierarchy into account. The hierarchical corpus encoder is usable in both supervised training cases where query-document relevance judgments are present and in zero-shot cases where a query dataset is absent. The hierarchical corpus encoder demonstrates significant performance improvements over a variety of dense encoder and generative retrieval baselines, under both supervised and unsupervised scenarios, thereby establishing the effectiveness of jointly learning a document hierarchy. In addition, improved performance of the computing device on which the hierarchical corpus encoder operates is realized by being more scalable and computationally efficient compared with conventional generative retrieval systems.

[0019] Turning now to the drawings, FIG 1 shows an illustrative use environment 100 for an information retrieval system 105 using a hierarchical corpus encoder 110. Users 115 of computing devices 120 such as smartphones, laptops, tablets, personal computers, game systems, wearable devices, etc., communicate with the information retrieval system over a communications network 125. The network typically comprises one or more of mobile networks, local- and wide-area networks, enterprise and private networks, and publicly-accessible networks such as the Internet. The computing devices support an information retrieval application 130 that can be implemented, for example, as a standalone application or be a browser-based application.

[0020] The use environment 100 supports document corpora 135 which are structured collections of texts that serve as datasets from which information is retrieved. A typical use case includes a data storage facility holding a corpus of documents that are accessible to users 115, for example, using an enterprise network supported by an organization such as a school or business. The users seek to retrieve documents of interest and other information in response to their queries. The information retrieval system 105 may be hosted by the organization or otherwise be accessed, for example, as a cloud-based service supported by an information retrieval service provider. The use environment 100 depicted in FIG 1 and described herein for the present information retrieval system using a hierarchical corpus encoder is intended to be illustrative only and should not be construed as limiting the scope of the invention. While specific examples of potential applications and settings are provided, it is understood that the invention may be utilized in various otherenvironments, contexts, and applications not explicitly shown or described, as would be apparent to one skilled in the art upon review of this disclosure.

[0021] FIG 2 shows an illustrative overview of user interactions with the information retrieval system 105. Using the information retrieval application 130, the user submits a query 205 to the system which processes the query and matches parameters from the query to data in an external document index. In this illustrative example, a MIPS index 210 is utilized, although other types of indices using other algorithms may also be used in alternative embodiments, for example, a nearest neighbor search (NNS). Suitable product quantization (PQ) methods (e.g., using K-means clustering) are employable to reduce the memory of the document index in some embodiments.

[0022] The information retrieval system 105 retrieves documents 215 from the corpus, in response to the query 205, which are sent to the information retrieval application 130, typically in ranked order by relevance. In some cases, downstream tasks 220 are performed by the information retrieval system.

[0023] FIG 3 shows illustrative downstream tasks 220 which include question answering (indicated by reference numeral 305) and document linking 310 in which URLs (uniform resource locators) to sources of additional information are provided. It is emphasized that these downstream tasks are illustrative and not exhaustive and that other tasks may be supported by the information retrieval system 105 to meet specific requirements of a particular implementation.

[0024] The MIPS index 210 is typically generated using offline processes to facilitate scalability and efficiency. In an illustrative example, the hierarchical corpus encoder generates the MIPS index, however, a separate encoder may be alternatively utilized in some use cases.

[0025] FIG 4 shows components of the information retrieval system 105 which include the hierarchical corpus encoder 110 configured as a dense encoder that generates dense vector embeddings 405 and 410, respectively for the query 205 and documents 415 from a corpus 135. The vector embeddings can include encodings of tokens for suitable prefixes. By encoding the text sequence as a dense vector embedding, information retrieval models can effectively match queries to relevant documents even when they do not share exact keywords, thereby leveraging the semantic understanding captured in the embedding space.

[0026] The hierarchical corpus encoder 110 in this illustrative example is based upon a T5 (text-to-text transfer transformer) dense retrieval encoder that leverages the Generalizable T5 Retriever (GTR) architecture for encoding queries and documents into the dense vector representations. T5-based dense retrieval encoders are generally recognized as being particularly useful in natural language understanding tasks, search applications, and other scenarios and use cases where semantic matching of text in large datasets is important.

[0027] GTR implementations typically employ a bi-encoder architecture in which separateencoders 420 and 425 separately handle respective vector encoding for the query and documents. The encoders 420 and 425 typically share parameters (as indicated by reference numeral 430) to enable unified and coordinated operation and thus effectively function as a single text encoder. The MIPS index 210 is utilized with a matching component 435 that matches documents with the query to provide the ranked document list 215 as an output of the information retrieval system 105.

[0028] As discussed in more detail in the text accompanying FIG 5 below, the hierarchical corpus encoder 110 learns a hierarchical tree 440. In typical embodiments of the present principles, the hierarchical tree is discarded after co-training and the vector embeddings 410 are fed into the MIPS index 210. The tree may be safely discarded because only the encoder is needed for downstream (i.e., runtime) document indexing and retrieval.

[0029] As previously noted, the hierarchical corpus encoder 110 is trained using tiered hierarchical negative samples as a loss function. FIG 5 provides an illustrative overview of a process flow 500 for training of a machine learning model (e.g., utilizing a neural network) using a loss function. Input data 505 undergoes feed forward processing 510 to generate a model prediction 515. A loss function 520 is calculated and a comparison 525 is made between predicted and true values. A loss gradient 530 is computed which is backpropagated 535 through the network layers. At each layer of the model, the gradient with respect to that layer’s weights and biases is computed to provide an update of model parameters 540. The updates thus provide an improved model 545 via training. If more training is not deemed necessary at decision block 550, then a final model 555 is created. Otherwise, the training is repeated.

[0030] The tiered hierarchical negative samples are obtained from a hierarchical tree 600 (shown in FIG 6) providing a representation of a document corpus that is generated, for example, using agglomerative clustering. Here, given an initial encoder, F0, all the vectors in the document corpus may be computed ^^: ^^^^^^^^^ௗ∈^. An agglomerative version of hierarchical clustering is performed to form the hierarchical tree 600 according to Algorithm 1, below: Algorithm 1 HIERAGGCLUSTER Require: vectors v^^ ∈ ℝ^^, 1 ≤ ^^ ≤ |^^| Require: branching factor ^^ ^^ ← ⌈log^^ | ^^ |⌉ ^^ (^^ ) ← {TREE(v^^, ∅)} ⊳ A forest of leaf nodes ^^ ← ⌈| ^^ | / ^^⌉ while ^^ > 0 do ^^(^^ - 1)← SPHKMEANS(^^(^^), ^^) ⊳ Clusters into a forest of subtrees^^ ← ^^ − 1 ^^ ← ⌈^^ / ^^⌉ end while return ^^(0)⊳ Returns a tree with a single root

[0031] As shown in FIG 6, the path from the root node 605 is kept the same length for all documents in the hierarchical tree 600 to facilitate easier parallelization on processors (e.g., graphics processing units (GPUs)) that are typically utilized for information retrieval. Starting with |^^| vectors for the entire corpus, spherical ^^-means clustering is performed (or normal K- means if not normalizing the vectors to the hypersphere), where ^^ = ⌈|^^| / ^^⌉. Here ^^ is a branching factor. Recursion is performed until ^^ = 1, when all clusters are collected into a single root node. Note that for each tree node there is no guarantee that it has exactly ^^ children, and ^^ can be understood as the expected number of vectors in each cluster. For each clustering step, spherical K-means clustering is used according to Algorithm 2, below: Algorithm 2 SPHKMEANS ^^Require: vectors v^^ ∈ ℝ , 1 ≤ ^^ ≤ |^^| Require: number of clusters ^^ ∀^^, ^^^^∼ Unif{1,・・・ , ^^} ⊳ Random init while ^^^^ not converged do ∑ ∀^^, c ←^:ೌ^సೖ ௩^^^ ௩^ ^⊳ E step v^^・c^^ ⊳ M step end while return ^^^^^^^^^^c^ , ^^^: v^^^^ୀ^^^^ஸ^ஸ^⊳ Returns a forest of clusters ⊳ TREE(^^,^^ ) is a tree with root ^^ and children ^^

[0032] The resulting hierarchical tree ^^ = ^^(0) has depth ^^ = ⌈log^^ |^^|⌉, so that each document^^ can be encoded as a fixed-length path ^^ ൌ ^^^ ^^^,⋯ , ^^^^^ௗௗ ௗ^ from the root. As shown in FIG 6, the highlighted leaf node 610 has its path to root ^^ = (1, 1, 0) shown using the bold line. Eachprefix ^^^^^^,⋯ ,^^^^^^ (l < L) of this path points to a nonterminal node ^^ of this tree 600 andcorresponds tofrom the hierarchical clustering process. The vector of the centroid isdenoted as c^^^^^^,⋯ ,^^^^^^ ∈ ℝ^.

[0033] Once the hierarchical tree 600 is generated using agglomerative clustering, as described above, the hierarchy-aware loss is computed. A common form of the loss is shown in Equation (1) below:ℒ ^q, ା ି exp ^^^q, dା^ d , D ^ ൌ െlog ^exp ^ ା ି,^^q, d ^ ^ exp ^^^q, d ^^ ష షௗ ∈^(1) Where ^^(q, d) is the scoring just aninner product (optionally scaled by a (q, d) = q・ ୯⋅^ d / ^^, or a normalized version ^^^^^,^^^ ൌwhere cosine similarity is computed. ఛ⋅‖୯‖⋅‖^‖

[0034] A hierarchical version of a sequence decoding loss function typically used in generative retrieval is shown in Equation (2) below: ^^^^^^|^ |శ^^୮ ^ ⋅^^^ ^^|^ |శశ^௧^^ା ^ ^௧^∑ ℒ ^^^,^^ ^ ൌ െ log ൌ ^ ℒ ^s , v^^^ ^, ^v ^ ^ ,^^^శGR-hier ^ ^^^^ ^∈ஊ ௧ୀ^ ௗ ^^୮ ^ ⋅^^^^(2)( )^^where ^^ is the decoder step, s allowed + on depth ^^ of the hierarchy. Positive document candidates d relevance to a query q are−−distinguished from negative documents (i.e., ^^ ∈ ^^ ).

[0035] It may be appreciated that an atomic version and hierarchical versions of a Differentiable Search Index (DSI) were proposed by Yi Tay et al. (2022) for generative retrieval. The atomic version may be considered a form of contrastive learning where the positive documents are contrasted with all other documents in the corpus. Vector embeddings for all documents are saved as parametric memory and updated under gradient descent for each training iteration. This approach differs from contrastive learning in dense retrievers where a small set of negative samples are typically sampled from the corpus.

[0036] The atomic version of DSI typically does not scale efficiently, as the number of candidate documents increases, because the size of parametric memory scales linearly with document set size. Thus, the DSI authors proposed the hierarchical version that limits the number of tokens that the decoder generates. In the hierarchical version, a hierarchy of documents is pre- computed before training via divisive K-means clustering.

[0037] The set of documents is arranged as leaves in a tree, where intermediate nodes are ^^| |^^^clustering centroids. In this tree ^^, each document ^^ is assigned a path ^^ ൌ ^^ ,⋯ ,^^ ^ ^fromௗ ௗ ௗa root of the hierarchy. The DSI decoder is expected to output this path ^^ as the sequence output.ௗIn conventional generative retrieval methods, including DSI, the construction of the tree is typically considered as a separate pre-processing step that is often performed by a different encoder that is separate from the query and document encoder.

[0038] From Equation (2), it is observed that a hierarchical version of generative retrieval performs contrastive learning at each step in the decoding process where at each step ^^, the decoderstate s(^^), acting as a query, is matched with all possible tokens Σ(^^). The correct action at this step ^^^௧^ௗశis contrasted against all other steps. Essentially, then, generative retrieval takes tiered negative samples by contrasting the vector of the positive path against the vector of negative paths on each tier of the hierarchical tree.

[0039] The adaptation of sequence decoding loss ℒGR-hierfrom DSI generative retrieval to the present hierarchical corpus encoder employs two modifications. Since the hierarchical corpus encoder uses an encoder-only architecture, the same query vector is maintained across all steps, that is, the vector embedding q = F(q) of the query q. In addition, vectors for intermediate nodes are the centroid vectors of the prefixes from K-means clustering. As such, given query q and its relevant document d+, at step t on the hierarchical tree ^^ the positive prefix ^^^^^^,⋯ ,^^^௧^^ isௗశ ௗశcontrasted against all its siblings ^^^^^^^,⋯ ,^^ ^௧ି^^,^^ᇱௗశ ௗశ ^ | ^^ᇱ ് ^^^௧ௗశ^^ to thehierarchy loss, as shown in ℒ^௧^ு ^ ^ ^^^,^^ା^ ൌ ℒ^ ^q, c (^^ ^ௗశ,⋯ ,^^ௗశ^ , ^c^^^ ^^^,⋯ ,^^ ^௧ି^^ௗశ ௗశ ,^^ᇱ^| ^^ᇱ ് ^^^௧ௗశ^^^ (3) positive andacross the hierarchical tree 600: ^ ℒ^^^,^^ା^ ൌ ^ ℒ^௧^ுு^^^,^^ା^ . (4) However, embeddings ofall the documents in a corpus as parameters in leaf nodes in the hierarchical tree. This may be addressed in some scenarios, for example, by retaining vectors for the first M (M < L) tiers of the L layers in memory. The hierarchy loss from Equation (3) is applied to the first M layers, while for the last (L – M) layers, regular contrastive loss is utilized in which negative samples are sampled within the children of the prefix: ெ ^ ℒ^^^,^^ା^ ൌ ^ ℒ^௧^^^^,^^ା^^ ^ ℒ↔^^^,^^ା^ , Sample ^^^ ^^^ ^௧^శ,⋯ ,^^ ^ ∖ ^^^ା^^.that children of the prefix p. For example, for the results shown in the table in FIG 8, nNS= 4.

[0041] The bi-directional contrastive loss computation combines several known techniques such that a candidate is viewed as the query and the queries in the batch are viewed as candidates:↔^ ^^^^ ൌ െ1 exp ^^^^^^,^^^ା^ exp ^^^^^^,^^ାo^^ ℒ ^^ l g |^^|∑ exp ^^^^^ ,^^ା^ ^ ∑ ష ష exp ^^^^^ ,^^ି^^ log∑ exp ^^^^^ ,^^ା^ . ^∈^^∈^ ^ ^ ௗ^ ∈^^ ^ ^ ^∈^ ^ ^^ ^ ^encoder and hierarchical tree are co-trained to provide for joint optimization of these components. In an illustrative embodiment, the joint optimization utilizes training using an EM (Expectation- Maximization) algorithm to implement improvements through end-to-end optimization. An EM- style co-training setup uses coordinate descent with alternating maximization, as described in Algorithm (3) below: Algorithm 3 EM-STYLE-TRAIN Require: Training dataset StrainRequire: Validation dataset Sdev Require: Document collection ^^ Require: Initial model checkpoint ^^0 ^^ ← ^^0^^ ← HIERAGGCLUSTER ^^^^ ^^^^^ ^^ ௗ∈^^^^ ← METRIC(^^, S , ^^) ⊳ Metric on ^^dev 0while early stopping criteria not met do ^^′ ← OPTIMIZE(^^, ^^, S , ^^)train^^′ ← METRIC(^^′, S , ^^)devif ^^′ > ^^ then ⊳ A better representation found ^^ ← HIERAGGCLUSTER ^^^^′^^^^^ ^ௗ∈^^^^ ← ^^′ end if ^^ ← ^^′ end while return ^^

[0043] As shown in Algorithm 3, after an epoch of training, if the metric on the validation set increases (meaning that a better representation of the corpus has been obtained), a re-clustering of the corpus will be triggered.

[0044] FIG 7 shows an illustrative example of hierarchy-aware training of the hierarchical corpus encoder 110 using the principles discussed above in which a query 705 is contrasted with tiered negative samples from a hierarchical tree 710 representation of a document set in a corpus.In this example, the query and documents are taken from the NQ320k dataset which is a subset of the Natural Questions (NQ) dataset. That dataset is a common benchmark for evaluating the performance of generative and dense retrieval models because it contains real-world search queries and information needs.

[0045] As shown, the hierarchy loss is determined from tier 1 (indicated by reference numeral 715) and tier 2 (720) in which the positive prefix p for the query q is compared against all of the sibling nodes. At tier N (725), located in the hierarchy 710 further away from the root node 730, conventional contrastive loss is utilized for training.

[0046] FIG 8 shows a chart 800 comparing the performance of the present hierarchical corpus encoder with various other conventional information retrieval models under non-supervised training scenarios. The performance data metric is NDCG@10 (Normalized Discounted Cumulative Gain at rank 10) using an average for the heterogeneous BEIR benchmark for different information retrieval tasks for its associated BEIR-14 dataset representing diverse corpora of documents. The normalization used by the NDCG@10 metric provides for NDCG values that range from 0 to 1, where 1 indicates a perfect ranking (i.e., all relevant documents are at the top of document list 215 (FIG 2). As shown in the chart, the performance of the hierarchical corpus encoder is demonstrably better compared to the other models.

[0047] FIG 9 is a flowchart 900 of an illustrative method, operating on an information retrieval system, for performing information retrieval from a corpus of documents. Unless specifically stated, methods or steps shown in the flowchart blocks and described in the accompanying text are not constrained to a particular order or sequence. In addition, some of the methods or steps thereof can occur or be performed concurrently and not all the methods or steps have to be performed in a given implementation depending on the requirements of such implementation and some methods or steps may be optionally utilized.

[0048] Block 905 includes configuring a dense encoder to generate vector embeddings for documents in the corpus. Block 910 includes arranging the vector embeddings into a hierarchical tree comprising nodes arranged in multiple tiers using agglomerative clustering, in which nodes are centroids for clusters of similar data points based on the vector embeddings, the nodes being collected to a single root node of the hierarchical tree. Block 915 includes co-training the dense encoder and hierarchical tree using a hierarchy-aware loss function in which query vectors provide positive samples that are contrasted with vectors of sibling nodes of the hierarchical tree as negative samples.

[0049] FIG 10 is a flowchart 1000 of an illustrative method that is implementable using the present principles. Block 1005 includes providing a dense encoder in an information retrieval system supporting a user interface for users to provide queries and receive ranked documents thatare responsive to the queries from a document corpus. Block 1010 includes training the dense encoder using tiered hierarchical negative samples from a representation of the corpus that includes vector embeddings for documents from the corpus arranged in a hierarchical tree, wherein positive samples are contrasted against siblings on tiers of the hierarchical tree to provide a hierarchy-aware loss function for the training.

[0050] FIG 11 is a flowchart 1100 of an illustrative method that is performable on a computing device in accordance with the present principles. Block 1105 includes implementing a hierarchical corpus encoder in an information retrieval system. Block 1110 includes operating the hierarchical corpus encoder to compute vector embeddings in a set of documents in a corpus.

[0051] Block 1115 includes performing hierarchical clustering of the vector embeddings to form a tiered hierarchical tree having a single root node, wherein each document in the corpus is encoded having a fixed length path from the root node. Block 1120 includes using the hierarchical corpus encoder trained with a loss function in which a path for a query vector to a positive sample in the hierarchical tree is contrasted with paths to negative samples on each of a plurality of tiers of the hierarchical tree.

[0052] Block 1125 includes receiving a query from a user of the information retrieval system. Block 1130 includes operating the hierarchical corpus encoder to compute vector embeddings for the query. Block 1135 includes retrieving documents from the corpus responsive to the query using an external document index by matching query vector embeddings to document vector embeddings contained in the external document index.

[0053] FIG 12 shows an illustrative architecture 1200 for a computing device, such as a server, capable of executing the various components described herein for the present information retrieval system using a hierarchical corpus encoder. The architecture 1200 illustrated in FIG 12 includes one or more processors 1202 (e.g., central processing unit, dedicated AI chip, graphics processing unit, etc.), a system memory 1204, including RAM (random access memory) 1206 and ROM (read only memory) 1208, and a system bus 1210 that operatively and functionally couples the components in the architecture 1200. A basic input / output system containing the basic routines that help to transfer information between elements within the architecture 1200, such as during startup, is typically stored in the ROM 1208. The architecture 1200 further includes a mass storage device 1212 for storing software code or other computer-executed code that is utilized to implement applications, the file system, and the operating system. The mass storage device 1212 is connected to the processor 1202 through a mass storage controller (not shown) connected to the bus 1210. The mass storage device 1212 and its associated computer-readable storage media provide non-volatile storage for the architecture 1200. Although the description of computer- readable storage media contained herein refers to a mass storage device, such as a hard disk orCD-ROM drive, it may be appreciated by those skilled in the art that computer-readable storage media can be any available storage media that can be accessed by the architecture 1200.

[0054] By way of example, and not limitation, computer-readable storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules, or other data. For example, computer-readable media includes, but is not limited to, RAM, ROM, EPROM (erasable programmable read only memory), EEPROM (electrically erasable programmable read only memory), Flash memory or other solid state memory technology, CD-ROM, DVDs, HD-DVD (High Definition DVD), Blu-ray, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by the architecture 1200.

[0055] According to various embodiments, the architecture 1200 may operate in a networked environment using logical connections to remote computers through a network. The architecture 1200 may connect to the network through a network interface unit 1216 connected to the bus 1210. It may be appreciated that the network interface unit 1216 also may be utilized to connect to other types of networks and remote computer systems. The architecture 1200 also may include an input / output controller 1218 for receiving and processing input from a number of other devices, including a keyboard, mouse, touchpad, touchscreen, and / or control devices such as buttons and switches or electronic stylus (not shown in FIG 12). Similarly, the input / output controller 1218 may provide output to a display screen, user interface, a printer, or other type of output device (also not shown in FIG 12).

[0056] It may be appreciated that the software components described herein may, when loaded into the processor 1202 and executed, transform the processor 1202 and the overall architecture 1200 from a general-purpose computing system into a special-purpose computing system customized to facilitate the functionality presented herein. The processor 1202 may be constructed from any number of transistors or other discrete circuit elements, which may individually or collectively assume any number of states. More specifically, the processor 1202 may operate as a finite-state machine, in response to executable instructions contained within the software modules disclosed herein. These computer-executable instructions may transform the processor 1202 by specifying how the processor 1202 transitions between states, thereby transforming the transistors or other discrete hardware elements constituting the processor 1202.

[0057] Encoding the software modules presented herein also may transform the physical structure of the computer-readable storage media presented herein. The specific transformation of physical structure may depend on various factors, in different implementations of this description.Examples of such factors may include, but are not limited to, the technology used to implement the computer-readable storage media, whether the computer-readable storage media is characterized as primary or secondary storage, and the like. For example, if the computer-readable storage media is implemented as semiconductor-based memory, the software disclosed herein may be encoded on the computer-readable storage media by transforming the physical state of the semiconductor memory. For example, the software may transform the state of transistors, capacitors, or other discrete circuit elements constituting the semiconductor memory. The software also may transform the physical state of such components in order to store data thereupon. For purposes of this specification and the claims, the phrase “computer-readable storage media” and variations thereof, are intended to cover non-transitory embodiments, and does not include waves, signals, and / or other transitory and / or intangible communication media.

[0058] As another example, the computer-readable storage media disclosed herein may be implemented using magnetic or optical technology. In such implementations, the software presented herein may transform the physical state of magnetic or optical media, when the software is encoded therein. These transformations may include altering the magnetic characteristics of particular locations within given magnetic media. These transformations also may include altering the physical features or characteristics of particular locations within given optical media to change the optical characteristics of those locations. Other transformations of physical media are possible without departing from the scope and spirit of the present description, with the foregoing examples provided only to facilitate this discussion.

[0059] In light of the above, it may be appreciated that many types of physical transformations take place in the architecture 1200 in order to store and execute the software components presented herein. It also may be appreciated that the architecture 1200 may include other types of computing devices, including wearable devices, handheld computers, embedded computer systems, smartphones, PDAs, and other types of computing devices known to those skilled in the art. It is also contemplated that the architecture 1200 may not include all of the components shown in FIG 12, may include other components that are not explicitly shown in FIG 12, or may utilize an architecture completely different from that shown in FIG 12.

[0060] Various exemplary embodiments of the present information retrieval system using a hierarchical corpus encoder are now presented by way of illustration and not as an exhaustive list of all embodiments. An example includes a method, operating on an information retrieval system, for performing information retrieval from a corpus of documents, comprising: configuring a dense encoder to generate vector embeddings for documents in the corpus; arranging the vector embeddings into a hierarchical tree comprising nodes arranged in multiple tiers using agglomerative clustering, in which nodes are centroids for clusters of similar data points based onthe vector embeddings, the nodes being collected to a single root node of the hierarchical tree; and co-training the dense encoder and hierarchical tree using a hierarchy-aware loss function in which query vectors provide positive samples that are contrasted with vectors of sibling nodes of the hierarchical tree as negative samples.

[0061] In another example, the method further comprises generating an external document index, the generating comprising encoding documents in the corpus into vectors or encoding passages in documents in the corpus into vectors, the vectors being stored in the external document index. In another example, the method further comprises receiving queries from users of the information retrieval system, encoding the queries into vectors, and performing similarity searches to identify and retrieve documents from the corpus based on similarities between query vectors and vectors in the external document index. In another example, the external document index is configured in accordance with one of MIPS (maximum inner product search) or NNS (nearest neighbor search). In another example, the dense encoder comprises a machine learning model based on T5 (text-to-text transfer transformer). In another example, the method further comprises, during training, using the hierarchy-aware loss function for a predetermined number of tiers in the hierarchical tree and using a contrastive loss function for a different predetermined number of tiers in the hierarchical tree. In another example, the co-training comprises one of supervised training, in which a query-document relevance dataset is present; or zero-shot training, in which a query- document relevance dataset is absent.

[0062] A further example includes a computer-readable storage device storing computer- executable instructions, the computer-readable storage device operatively coupled to a processor in a computing device, the processor being responsive to the computer-executable instructions and operative for: providing a dense encoder in an information retrieval system supporting a user interface for users to provide queries and receive ranked documents that are responsive to the queries from a document corpus; and training the dense encoder using tiered hierarchical negative samples from a representation of the corpus that includes vector embeddings for documents from the corpus arranged in a hierarchical tree, wherein positive samples are contrasted against siblings on tiers of the hierarchical tree to provide a hierarchy-aware loss function for the training.

[0063] In another example, the hierarchy-aware loss function further comprises a contrastive loss component. In another example, the contrastive loss component comprises negative samples from children of a prefix of a training query. In another example, the computer-executable instructions are further operative for jointly training the dense encoder and hierarchical tree using EM-style (Expectation-Maximization) training using coordinate descent with alternating maximization. In another example, the dense encoder is configured as one of a single encoder or a dual-encoder with shared parameters. In another example, the hierarchical tree is generated usingK-means clustering. In another example, the computer-executable instructions are further operative for re-indexing the external document index responsive to distortions in the hierarchical tree representation of the corpus. In another example, the computer-executable instructions are further operative for performing downstream tasks.

[0064] A further example includes a computing device, comprising: a memory for storing executable program code; and a processor, functionally coupled to the memory, the processor being responsive to computer-executable instructions contained in the program code and operative for: implementing a hierarchical corpus encoder in an information retrieval system; operating the hierarchical corpus encoder to compute vector embeddings in a set of documents in a corpus; performing hierarchical clustering of the vector embeddings to form a tiered hierarchical tree having a single root node, wherein each document in the corpus is encoded having a fixed length path from the root node; using the hierarchical corpus encoder that is trained with a loss function in which a path for a query vector to a positive sample in the hierarchical tree is contrasted with paths to negative samples on each of a plurality of tiers of the hierarchical tree; receiving a query from a user of the information retrieval system; operating the hierarchical corpus encoder to compute vector embeddings for the query; and retrieving documents from the corpus responsive to the query using an external document index by matching query vector embeddings to document vector embeddings contained in the external document index.

[0065] In another example, the computer-executable instructions in the program code are further operative for jointly training the hierarchical corpus encoder and hierarchical tree, in which the vector embeddings are re-clustered to provide a hierarchical tree that provides more optimized representation of the corpus. In another example, the computer-executable instructions in the program code are further operative for contrasting a positive prefix for the query against all its siblings on a tier of the hierarchical tree. In another example, the computer-executable instructions in the program code are further operative for providing downstream tasks comprising one or more of answering questions relating to the corpus or providing links relating to the corpus. In another example, the hierarchal corpus encoder comprises a dense retrieval-based encoder.

[0066] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims

CLAIMS 1. A method, operating on an information retrieval system (105), for performing information retrieval from a corpus of documents (135), comprising: configuring a dense encoder to generate vector embeddings for documents in the corpus (905); arranging the vector embeddings into a hierarchical tree comprising nodes arranged in multiple tiers using agglomerative clustering, in which nodes are centroids for clusters of similar data points based on the vector embeddings, the nodes being collected to a single root node of the hierarchical tree (910); and co-training the dense encoder and hierarchical tree using a hierarchy-aware loss function in which query vectors provide positive samples that are contrasted with vectors of sibling nodes of the hierarchical tree as negative samples (915).

2. The method of claim 1, further comprising generating an external document index, the generating comprising encoding documents in the corpus into vectors or encoding passages in documents in the corpus into vectors, the vectors being stored in the external document index.

3. The method of claim 2, further comprising receiving queries from users of the information retrieval system, encoding the queries into vectors, and performing similarity searches to identify and retrieve documents from the corpus based on similarities between query vectors and vectors in the external document index.

4. The method of claim 3, in which the external document index is configured in accordance with one of MIPS (maximum inner product search) or NNS (nearest neighbor search).

5. The method of claim 1, in which the dense encoder comprises a machine learning model based on T5 (text-to-text transfer transformer).

6. The method of claim 1, further comprising, during training, using the hierarchy-aware loss function for a predetermined number of tiers in the hierarchical tree and using a contrastive loss function for a different predetermined number of tiers in the hierarchical tree.

7. The method of claim 1, in which the co-training comprises one of supervised training, in which a query-document relevance dataset is present, or zero-shot training, in which a query- document relevance dataset is absent.

8. A computer-readable storage device (1212) storing computer-executable instructions, the computer-readable storage device (1212) operatively coupled to a processor (1202) in a computing device (1200), the processor (1202) being responsive to the computer-executable instructions and operative for: providing a dense encoder in an information retrieval system supporting a user interface for users to provide queries and receive ranked documents that are responsive to thequeries from a document corpus (1005); and training the dense encoder using tiered hierarchical negative samples from a representation of the corpus that includes vector embeddings for documents from the corpus arranged in a hierarchical tree, wherein positive samples are contrasted against siblings on tiers of the hierarchical tree to provide a hierarchy-aware loss function for the training (1010).

9. The computer-readable storage device of claim 8, wherein the hierarchy-aware loss function further comprises a contrastive loss component.

10. The computer-readable storage device of claim 9, wherein the contrastive loss component comprises negative samples from children of a prefix of a training query.

11. The computer-readable storage device of claim 10, in which the computer-executable instructions are further operative for jointly training the dense encoder and hierarchical tree using EM-style (Expectation-Maximization) training using coordinate descent with alternating maximization.

12. The computer-readable storage device of claim 8, wherein the dense encoder is configured as one of a single encoder or a dual-encoder with shared parameters.

13. The computer-readable storage device of claim 8, wherein the hierarchical tree is generated using K-means clustering.

14. The computer-readable storage device of claim 8, in which the computer-executable instructions are further operative for re-indexing the external document index responsive to distortions in the hierarchical tree representation of the corpus.

15. The computer-readable storage device of claim 8, in which the computer-executable instructions are further operative for performing downstream tasks.

Citation Information

Patent Citations

  • Hierarchical multi-label professional technical document classification method and system using label information

    CN116932763A