Enhanced method and apparatus for reordering model, query method and apparatus

CN123014167APending Publication Date: 2026-10-30BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611132404.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-28
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]本公开提供一种重排序模型的增强方法及装置、查询方法及装置,以至少解决相关技术中潜在信息的质量无法保证的问题

Benefits of technology

根据本公开的重排序模型的增强方法及装置、查询方法及装置,通过将推理链渲染为图像、经视觉编码器和大语言模型提取跨模态监督信号(即目标向量),为潜在信息提供高质量的对齐目标,从而在增强重排序模型时不仅依赖了下一词元预测损失,还结合了对齐损失,使得可以重训练出能够输出更准确的潜在信息和排序结果的增强重排序模型。这一跨模态监督机制使得视觉编码产生的隐藏状态与重排序模型的自回归先验解耦,天然具有信息瓶颈效应,从而增强重排序模型表现出更稳定的对齐特性,进而实现高效推理增强重排序,提升了针对每个查询文本的候选文档排序准确性和潜在信息的质量。因此,本公开解决了相关技术中潜在信息的质量无法保证问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123014167A_ABST
    Figure CN123014167A_ABST
Patent Text Reader

Abstract

The present disclosure relates to an enhanced method and device of a reordering model, a query method and device. The method comprises: obtaining a training data set; for each query text in the training data set, rendering a true reasoning chain corresponding to the query text into a target image, and based on the target image, using a visual encoder and a large language model to obtain a hidden state corresponding to the last word token output by the large language model as a target vector of the query text; for each query text in the training data set, the following processing is performed: inputting the query text and the corresponding candidate document into the reordering model to obtain the estimated potential information corresponding to the query text and the first estimated ranking result; determining a next word token prediction loss according to the first estimated ranking result and the true ranking result; determining an alignment loss based on the estimated potential information and the target vector; and adjusting the parameters of the reordering model by minimizing the next word token prediction loss and the alignment loss to obtain an enhanced reordering model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence, and more particularly to an enhancement method and apparatus for a reordering model, and a query method and apparatus. Background Technology

[0002] With the rapid development of reasoning capabilities in Large Language Models (LLMs), reasoning-based information retrieval and document reranking technologies have received widespread attention. In typical application scenarios such as Retrieval-Augmented Generation (RAG), knowledge question answering, and academic search, the reranking module is responsible for selecting the most relevant documents to the query text from the candidate document set returned by the initial retrieval. Its ranking quality directly determines the upper limit of the effectiveness of downstream tasks (such as answer generation and decision support).

[0003] Traditional reranking methods primarily rely on bi-encoders or cross-encoders for relevance scoring, failing to fully leverage the deep semantic understanding and multi-step reasoning capabilities of LLMs. In recent years, reasoning-intensive rerankers, such as ReasonRank, Rank1, and Rank-R1, have significantly improved ranking accuracy on complex reasoning-intensive queries (such as the BRIGHT benchmark) by enabling the model to generate a complete chain-of-thought (CoT) reasoning process before reranking.

[0004] However, current inference-enhanced reorderers not only face serious inference cost problems, namely that the model needs to generate hundreds or even thousands of inference lexical units for each query-document window, resulting in high inference latency and large computational overhead, posing significant challenges in industrial deployment; but also lack external supervision signals and suffer from language surface structure interference due to compression within the text space, making it difficult to guarantee the quality of underlying information. Summary of the Invention

[0005] This disclosure provides an enhancement method and apparatus for a reordering model, as well as a query method and apparatus, to at least address the problem of the inability to guarantee the quality of potential information in related technologies.

[0006] According to a first aspect of the present disclosure, an enhancement method for a re-ranking model is provided, comprising: acquiring a training dataset, wherein the training dataset includes multiple query texts, candidate documents corresponding to each query text, a true inference chain, and a true ranking result; for each query text in the training dataset, rendering the true inference chain corresponding to the query text as a target image, and based on the target image, using a visual encoder and a large language model, obtaining the hidden state corresponding to the last word element output by the large language model as the target vector of the query text; for each query text in the training dataset, performing the following processing: inputting the query text and the candidate documents corresponding to the query text into the re-ranking model to obtain estimated latent information and a first estimated ranking result corresponding to the query text, wherein the estimated latent information is a low-dimensional feature corresponding to the estimated inference chain of the query text; determining the next word element prediction loss based on the first estimated ranking result and the true ranking result corresponding to the query text; determining the alignment loss corresponding to the query text based on the estimated latent information and the target vector; adjusting the parameters of the re-ranking model by minimizing the next word element prediction loss and the alignment loss, and training the re-ranking model to obtain an enhanced re-ranking model.

[0007] Optionally, inputting the query text and the candidate documents corresponding to the query text into the re-ranking model to obtain the estimated latent information and the first estimated ranking result corresponding to the query text includes: constructing a first input sequence for the query text, wherein the first input sequence includes the query text, the candidate documents corresponding to the query text, a predetermined number of start words, a predetermined number of latent words, a predetermined number of end words, and the ranking result, wherein the predetermined number is less than a preset value; inputting the first input sequence into the re-ranking model to obtain the estimated latent information and the first estimated ranking result corresponding to the query text, wherein for each layer in the re-ranking model, the latent information corresponding to the start words adopts the hidden state corresponding to the end words in the previous layer, the latent information corresponding to the latent words adopts the hidden state corresponding to the start words, the latent information corresponding to the end words adopts the hidden state corresponding to the latent words, and the estimated latent information is the latent information corresponding to the latent words in the last layer of the re-ranking model.

[0008] Optionally, rendering the real inference chain corresponding to the query text into a target image includes: searching in order from large to small fonts within a preset font size range to determine the largest font that can fit the real inference chain within a preset size, wherein the preset size is a pre-set size of the target image; and rendering the real inference chain corresponding to the query text into a target image of the preset size according to the largest font.

[0009] Optionally, after rendering the real inference chain corresponding to the query text into a target image of a preset size by the largest font, the method further includes: adjusting the parameters of the target image in response to the confidence level of the target image being less than a preset threshold until the confidence level of the target image exceeds the preset threshold.

[0010] Optionally, the training dataset is obtained by: pre-acquiring multiple given query texts, candidate documents corresponding to each given query text, and a real inference chain; obtaining the normalized loss cumulative gain for each given query text based on the real inference chain; and selecting given query texts from the multiple given query texts whose normalized loss cumulative gain is greater than or equal to a preset value as query texts in the training dataset.

[0011] Optionally, the re-ranking model is pre-obtained as follows: For each query text among multiple query texts, the following processing is performed: Construct a second input sequence for the query text, wherein the second input sequence includes the query text, the candidate document corresponding to the query text, the start term, the inference chain, and the end term; Input the second input sequence into the initial re-ranking model to obtain the estimated inference chain and the second estimated ranking result corresponding to the query text; Based on the estimated inference chain, the second estimated ranking result, the true inference chain, and the true ranking result, determine the next term prediction loss; Adjust the parameters of the initial re-ranking model by minimizing the next term prediction loss, and train the initial re-ranking model to obtain the re-ranking model.

[0012] According to a second aspect of the present disclosure, a query method is provided, comprising: inputting a text to be queried and candidate documents corresponding to the text to an enhanced re-ranking model to obtain a ranking result of the candidate documents; and determining, based on the ranking result, the candidate document most relevant to the text to be queried; wherein the enhanced re-ranking model is obtained by any of the above-described enhancement methods.

[0013] Optionally, the query text and its corresponding candidate documents are input into an enhanced re-ranking model to obtain the ranking results of the candidate documents. This includes: constructing a first input sequence for the query text, wherein the first input sequence includes the query text, the candidate documents corresponding to the query text, a predetermined number of start words, a predetermined number of latent words, a predetermined number of end words, and the ranking results, wherein the predetermined number is less than a preset value; inputting the first input sequence into the enhanced re-ranking model to obtain the estimated latent information and ranking results corresponding to the query text, wherein for each layer in the enhanced re-ranking model, the latent information corresponding to the start words adopts the hidden state corresponding to the end words in the previous layer, the latent information corresponding to the latent words adopts the hidden state corresponding to the start words, the latent information corresponding to the end words adopts the hidden state corresponding to the latent words, and the estimated latent information is the latent information corresponding to the latent words in the last layer of the enhanced re-ranking model.

[0014] According to a third aspect of the present disclosure, an enhancement apparatus for a re-ranking model is provided, comprising: a first acquisition unit configured to acquire a training dataset, wherein the training dataset includes multiple query texts, candidate documents corresponding to each query text, a true inference chain, and a true ranking result; a second acquisition unit configured to, for each query text in the training dataset, render the true inference chain corresponding to the query text as a target image, and based on the target image, obtain the hidden state corresponding to the last word unit output by the large language model using a visual encoder and a large language model, as the target vector of the query text; and a processing unit configured to process the training data... For each query text, the following processing is performed: The query text and its corresponding candidate documents are input into the re-ranking model to obtain the estimated latent information and the first estimated ranking result for the query text. The estimated latent information consists of low-dimensional features corresponding to the estimated inference chain of the query text. Based on the first estimated ranking result and the actual ranking result for the query text, the next word prediction loss is determined. Based on the estimated latent information and the target vector, the alignment loss for the query text is determined. An adjustment unit is configured to adjust the parameters of the re-ranking model by minimizing the next word prediction loss and the alignment loss, thereby training the re-ranking model to obtain an enhanced re-ranking model.

[0015] Optionally, the processing unit is further configured to construct a first input sequence for the query text, wherein the first input sequence includes the query text, candidate documents corresponding to the query text, a predetermined number of start words, a predetermined number of potential words, and a predetermined number of end words, the predetermined number being less than a preset value; the first input sequence is input into the re-ranking model to obtain the estimated potential information corresponding to the query text and a first estimated ranking result, wherein for each layer in the re-ranking model, the potential information corresponding to the start words adopts the hidden state corresponding to the end words in the previous layer, the potential information corresponding to the potential words adopts the hidden state corresponding to the start words, the potential information corresponding to the end words adopts the hidden state corresponding to the potential words, and the estimated potential information is the potential information corresponding to the potential words in the last layer of the re-ranking model.

[0016] Optionally, the second acquisition unit is further configured to search in order from large to small fonts within a preset font size range to determine the largest font that can fit the real inference chain within a preset size, wherein the preset size is a pre-set size of the target image; and to render the real inference chain corresponding to the query text as a target image of the preset size according to the largest font.

[0017] Optionally, the second acquisition unit is further configured to, after rendering the real inference chain corresponding to the query text into a target image of a preset size by the maximum font, adjust the parameters of the target image until the confidence of the target image exceeds the preset threshold in response to the target image's confidence being less than a preset threshold.

[0018] Optionally, the first acquisition unit is further configured to pre-acquire multiple given query texts, candidate documents corresponding to each given query text, and a real inference chain; based on the real inference chain, obtain the normalized loss cumulative gain of each given query text; and select given query texts from the multiple given query texts whose normalized loss cumulative gain is greater than or equal to a preset value as query texts in the training dataset.

[0019] Optionally, the re-ranking model is pre-obtained as follows: For each query text among multiple query texts, the following processing is performed: Construct a second input sequence for the query text, wherein the second input sequence includes the query text, the candidate document corresponding to the query text, the start term, the inference chain, and the end term; Input the second input sequence into the initial re-ranking model to obtain the estimated inference chain and the second estimated ranking result corresponding to the query text; Based on the estimated inference chain, the second estimated ranking result, the true inference chain, and the true ranking result, determine the next term prediction loss; Adjust the parameters of the initial re-ranking model by minimizing the next term prediction loss, and train the initial re-ranking model to obtain the re-ranking model.

[0020] According to a fourth aspect of the present disclosure, a query apparatus is provided, comprising: a third acquisition unit configured to input a text to be queried and candidate documents corresponding to the text to an enhanced re-ranking model to obtain a ranking result of the candidate documents; and a determination unit configured to determine, based on the ranking result, the candidate document most relevant to the text; wherein the enhanced re-ranking model is obtained through any of the above-described enhancement methods.

[0021] Optionally, the third acquisition unit is further configured to construct a first input sequence for the query text, wherein the first input sequence includes the query text, candidate documents corresponding to the query text, a predetermined number of start words, a predetermined number of potential words, a predetermined number of end words, and a ranking result, wherein the predetermined number is less than a preset value; the first input sequence is input into the enhanced re-ranking model to obtain the estimated potential information and ranking result corresponding to the query text, wherein for each layer in the enhanced re-ranking model, the potential information corresponding to the start words adopts the hidden state corresponding to the end words in the previous layer, the potential information corresponding to the potential words adopts the hidden state corresponding to the start words, the potential information corresponding to the end words adopts the hidden state corresponding to the potential words, and the estimated potential information is the potential information corresponding to the potential words in the last layer of the enhanced re-ranking model.

[0022] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and at least one memory storing computer-executable instructions, wherein the computer-executable instructions, when executed by the at least one processor, cause the at least one processor to perform an enhancement method and / or a query method for a reordering model as described above.

[0023] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided that, when instructions in the computer-readable storage medium are executed by at least one processor, causes at least one processor to perform an enhancement method and / or a query method for a reordering model as described above.

[0024] According to a seventh aspect of the present disclosure, a computer program product is provided, including computer instructions that, when executed by a processor, implement an enhanced method and / or a query method for a reordering model as described above.

[0025] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects: According to the enhancement method and apparatus for the re-ranking model, and the query method and apparatus of this disclosure, by rendering the inference chain as an image and extracting cross-modal supervision signals (i.e., target vectors) through a visual encoder and a large language model, high-quality alignment targets are provided for the latent information. Therefore, the enhanced re-ranking model not only relies on the next lexical prediction loss but also incorporates alignment loss, enabling retraining to produce an enhanced re-ranking model that outputs more accurate latent information and ranking results. This cross-modal supervision mechanism decouples the hidden states generated by visual encoding from the autoregressive prior of the re-ranking model, naturally possessing an information bottleneck effect. This results in the enhanced re-ranking model exhibiting more stable alignment characteristics, thereby achieving efficient inference-based enhanced re-ranking and improving the accuracy of candidate document ranking and the quality of latent information for each query text. Therefore, this disclosure solves the problem of unreliable quality of latent information in related technologies.

[0026] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0027] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0028] Figure 1 This is a flowchart illustrating an enhancement method for a reordering model according to exemplary embodiments of the present disclosure; Figure 2This is a schematic diagram illustrating the preparation process of the training dataset and the target vector according to exemplary embodiments of the present disclosure; Figure 3 This is a flowchart illustrating a query method according to exemplary embodiments of the present disclosure; Figure 4 This is a schematic diagram illustrating two training phases and an inference phase according to exemplary embodiments of the present disclosure; Figure 5 This is a system architecture diagram illustrating the process from offline data preparation to two-stage training and then to inference deployment, according to exemplary embodiments of the present disclosure. Figure 6 This is a block diagram illustrating an enhancement device for a reordering model according to exemplary embodiments of the present disclosure; Figure 7 This is a block diagram illustrating a query device according to exemplary embodiments of the present disclosure; Figure 8 This is a diagram illustrating a computing environment coupled to a user interface according to exemplary embodiments of the present disclosure. Detailed Implementation

[0029] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0030] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following examples do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0031] It should be noted that the phrase "at least one of several items" in this disclosure refers to three parallel cases: "any one of the several items", "a combination of any number of the several items", and "all of the several items". For example, "including at least one of A and B" includes the following three parallel cases: (1) including A; (2) including B; (3) including A and B. Another example is "performing at least one of step one and step two", which means the following three parallel cases: (1) performing step one; (2) performing step two; (3) performing both step one and step two.

[0032] The following section introduces commonly used reasoning-enhanced document reordering methods.

[0033] (1) Represented by ReasonRank (Liu et al., arXiv:2508.07050), this type of method achieves reasoning-enhanced document reordering through the following process: Training Phase: A two-stage training framework is employed. The first stage is Supervised Fine-Tuning (SFT), which uses 13k inference training data synthesized from strong inference models such as DeepSeek-R1 to fine-tune the Qwen2.5-7B / 32B-Instruct backbone model, injecting list-level reordering capabilities and stepwise inference capabilities. The second stage is Reinforcement Learning (RL) based on multi-view ranking rewards, employing the Group Relative Policy Optimization (GRPO) algorithm to further optimize the model with multi-dimensional reward signals such as ranking consistency and document relevance, improving its reordering accuracy in inference-intensive scenarios.

[0034] Inference phase: Given a query text and candidate document list The model first generates a complete reasoning chain (abbreviated as: R The algorithm derives the semantic association and relevance analysis between each document and the query text, and then outputs the final ranked list of documents based on the inference results. The overall input and output format is as follows:

[0035] Among them, the reasoning chain R It typically involves detailed steps of analyzing each document individually, with an average length of hundreds to thousands of lexical units.

[0036] On the BRIGHT (Benchmark for Retrieval with Intensive General Heterogeneous Tasks) benchmark, ReasonRank-7B achieved an average NDCG@10=35.26 ranking accuracy, and ReasonRank-32B achieved NDCG@10=36.20, both outperforming zero-sample baseline models with similar parameter counts. It should be noted that BRIGHT is a reasoning-intensive information retrieval benchmark covering complex queries across 12 professional fields, including economics, biology, and robotics. NDCG (Normalized Discounted Cumulative Gain) is a standard evaluation metric in the information retrieval field, measuring the quality of search result ranking; higher-ranking relevant documents score higher.

[0037] However, this type of method has the following drawbacks: The high cost of inference tokens makes it unsuitable for real-time industrial applications: ReasonRank-7B outputs an average of 755 tokens per window, while ReasonRank-32B outputs an average of 1119 tokens per window. In sliding window sorting, multiple rounds of sorting for 100 candidate documents require generating tens of thousands of tokens, resulting in extremely high inference latency and making direct deployment in industrial online services (which typically require millisecond-level response times) difficult.

[0038] The reasoning length increases linearly with the number of documents, resulting in poor scalability: the reasoning chain requires analyzing each candidate document one by one. As the number of candidate documents increases, the number of output lexical units increases linearly, and the computational cost cannot be effectively controlled.

[0039] The high proportion of redundant reasoning content and low information utilization rate: The generated thought chain contains a large amount of templated language and repetitive descriptions (such as fixed analytical framework terms). These contents contribute little to the final ranking result and are redundant outputs with low information content, resulting in a waste of computing resources.

[0040] Alignment issues arising from the inconsistency between training and inference paradigms: The complete explicit CoT inference chain serves as a supervisory target during training, but its verbosity results in an extremely long training sequence, exacerbating memory pressure and potentially causing the model to deviate from the core inference task during the generation process.

[0041] (2) Represented by COCONUT (Hao et al., 2025) and CODI (Shen et al., 2025), implicit reasoning methods achieve implicit and compressed reasoning processes by replacing explicit text reasoning chains with several consecutive latent tokens.

[0042] Taking COCONUT as an example, its core idea is to replace the reasoning steps in the thought process with... L A series of potential word slots (usually) L =4~8), and use multi-stage course training to gradually guide the model to internalize reasoning ability into the latent space:

[0043] in, For potential inference lexical units, each potential inference lexical unit The slot is now in a hidden state from the previous position. Filling in the blanks involves forming an implicit thought process through a continuous filling mechanism. During training, the next-to-next-word prediction (NTP) loss is applied to the answer word, without explicit supervision signals.

[0044] CODI compresses the explicit CoT output of the teacher model into a continuous latent space through self-distillation, and also adopts a multi-latent lexical design.

[0045] The above method achieves a certain degree of inference compression on mathematical inference tasks such as GSM8K and reduces the number of output tokens.

[0046] However, this type of method has the following drawbacks: Multi-terminal design leads to limited compression ratio: COCONUT-6 ( L Configurations such as =6 still require generating 6 potential lexical units and subsequent answers, and the configuration relationship between the number of lexical units and reasoning ability is difficult to optimize.

[0047] Lacking external supervision signals, the quality of latent information is difficult to guarantee: COCONUT and CODI rely solely on answer correctness (NTP loss) or self-distillation signals to train latent information, lacking structured supervision from independent external sources. In complex reasoning scenarios, latent lexical units are prone to degenerate into noisy representations with low information content.

[0048] Compression within the text space suffers from interference from the surface structure of language, making it difficult to guarantee the quality of latent information: Whether it is COCONUT's NTP supervision or CODI's self-distillation, the target vector comes from the hidden state of the model's own text space, which is deeply coupled with the autoregressive prior of the language model. It is easily affected by the surface structure of words (such as word order and format), resulting in insufficient ability of latent information to capture semantic structure, and further leading to the inability to guarantee the quality of latent information.

[0049] The training process is unstable and multi-stage optimization is complex: the introduction of multiple latent lexical units requires meticulous multi-stage course training, which is extremely sensitive to hyperparameters (number of lexical units, number of training steps in each stage, loss weights, etc.), and the training process is difficult to reproduce.

[0050] Not validated in information retrieval reordering scenarios: The above methods have been validated mainly on closed tasks such as mathematical reasoning (GSM8K) and logical reasoning (ProntoQA), and have not been systematically explored on paragraph reordering tasks that require complex document-level semantic understanding.

[0051] To address the aforementioned issues, this disclosure provides an enhancement method for re-ranking models. By rendering the inference chain as an image and extracting cross-modal supervision signals (i.e., target vectors) through a visual encoder and a large language model, high-quality alignment targets are provided for latent information. This enhances the re-ranking model by incorporating not only next-word prediction loss but also alignment loss, enabling retraining to produce an enhanced re-ranking model that outputs more accurate latent information and ranking results. This cross-modal supervision mechanism decouples the hidden states generated by visual encoding from the autoregressive prior of the re-ranking model, naturally exhibiting an information bottleneck effect. This results in more stable alignment characteristics in the enhanced re-ranking model, leading to efficient inference-enhanced re-ranking and improving the accuracy of candidate document ranking and the quality of latent information for each query text.

[0052] Furthermore, a smaller number of latent lexical designs (e.g., a predetermined number of 1) can be used. This smaller design not only achieves maximum inference compression but also provides a fixed-latency budget guarantee for inference services in industrial deployments. Moreover, the target vector exhibits stable alignment characteristics under the constraint of a predetermined number of lexical compressions, thereby enabling efficient inference-enhanced reordering.

[0053] Furthermore, adaptive font size search ensures the inference chain remains fully rendered within a fixed canvas, and comparison of confidence scores with preset thresholds ensures automatic correction and re-rendering of low-quality rendering results. This engineering design guarantees the consistency and stability of target vector extraction, a crucial prerequisite for the convergence of the MSE alignment loss during training.

[0054] Furthermore, by employing a two-stage training strategy (i.e., the training stage in this embodiment and the training stage utilizing NTP+MSE dual loss) deeply adapted to the characteristics of the reordering task, the first stage of training establishes list-level document analysis capabilities, while the second stage of training utilizes visual supervision (NTP+MSE dual loss) to compress the inference chain into a single latent lexical. This division of labor in the two-stage training effectively avoids the training collapse problem that occurs when directly skipping the CoT stage for latent compression.

[0055] Furthermore, using the given query text with a large cumulative gain after normalization loss as a self-consistency quality control for the training data ensures that the inference chain used for visual object extraction corresponds to a high-quality ranking result. This means the inference chain is intrinsically consistent with the corresponding correct ranking label, providing a high-quality source of supervision for visual object extraction. This filtering mechanism directly affects the quality of the visual supervision signal and is a crucial factor in achieving competitive ranking accuracy on inference-intensive benchmarks.

[0056] The following will describe in detail, with reference to the accompanying drawings, an enhanced method and apparatus for reordering models according to exemplary embodiments of the present disclosure, and a query method and apparatus.

[0057] Figure 1This is a flowchart illustrating an enhancement method for a reordering model according to exemplary embodiments of the present disclosure, such as... Figure 1 As shown, the enhancement method for the reordering model includes the following steps: In step S101, a training dataset is obtained, which includes multiple query texts, candidate documents corresponding to each query text, real inference chains, and real ranking results.

[0058] In step S102, for each query text in the training dataset, the real inference chain corresponding to the query text is rendered as a target image, and based on the target image, the hidden state corresponding to the last word of the large language model is obtained using a visual encoder and a large language model, which is used as the target vector of the query text.

[0059] In step S103, for each query text among multiple query texts, the following processing is performed: input the query text and the candidate documents corresponding to the query text into the re-ranking model to obtain the estimated latent information and the first estimated ranking result corresponding to the query text, wherein the estimated latent information is the low-dimensional feature corresponding to the estimated inference chain of the query text; determine the next word prediction loss based on the first estimated ranking result and the actual ranking result corresponding to the query text; determine the alignment loss corresponding to the query text based on the estimated latent information and the target vector.

[0060] In step S104, the parameters of the reordering model are adjusted by minimizing the next word prediction loss and alignment loss, and the reordering model is trained to obtain an enhanced reordering model.

[0061] As an example, the candidate documents corresponding to each query text in the above training dataset can be represented by a list of candidate documents, and this disclosure does not limit this.

[0062] As an example, the alignment loss described above can employ latent information and mean squared error (MSE) of the target vector, which is not limited in this disclosure; the alignment loss injects the visual encoder’s understanding of the inference chain into the latent information, while the next lexical prediction loss ensures that the compressed latent representation still supports the correct ordering output.

[0063] As an example, the aforementioned large language model can be any model capable of extracting information from the visual information output by the visual encoder, such as a large language model that can output corresponding text answers for query text, and this disclosure does not limit it.

[0064] As an example, let's assume the rendered image is represented as follows: IThe hidden state at the last position is then input into a frozen visual encoder stack (such as SAM-ViT-B+CLIP-L) and forward propagation of the LLM backbone to extract the target vector of the latent information corresponding to the latent lexical. :

[0065] in, This represents the feature extraction and projection process of a visual encoder. This represents the hidden state of the LLM backbone at the last position. Target vector. v It can be pre-computed and cached as a file, and only loaded and used during the training phase; it is not needed during inference.

[0066] This cross-modal compression process has a natural information bottleneck effect: variable-length inference chain text (600-1200 words) → fixed-size image (1024×1024 pixels) → single vector ( Each step forces compression of the representation, while discarding linguistic surface variations (such as wording differences and format changes) in the reasoning chain, while retaining the core semantic information.

[0067] As an example, the visual encoder described above can also employ other visual encoders with strong optical character recognition (OCR) / text recognition capabilities. This disclosure does not limit this; for example, other visual encoders may include, but are not limited to, the following: InternViT series: The visual encoder used in InternVL2 has a stronger ability to understand Chinese text images; Qwen-VL visual encoder: has higher architectural affinity with the Qwen2.5 series LLM backbone; GOT-OCR visual encoder: Optimized for optical character recognition, providing higher encoding quality for complex formatted inference text.

[0068] It should be noted that when changing the visual encoder, the pre-computation steps of the target vector need to be updated accordingly, but the training framework and the two-stage strategy remain unchanged.

[0069] According to an exemplary embodiment of this disclosure, step S103 above, which involves inputting the query text and the candidate documents corresponding to the query text into a re-ranking model to obtain the estimated potential information and the first estimated ranking result corresponding to the query text, may include: constructing a first input sequence for the query text, wherein the first input sequence includes the query text, the candidate documents corresponding to the query text, a predetermined number of start words, a predetermined number of potential words, a predetermined number of end words, and a ranking result, wherein the predetermined number is less than a preset value; inputting the first input sequence into the re-ranking model to obtain the estimated potential information and the first estimated ranking result corresponding to the query text, wherein for each layer in the re-ranking model, the potential information corresponding to the start words adopts the hidden state corresponding to the end words in the previous layer, the potential information corresponding to the potential words adopts the hidden state corresponding to the start words, the potential information corresponding to the end words adopts the hidden state corresponding to the potential words, and the estimated potential information is the potential information corresponding to the potential words in the last layer of the re-ranking model.

[0070] This embodiment utilizes a smaller (e.g., a predetermined number of lexical units) design. This smaller lexical unit design not only achieves maximum inference compression but also provides a fixed-latency budget guarantee for inference services in industrial deployments. Furthermore, the target vector exhibits stable alignment characteristics under the constraint of a predetermined number of lexical units, thereby achieving efficient inference-enhanced reordering.

[0071] As an example, the above preset result can be set as needed, but it should be relatively small, for example, it can be set to 1, and this disclosure does not limit it in this regard.

[0072] For example, taking a predetermined quantity of 1 as an example, the first input sequence of the system can be as follows:

[0073] Where <|begin-latent|> represents the start term, <|latent|> represents the latent term, and <|end-latent|> represents the end term. The sorting result represents the model's predicted output.

[0074] As an example, the input sequence structure can be pre-set, for example, for the input query text. and the corresponding list of candidate documents The following input sequence structure containing latent word slots can be designed:

[0075] Among them, special lexical units <|begin-latent|>, <|latent|>, and <|end-latent|> are added to the vocabulary, and the word embeddings of these lexical units are initialized as the mean embedding of the vocabulary.

[0076] It should be noted that this embodiment uses one latent word to correspond to latent information, that is, a single latent word replaces the complete inference chain. Moreover, this embodiment designs a special system prompt word for the re-ranking scenario, requiring the model to directly output the document ranking result after the slot of a single latent word, while covering all candidate documents through a sliding sorting strategy of candidate document windows (e.g., Window Size=20, StepSize=10).

[0077] As an example, this embodiment also introduces a continuous filling mechanism, that is, at the potential word position... Embed the input at this position Replace with the hidden state of the previous position :

[0078] in, Representation model, This indicates all embeddings preceding this position. This indicates the hidden state of this location.

[0079] This mechanism remains consistent throughout the training and inference phases, enabling the model to achieve a continuous "implicit thinking" process through the recursive propagation of its own hidden states. The hidden states marked with <|begin-latent|> are trained to align with the target vector, carrying compressed, reordered inference information.

[0080] It should be noted that the design principles for fixing the length of potential lexical units can be, but are not limited to, the following: Information bottleneck constraint: Word elements strictly constrain representation capacity, forcing the model to retain only the information that is sufficient and necessary for ranking decisions; Target-slot bijection: Each training sample generates a target vector that corresponds one-to-one with the slot of a single latent word, making the MSE alignment loss unambiguous; Deterministic interface: Fixed latent lexical length ensures consistent computational cost for each sample, simplifies batch processing, and eliminates the engineering complexity caused by the number of dynamic lexical units.

[0081] As an example, the next word prediction loss and alignment loss in step S102 are explained based on this. In this embodiment, a single latent word is used to replace the complete inference chain as an example: 1) Next term prediction loss:

[0082] in, This indicates the first predicted ranking result, where t represents the word sequence number in the model output. This represents the t-th word in the model output. This represents the first t-1 words in the model output. Indicates in Under the conditions, it appears The probability of.

[0083] 2) Alignment loss, such as MSE, can be used to drive the hidden state (i.e., the embedding of latent words) at the <|begin-latent|> position towards the pre-computed target vector. Approach:

[0084] in, This represents the hidden state (i.e., the embedding of the latent lexical) at the position <|begin-latent|>. This represents the target vector.

[0085] The total loss is: , It can be set as needed, such as being set to 1, but this disclosure does not limit it.

[0086] As an example, the above single potential word element ( This can be extended to a small number of multi-lexical designs. At this point, richer supervision signals can be provided by extracting multiple visual hidden state target vectors:

[0087] in, This represents the feature extraction and projection process of the visual encoder, where N is the number of latent words and k represents the sequence number of the latent words. This represents the target vector corresponding to the k-th potential word.

[0088] Then, an independent MSE alignment loss is applied to the position of each potential lexical. This small-scale multi-lexical scheme offers a more flexible trade-off between accuracy and efficiency, but it increases output lexical consumption and introduces additional design complexity for target-slot assignment.

[0089] According to an exemplary embodiment of this disclosure, obtaining the training dataset in step S101 above may include: pre-acquiring multiple given query texts, candidate documents corresponding to each given query text, and a real inference chain; obtaining the normalized depreciation cumulative gain of each given query text based on the real inference chain; and selecting given query texts from the multiple given query texts whose normalized depreciation cumulative gain is greater than or equal to a preset value as query texts in the training dataset.

[0090] In this embodiment, a given query text with a large cumulative gain after normalization loss is used as a self-consistent quality control for the training data, ensuring that the inference chain used for visual object extraction corresponds to high-quality ranking results. This filtering mechanism directly affects the quality of the visual supervision signal and is a crucial factor in achieving competitive ranking accuracy on inference-intensive benchmarks.

[0091] As an example, the normalized cumulative gain can be NDCG@10. The preset value can be set as needed, such as 0.4. This disclosure does not limit this.

[0092] As an example, a training dataset containing query text-candidate document list-inference chain triples can be constructed based on inference-intensive retrieval benchmarks such as BRIGHT. Specifically, given query text... and candidate document list High-quality list-level reasoning chains can be generated using strong reasoning reordering models such as ReasonRank-7B / 32B. For example, they can be represented as follows:

[0093] The above list-level inference chain R It can include a complete reasoning process for each candidate document, including relevance analysis, inter-document comparison, and final ranking decision, with an average length of 600-1200 tokens.

[0094] To ensure the quality of training data, self-consistency filtering can be used: this involves calculating the list-level inference chain. R The final ranking NDCG@10 index retains only high-quality samples with NDCG@10 ≥ 0.4, ensuring the intrinsic consistency between the inference chain in the training data and the pre-labeled ranking labels.

[0095] It should be noted that this disclosure, based on BRIGHT's 12 domains (economics, earth science, robotics, biology, psychology, Stack Overflow, sustainable living, LeetCode, Pony Math, competitive mathematics, theorem QA problems, and theorem QA theorems), enhances the model's generalization ability for reasoning-intensive queries in different professional fields through cross-domain data mixing enhancement.

[0096] According to an exemplary embodiment of this disclosure, the step S102 above, which renders the real inference chain corresponding to the query text as a target image, includes: searching in order from large to small fonts within a preset font size range to determine the largest font that can fit the real inference chain within a preset size, wherein the preset size is a size pre-set for the target image; and rendering the real inference chain corresponding to the query text as a target image of the preset size according to the largest font.

[0097] In this embodiment, adaptive font size search ensures that the inference chain is fully presented within a fixed canvas. Furthermore, the text-to-image rendering of the inference chain in this embodiment achieves a deterministic mapping from variable-length text to a fixed-size visual representation, providing stable input for subsequent visual encoding.

[0098] As an example, the aforementioned preset size can be set as needed, for example, it can be set to 1024×1024 pixels, and this disclosure does not limit this. The aforementioned preset font size range can be set as needed, and this disclosure does not limit this. The aforementioned preset threshold can be set as needed, and this disclosure does not limit this.

[0099] As an example, the inference chain for each query text R Render it as a fixed-size image I The rendering process can employ the following deterministic algorithm to ensure consistency across samples: Canvas size: Fixed W × H =1024×1024 pixels, white background with black text, monospaced font (Courier New). Inner margin: P =20 Pixels: DPI=100; Adaptive font size search: within a font size range Search for the largest font that satisfies the height constraint, from largest to smallest. Estimated maximum number of characters per line: ; Number of lines of text: ; Height constraints: ; As an example, for specific domains (such as mathematical formula-intensive competitive mathematics or code snippet-intensive LeetCode), the above text rendering configuration can be replaced in, but is not limited to, the following ways: For inference chains containing LaTeX formulas, the formulas are pre-rendered as embedded images and then laid out as a whole. For inference chains containing code, use a code-highlighted font (such as Fira Code) instead of a monospaced font; For extremely long inference chains, a summary rendering approach (rendering only key inference nodes) is used to reduce the information density of a single graph.

[0100] According to an exemplary embodiment of this disclosure, after rendering the real inference chain corresponding to the query text into a target image of a preset size by the largest font, the parameters of the target image can be adjusted in response to the confidence level of the target image being less than a preset threshold until the confidence level of the target image exceeds the preset threshold.

[0101] In this embodiment, the comparison between confidence level and preset threshold ensures automatic correction and re-rendering of low-quality rendering results. This engineering design guarantees the consistency and stability of target vector extraction, which is an important prerequisite for the convergence of MSE alignment loss during training.

[0102] As an example, low-confidence rendering results can be automatically re-rendered after adjusting DPI and inner margins through OCR quality inspection (including VLM quality gating). For instance, if low confidence is detected, DPI can be increased and page margins can be adjusted adaptively, or no adjustment is required; this disclosure does not limit this. It should be noted that OCR quality inspection includes calculating confidence, comparing confidence with a preset threshold, and adjustment operations; this disclosure does not limit this. Furthermore, a Vision-Language Model (VLM) can be used as a quality gating to compare confidence with a preset threshold; this disclosure does not limit this either.

[0103] The following is combined with Figure 2 The system explains the preparation process of the above training dataset and target vector, such as... Figure 2 As shown, the preparation process includes the following steps: 1) Generate reasoning chains In this step, multiple given query texts and corresponding candidate documents for each given query text are first obtained. Then, for each given query text, the given query text and the corresponding candidate documents are input into the reordering teacher model to obtain an inference chain containing the ranking results of the candidate documents for the given query text.

[0104] It should be noted that the aforementioned reordering teacher model can be a strong reasoning large language model, such as ReasonRank-7B / 32B, as long as it can output a relatively accurate reasoning chain containing the ranking result. This disclosure does not impose any restrictions on this.

[0105] 2) Quality filtration First calculate the inference chain R The NDCG@10 index of the sorting results is used to retain only high-quality samples with NDCG@10≥0.4, ensuring the intrinsic consistency between the inference chain in the training data and the pre-labeled sorting labels.

[0106] Then, based on the filtered given query text, a training dataset containing query text-candidate document list-inference chain triples is constructed.

[0107] 3) Deterministic rendering Each inference chain in the training dataset is rendered as a 1024×1024 pixel image. I It converts the reasoning chain of the text structure into an image of a two-dimensional spatial layout, preserving information such as layout, numbering, and hierarchy.

[0108] 4) Visual encoding Image I The frozen visual encoder stack (such as SAM-ViT-B+CLIP-L) is input, and the obtained visual features are concatenated and projected. Then, the LLM backbone is input for forward propagation to extract the hidden state at the last position (i.e., the last word) as the target vector of the latent information corresponding to the latent word. v .

[0109] It should be noted that SAM-ViT-B can be used to extract information such as structure, layout, and characters, while CLIP-L is used to extract information such as semantics and cross-modal alignment. This disclosure does not limit the scope of this information.

[0110] According to an exemplary embodiment of this disclosure, the re-ranking model in steps S102 and S103 above can be obtained in advance by: for each query text among multiple query texts, performing the following processing: constructing a second input sequence for the query text, wherein the second input sequence includes the query text, the candidate document corresponding to the query text, the start term, the inference chain, and the end term; inputting the second input sequence into the initial re-ranking model to obtain the estimated inference chain and the second estimated ranking result corresponding to the query text; determining the next term prediction loss based on the estimated inference chain, the second estimated ranking result, the true inference chain, and the true ranking result; adjusting the parameters of the initial re-ranking model by minimizing the next term prediction loss, and training the initial re-ranking model to obtain the re-ranking model.

[0111] This embodiment introduces an enhanced method for acquiring the reordering model. Specifically, it employs a two-stage training strategy (the training stage in this embodiment and the NTP+MSE dual-loss training stage) deeply adapted to the characteristics of the reordering task. The first stage of training establishes list-level document analysis capabilities, while the second stage utilizes visual supervision (NTP+MSE dual loss) to compress the inference chain into single latent terms. This division of labor in the two-stage training effectively avoids the training collapse problem that occurs when directly skipping the CoT stage for latent compression.

[0112] As an example, the backbone of the above initial reordering model can be a Transformer×N + Language Model Head (LM head), for example, it can include a self-attention layer + Feed-Forward Network (FFN), and can also include a causal mask, which is not limited in this disclosure.

[0113] It should be noted that the method disclosed herein is independent of a specific LLM backbone and can be adapted to various visual language model backbones of different sizes. For example, it can be adapted to, but is not limited to, the following backbones: Qwen2.5-VL-7B: A larger number of parameters provides stronger reordering capabilities; Qwen3-VL-4B: Fewer parameters, higher inference efficiency; InternVL2-8B: Possesses a powerful foundation in visual understanding, which can improve the quality of target vectors.

[0114] As an example, the training phase in this embodiment can be regarded as the first training phase, which can adopt explicit CoT cold start, and its system input sequence can be constructed as follows:

[0115] Where <|begin-latent|> represents the beginning word and <|end-latent|> represents the end word. R The predicted output-inference chain represents the model's output, while the ranking result represents the predicted output-ranking result.

[0116] It should be noted that the reasoning chain R The sorting results are only input into the system to determine the next word prediction loss. There is no need to input the initial re-sorting model. In other words, the above input sequence is the second input sequence after removing the inference chain R and the sorting results.

[0117] The complete inference chain is used in this training phase. R As the training objective, a standard next-order term prediction loss is applied to the inference chain terms and the ranking result terms. This loss can be as follows:

[0118] in, This indicates the second estimated ranking result. This represents the prediction inference chain, where t represents the lexical index of the model output. This represents the t-th word in the model output. This represents the first t-1 words in the model output. Indicates in Under the conditions, it appears The probability of.

[0119] The purpose of this training phase is to establish basic reordering reasoning capabilities, enabling the model to learn how to analyze document relevance and output effective rankings, providing a solid starting point for potential compression in the future.

[0120] Therefore, the losses in the two training phases can be summarized as follows:

[0121] As an example, after the two-stage training is completed, a third stage of reinforcement learning (RL) based on ranking rewards can be introduced, and this disclosure does not limit this to that. Specifically, algorithms such as GRPO are used, with ranking metrics such as NDCG@10 as reward signals, to perform online policy optimization on the augmented re-ranking model obtained after the two-stage training, further improving the quality of latent lexical-driven ranking decisions. The reward function can be designed as follows:

[0122] in, y The sorting results output by the model. For the set of relevant candidate documents labeled, b Baseline bonus within the group (GRPO baseline).

[0123] Figure 3 This is a flowchart illustrating a query method according to exemplary embodiments of the present disclosure, such as... Figure 3 As shown, the query method includes the following steps: In step S301, the text to be queried and the candidate documents corresponding to the text to be queried are input into the enhanced re-ranking model to obtain the ranking result of the candidate documents; In step S302, based on the ranking results, the candidate documents most relevant to the text to be queried are determined; wherein, the enhanced re-ranking model is obtained through any of the above enhancement methods.

[0124] According to an exemplary embodiment of this disclosure, step S301 above, which involves inputting the text to be queried and the candidate documents corresponding to the text to be queried into an enhanced re-ranking model to obtain the ranking result of the candidate documents, may include: constructing a first input sequence for the text to be queried, wherein the first input sequence includes the text to be queried, the candidate documents corresponding to the text to be queried, a predetermined number of start words, a predetermined number of potential words, a predetermined number of end words, and the ranking result, wherein the predetermined number is less than a preset value; inputting the first input sequence into the enhanced re-ranking model to obtain the estimated potential information and the ranking result corresponding to the text to be queried, wherein for each layer in the enhanced re-ranking model, the potential information corresponding to the start words adopts the hidden state corresponding to the end words in the previous layer, the potential information corresponding to the potential words adopts the hidden state corresponding to the start words, the potential information corresponding to the end words adopts the hidden state corresponding to the potential words, and the estimated potential information is the potential information corresponding to the potential words in the last layer of the enhanced re-ranking model.

[0125] As an example, the complete process of the trained augmented reordering model during actual inference (i.e., application to real query scenarios) can include the following parts: Construction of the input sequence: The text to be queried A list of candidate documents corresponding to the text to be queried Concatenate the strings, adding tokens such as <|begin-latent|, <|latent|, and <|end-latent|> at the end, without inputting any images; Enhance implicit reasoning within the reordering model: The model performs a continuous padding mechanism at the <|latent|> position, recursively compressing the contextual information of the prefix (query + document) into latent information through the hidden state; Enhance the internal ranking generation of the re-ranking model: starting from the <|end-latent|> position, autoregression generates the final ranking result (e.g., [3]>[1]>[2]>...); Output parsing: Parse the sorting results output by the model, rearrange the candidate document list in order, and return the rearranged ordered document list.

[0126] It should be noted that the number of lexical units output during the reasoning process in this embodiment only includes the number of lexical units corresponding to the potential information. The number of lexical units corresponding to the sorting results That is, the number of output tokens ,in, That is, the number of identifier tokens in the sorting result (approximately 20-40). That is, the number of latent tokens. It is evident that the total output is far lower than the hundreds to thousands of tokens required by explicit inference methods. The time complexity analysis is also significantly reduced; for example, the cost of autoregressive decoding can be expressed as Output Token Contribution (OTC). For the method disclosed in this paper, the OTC can be represented as... Compared to the explicit CoT method The reasoning cost is significantly reduced, where T represents the input. and The time, R represents the number of lexical units corresponding to the reasoning chain and .

[0127] In addition, offline preprocessing steps such as visual encoding do not affect inference performance.

[0128] The following is combined with Figure 4 The system explains the two training phases and the inference phase mentioned above, such as... Figure 4 As shown, the overall process may include the following: 1) First training phase This stage can be used for CoT cold start, and its system input sequence can be as follows:

[0129] Where <|begin-latent|> represents the beginning word (i.e. Figure 4 middle <bol><|end-latent|> indicates the end of a word (i.e., ... Figure 4 middle <eol>), R The predicted output-inference chain represents the model's output, while the ranking result represents the predicted output-ranking result.

[0130] For multiple Each ,Will Input the initial reordering model (Transformer×N+LM head) to obtain the corresponding predicted inference chain and predicted ranking results.

[0131] Then, use the real inference chain. R Using the actual ranking results as training targets, the next word prediction loss is calculated by combining the predicted inference chain and the predicted ranking results. The parameters of the initial re-ranking model are adjusted using this loss to obtain the re-ranking model.

[0132] It should be noted that all weight parameters of the model at this stage All of them are trainable.

[0133] 2) Second training phase This stage is the visual latent alignment stage, and its system input sequence can be as follows:

[0134] Where <|begin-latent|> represents the beginning word (i.e. Figure 4 middle <bol>), Indicates latent lexical units (i.e.) Figure 4 middle <lat><|end-latent|> indicates the end word (i.e. Figure 4 middle <eol>), R This represents the true inference chain, and the sorting result represents the true sorting result.

[0135] For multiple Each ,Will Input the re-ranking model (Transformer×N+LM head, where the initial weight parameters are the same as those trained in the first stage) to obtain the corresponding latent information and predicted ranking results.

[0136] Then, using the pre-obtained target vector and the true ranking result as training objectives, and combining the aforementioned latent information and the estimated ranking result, the next word prediction loss is calculated. and alignment loss By adjusting the parameters of the re-ranking model using these two losses, an enhanced re-ranking model is obtained.

[0137] It should be noted that all weight parameters of the model at this stage All of them are trainable.

[0138] 3) Reasoning stage This stage is the actual query stage, and its system input sequence can be as follows:

[0139] Where <|begin-latent|> represents the beginning word (i.e. Figure 4 middle <bol>), Indicates latent lexical units (i.e.) Figure 4 middle <lat><|end-latent|> indicates the end word (i.e. Figure 4 middle <eol>The ranking result represents the model's predicted output - the ranking result.

[0140] Will Input the augmented re-ranking model (Transformer×N+LM head, where the weight parameters are the same as those trained in the second stage) to obtain the corresponding latent information and ranking results.

[0141] It should be noted that potential information does not need to be shown to the user, so Figure 4 This only displays the sorting results. During the actual reasoning process, the user only needs to input... Corresponding It exists as a system prompt word.

[0142] Figure 5 The system architecture, from offline data preparation to two-stage training and then to inference deployment, is demonstrated, such as... Figure 5 As shown, the system architecture is divided into three main modules: offline data preparation module, two-stage training module, and inference deployment module.

[0143] Offline data preparation module: Based on multiple given query texts and corresponding candidate documents for each given query text in the BRIGHT dataset, and a strong inference re-ranking model, it obtains the inference chain of the ranking results including candidate documents for each given query text. R Then, calculate the inference chain. R The NDCG@10 metric of the reordered training data is used to retain only high-quality samples with NDCG@10 ≥ 0.4, ensuring the intrinsic consistency between the inference chain in the training data and the pre-labeled ranking labels. Then, the inference chain text in the reordered training data is rendered as a fixed-size image. I Then, the hidden state is extracted using a frozen visual encoder and LLM as the target vector, which serves as the supervision signal for the user's subsequent training phase.

[0144] The two-stage training module trains the model in stages, sequentially going through the explicit CoT cold start stage and the visual latent alignment stage, gradually internalizing the reordering reasoning ability into individual latent lexical units. It should be noted that the CoT cold start stage and the visual latent alignment stage have been discussed in detail above and will not be elaborated upon here.

[0145] The inference deployment module uses only a slot for a single latent lexical unit during inference, without generating any explicit inference text. The output is solely the ranking result, enabling efficient online service. Specifically, users only need to input the query text and the corresponding candidate documents. The system then generates an input sequence based on the user input, and uses this input sequence and a model trained in a two-stage training phase to obtain the ranking result.

[0146] This embodiment provides an efficient reasoning-enhanced paragraph reordering method based on visual latent representation compression. Its core idea is to compress the list-level reordering reasoning process (reasoning chain) into a single latent word through cross-modal visual supervision. During reasoning, only the latent word and the final sorting result are output, thereby achieving extreme compression and efficient deployment of reasoning capabilities.

[0147] The embodiments of this disclosure at least solve the following technical problems: 1) How to significantly reduce the output lexical consumption during inference while maintaining the high-precision sorting capability of the inference-enhanced reorderer: Achieve Pareto optimal balance between inference capability and computational efficiency, so that the output lexical consumption of the model is close to the level of the zero-sample method (about 90-111 lexicals), while maintaining the sorting accuracy close to that of the full inference method.

[0148] 2) How to provide high-quality external structured supervision signals for individual latent lexical units: avoid the representation degradation problem caused by relying solely on answer consistency loss, and provide stable and verifiable alignment targets for latent lexical unit compression through cross-modal visual supervision.

[0149] 3) How to effectively transfer inference chain compression technology to paragraph reordering scenarios: Design a potential representation data preparation process and training strategy adapted to the reordering task so that the model can internalize the complex document relevance inference process into a single continuous vector.

[0150] 4) How to establish a reproducible and stable visual latent lexical training paradigm: Through deterministic rendering algorithms and three-stage course training, the stability of the visual target extraction process and the consistency across samples are guaranteed.

[0151] The embodiments disclosed herein provide at least the following effects: 1) Reasoning efficiency is greatly improved The output lexical consumption of this disclosure is reduced by approximately 6.8 times compared to ReasonRank-7B, by approximately 10 times compared to ReasonRank-32B, and by approximately 28 times compared to Rank-K-32B, approaching the inference efficiency level of zero-shot methods. At the same time, the ranking accuracy is significantly better than all zero-shot methods, as shown in Table 1 below.

[0152] Table 1. Comparison of the number of output tokens (BRIGHT benchmark, window size 20):

[0153] 2) Reasoning accuracy remains competitive in key areas. On multiple professional domain datasets, the LatentRerank method disclosed herein maintains competitive ranking accuracy with extremely low inference cost: Economics: NDCG@10=32.65, surpassing the zero-sample baseline with the same number of parameters by only 94.8 tokens; Earth Sciences: NDCG@10=43.00, surpassing Rank-K-32B (3159.7 tokens) by 86 tokens. LeetCode: NDCG@10=31.68, achieving the highest ranking among all methods with 217.7 tokens; Stack Overflow: NDCG@10=30.96, which is close to ReasonRank-7B (663.3 tokens) with 147.8 tokens. Theorem QA problem: NDCG@10=33.93, surpasses all zero-sample and pointwise methods with fewer than 14 bytes of parameters; Theorem QA Theorem: NDCG@10=36.68, surpassing Rank-K-32B (30.58) and all models below 7B.

[0154] 3) Establish efficiency-accuracy Pareto optimality In the efficiency-accuracy two-dimensional coordinate system, the LatentRerank disclosed herein is at the Pareto front: with a similar output lexical budget (approximately 100-120 lexicals), its ranking accuracy is higher than all zero-shot methods and traditional lightweight list reordering methods; with a similar level of ranking accuracy (NDCG@10≈30-31), its inference cost is far lower than all inference-enhanced methods.

[0155] 4) Cross-modal visual supervision improves the quality of word meta-representation Compared with text spatial supervision, cross-modal visual supervision in this disclosure has the following advantages: Natural information bottleneck: The two-level compression link of text → image → vector naturally discards language surface variations, retains semantic core, and provides a lower variance alignment target for word meta-compression; Decoupling is achieved by visual pre-training of the visual encoder (SAM-ViT-B + CLIP-L), whose hidden state is decoupled from the LLM autoregressive prior, thus avoiding the collapse of latent lexical units toward low-information language biases. Spatial invariance: The rendered image presents the text in a consistent left-to-right layout, unaffected by inference chain length and positional encoding, generating a more stable MSE training signal across samples.

[0156] 5) Advantages of lightweight deployment The LatentRerank disclosed herein is based on a backbone model with approximately 3B parameters and incorporates a word meta-inference design. It can achieve high-throughput online reordering services on a single GPU (such as an A100 80GB) without the need for multi-GPU deployment, significantly reducing the hardware cost of industrial deployments.

[0157] Figure 6 This is a block diagram illustrating an enhancement device for a reordering model according to exemplary embodiments of the present disclosure. (Refer to...) Figure 6 The device includes: The first acquisition unit 60 is configured to acquire a training dataset, which includes multiple query texts, candidate documents corresponding to each query text, a true inference chain, and a true ranking result. The second acquisition unit 62 is configured to, for each query text in the training dataset, render the true inference chain corresponding to the query text as a target image, and based on the target image, use a visual encoder and a large language model to obtain the hidden state corresponding to the last word of the output of the large language model as the target vector of the query text. The processing unit 64 is configured to, for each query text in the training dataset, perform the following processing: input the query text and the candidate documents corresponding to the query text into the re-ranking model to obtain the estimated latent information and the first estimated ranking result corresponding to the query text, wherein the estimated latent information is the low-dimensional feature corresponding to the estimated inference chain of the query text; determine the next word prediction loss based on the first estimated ranking result and the true ranking result corresponding to the query text; determine the alignment loss corresponding to the query text based on the estimated latent information and the target vector; and the adjustment unit 66 is configured to adjust the parameters of the re-ranking model by minimizing the next word prediction loss and the alignment loss, and train the re-ranking model to obtain an enhanced re-ranking model.

[0158] According to an exemplary embodiment of this disclosure, the processing unit 64 is further configured to construct a first input sequence for the query text, wherein the first input sequence includes the query text, candidate documents corresponding to the query text, a predetermined number of start words, a predetermined number of potential words, and a predetermined number of end words, the predetermined number being less than a preset value; the first input sequence is input into a re-ranking model to obtain estimated potential information corresponding to the query text and a first estimated ranking result, wherein for each layer in the re-ranking model, the potential information corresponding to the start words adopts the hidden state corresponding to the end words in the previous layer, the potential information corresponding to the potential words adopts the hidden state corresponding to the start words, the potential information corresponding to the end words adopts the hidden state corresponding to the potential words, and the estimated potential information is the potential information corresponding to the potential words in the last layer of the re-ranking model.

[0159] According to an exemplary embodiment of this disclosure, the second acquisition unit 62 is further configured to search in order from large to small fonts within a preset font size range to determine the largest font that can accommodate the real inference chain within a preset size, wherein the preset size is a size pre-set for the target image; and to render the real inference chain corresponding to the query text as a target image of the preset size according to the largest font.

[0160] The second acquisition unit 62 is also configured to, after rendering the real inference chain corresponding to the query text into a target image of a preset size by the maximum font, adjust the parameters of the target image until the confidence of the target image exceeds the preset threshold in response to the target image's confidence being less than a preset threshold.

[0161] According to an exemplary embodiment of this disclosure, the first acquisition unit 60 is further configured to pre-acquire a plurality of given query texts, candidate documents corresponding to each given query text, and a real inference chain; obtain the normalized depreciation cumulative gain of each given query text based on the real inference chain; and select given query texts from the plurality of given query texts whose normalized depreciation cumulative gain is greater than or equal to a preset value as query texts in the training dataset.

[0162] According to an exemplary embodiment of this disclosure, the re-ranking model is pre-obtained by: for each query text among multiple query texts, performing the following processing: constructing a second input sequence for the query text, wherein the second input sequence includes the query text, the candidate document corresponding to the query text, the start term, the inference chain, and the end term; inputting the second input sequence into an initial re-ranking model to obtain the estimated inference chain and the second estimated ranking result corresponding to the query text; determining the next term prediction loss based on the estimated inference chain, the second estimated ranking result, the true inference chain, and the true ranking result; adjusting the parameters of the initial re-ranking model by minimizing the next term prediction loss, and training the initial re-ranking model to obtain the re-ranking model.

[0163] Figure 7 This is a block diagram illustrating a query device according to exemplary embodiments of the present disclosure. (Refer to...) Figure 7 The device includes: The third acquisition unit 70 is configured to input the text to be queried and the candidate documents corresponding to the text to be queried into the enhanced re-ranking model to obtain the ranking result of the candidate documents; the determination unit 72 is configured to determine the candidate document most relevant to the query text based on the ranking result; wherein, the enhanced re-ranking model is obtained through any of the above enhancement methods.

[0164] According to an exemplary embodiment of this disclosure, the third acquisition unit 70 is further configured to construct a first input sequence for the query text, wherein the first input sequence includes the query text, candidate documents corresponding to the query text, a predetermined number of start words, a predetermined number of potential words, a predetermined number of end words, and a ranking result, wherein the predetermined number is less than a preset value; the first input sequence is input into an enhanced re-ranking model to obtain the estimated potential information and ranking result corresponding to the query text, wherein for each layer in the enhanced re-ranking model, the potential information corresponding to the start words adopts the hidden state corresponding to the end words in the previous layer, the potential information corresponding to the potential words adopts the hidden state corresponding to the start words, the potential information corresponding to the end words adopts the hidden state corresponding to the potential words, and the estimated potential information is the potential information corresponding to the potential words in the last layer of the enhanced re-ranking model.

[0165] Figure 8 A computing environment 810 coupled to a user interface 850 is shown. The computing environment 810 may be part of a data processing server. The computing environment 810 includes a processor 820, memory 830, and input / output (I / O) interface 840.

[0166] Processor 820 typically controls the overall operation of computing environment 810, such as operations associated with display, data acquisition, data communication, and image processing. Processor 820 may include one or more processors for executing instructions to perform all or some of the steps in the methods described above. Furthermore, processor 820 may include one or more modules that facilitate interaction between processor 820 and other components. The processor may be a central processing unit (CPU), microprocessor, microcontroller, graphics processing unit (GPU), etc.

[0167] Memory 830 is configured to store various types of data to support the operation of computing environment 810. Memory 830 may include predefined software 832. Examples of such data include instructions for any application or method operating on computing environment 810, video datasets, image data, etc. Memory 830 can be implemented using any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0168] I / O interface 840 provides an interface between processor 820 and peripheral interface modules (such as keyboard, click wheel, buttons, etc.). Buttons may include, but are not limited to, a home button, a start scan button, and a stop scan button. I / O interface 840 can be coupled to encoders and decoders.

[0169] In an embodiment, the computing environment 810 may be implemented by one or more ASICs, DSPs, digital signal processing devices (DSPDs), programmable logic devices (PLDs), FPGAs, GPUs, controllers, microcontrollers, microprocessors, or other electronic components for performing the methods described above.

[0170] According to embodiments of the present disclosure, an electronic device may be provided, the electronic device including at least one memory and at least one processor, the at least one memory storing a set of computer-executable instructions, which, when executed by the at least one processor, execute an enhancement method and / or a query method of a reordering model according to embodiments of the present disclosure.

[0171] As an example, the electronic device can be a PC, tablet, personal digital assistant, smartphone, or other device capable of executing the aforementioned set of instructions. Here, the electronic device 1000 is not necessarily a single electronic device, but can be any collection of devices or circuits capable of executing the aforementioned instructions (or instruction sets) individually or in combination. The electronic device can also be part of an integrated control system or system manager, or can be configured to interconnect with a portable electronic device locally or remotely (e.g., via wireless transmission) through an interface.

[0172] In addition, electronic devices may include video displays (such as liquid crystal displays) and user interaction interfaces (such as keyboards, mice, touch input devices, etc.). All components of the electronic device may be interconnected via buses and / or networks.

[0173] According to embodiments of this disclosure, a computer-readable storage medium may also be provided, wherein when instructions in the computer-readable storage medium are executed by at least one processor, the at least one processor causes to perform the enhanced method and / or query method of the reordering model of embodiments of this disclosure. Examples of computer-readable storage media herein include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disc storage, hard disk drive (HDD), solid-state drive (SSD), card storage (such as multimedia cards, secure digital (SD) cards, or ultra-fast digital (XD) cards), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid-state drive, and any other device configured to store a computer program and any associated data, data files, and data structures in a non-transitory manner and to provide the computer program and any associated data, data files, and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the aforementioned computer-readable storage medium can run in an environment deployed in computer devices such as clients, hosts, agent devices, servers, etc. Furthermore, in one example, the computer program and any associated data, data files, and data structures are distributed across a networked computer system, such that the computer program and any associated data, data files, and data structures are stored, accessed, and executed in a distributed manner through one or more processors or computers.

[0174] According to embodiments of this disclosure, a computer program product is provided, including computer instructions that, when executed by a processor, implement the enhanced method and / or query method of the reordering model as described above.

[0175] Unless otherwise specifically stated, the order of steps in the method according to this disclosure is intended to be illustrative only, and the steps of the method according to this disclosure are not limited to the specific order described above, but may be changed according to actual circumstances. Furthermore, at least one step in the method according to this disclosure may be adjusted, combined, or omitted as needed.

[0176] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the appended claims.

[0177] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.< / eol> < / lat> < / bol> < / eol> < / lat> < / bol> < / eol> < / bol>

Claims

1. An enhancement method for a reordering model, characterized in that, include: Obtain a training dataset, wherein the training dataset includes multiple query texts, candidate documents corresponding to each query text, real inference chains, and real ranking results; For each query text in the training dataset, the real inference chain corresponding to the query text is rendered as a target image, and based on the target image, the hidden state corresponding to the last word output by the large language model is obtained using a visual encoder and a large language model, which is used as the target vector of the query text. For each query text in the training dataset, perform the following processing: The query text and the candidate documents corresponding to the query text are input into the re-ranking model to obtain the estimated potential information and the first estimated ranking result corresponding to the query text, wherein the estimated potential information is the low-dimensional feature corresponding to the estimated inference chain of the query text; Based on the first estimated ranking result and the actual ranking result corresponding to the query text, determine the next word token prediction loss; Based on the estimated potential information and the target vector of the query text, determine the alignment loss corresponding to the query text; The parameters of the reordering model are adjusted by minimizing the next word prediction loss and the alignment loss, and the reordering model is trained to obtain an enhanced reordering model.

2. The enhancement method as described in claim 1, characterized in that, The step of inputting the query text and the candidate documents corresponding to the query text into the re-ranking model to obtain the estimated potential information and the first estimated ranking result corresponding to the query text includes: Construct a first input sequence for the query text, wherein the first input sequence includes the query text, candidate documents corresponding to the query text, a predetermined number of start words, a predetermined number of potential words, a predetermined number of end words, and a sorting result, wherein the predetermined number is less than a preset value; The first input sequence is input into the reordering model to obtain the estimated potential information and the first estimated ranking result corresponding to the query text. For each layer in the reordering model, the potential information corresponding to the start word adopts the hidden state corresponding to the end word in the previous layer, the potential information corresponding to the potential word adopts the hidden state corresponding to the start word, the potential information corresponding to the end word adopts the hidden state corresponding to the potential word, and the estimated potential information is the potential information corresponding to the potential word in the last layer of the reordering model.

3. The enhancement method as described in claim 1, characterized in that, The step of rendering the real inference chain corresponding to the query text into a target image includes: The search proceeds from large to small fonts within a preset font size range to determine the largest font that can fit the real inference chain within a preset size, wherein the preset size is the size of the target image that is set in advance. Based on the largest font size, the actual inference chain corresponding to the query text is rendered into a target image of the preset size.

4. The enhancement method as described in claim 3, characterized in that, After rendering the actual inference chain corresponding to the query text into a target image of the preset size according to the maximum font size, the method further includes: In response to the target image having a confidence level less than a preset threshold, the parameters of the target image are adjusted until the target image has a confidence level exceeding the preset threshold.

5. The enhancement method as described in claim 1, characterized in that, The acquisition of the training dataset includes: Pre-acquire multiple given query texts, candidate documents corresponding to each given query text, and the actual inference chain; Based on the real inference chain, the normalized cumulative gain of loss for each given query text is obtained; Select the given query texts from the plurality of given query texts whose normalized loss cumulative gain is greater than or equal to a preset value, and use them as the query texts in the training dataset.

6. The enhancement method as described in claim 2, characterized in that, The reordering model is obtained in advance through the following method: For each of the multiple query texts, perform the following processing: Construct a second input sequence for the query text, wherein the second input sequence includes the query text, the candidate documents corresponding to the query text, the start term, the inference chain, the end term, and the sorting result; The second input sequence is input into the initial reordering model to obtain the estimated inference chain and the second estimated ranking result corresponding to the query text. Based on the predicted inference chain, the second predicted ranking result, the actual inference chain, and the actual ranking result, determine the next word prediction loss; The parameters of the initial reordering model are adjusted by minimizing the next term prediction loss, and the initial reordering model is trained to obtain the reordering model.

7. A query method, characterized in that, include: Input the text to be queried and the candidate documents corresponding to the text to the enhanced re-ranking model to obtain the ranking result of the candidate documents; Based on the sorting results, the candidate documents most relevant to the text to be queried are determined; The enhanced reordering model is obtained by the enhancement method described in any one of claims 1 to 6.

8. The query method as described in claim 7, characterized in that, The step of inputting the query text and the corresponding candidate documents into the enhanced re-ranking model to obtain the ranking result of the candidate documents includes: Construct a first input sequence for the text to be queried, wherein the first input sequence includes the text to be queried, candidate documents corresponding to the text to be queried, a predetermined number of start words, a predetermined number of potential words, a predetermined number of end words, and a sorting result, wherein the predetermined number is less than a preset value; The first input sequence is input into the enhanced reordering model to obtain the estimated potential information corresponding to the query text and the ranking result. For each layer in the enhanced reordering model, the potential information corresponding to the start word is the hidden state corresponding to the end word in the previous layer, the potential information corresponding to the potential word is the hidden state corresponding to the start word, the potential information corresponding to the end word is the hidden state corresponding to the potential word, and the estimated potential information is the potential information corresponding to the potential word in the last layer of the enhanced reordering model.

9. An enhancement device for a reordering model, characterized in that, include: The first acquisition unit is configured to acquire a training dataset, wherein the training dataset includes multiple query texts, candidate documents corresponding to each query text, a real inference chain, and a real ranking result; The second acquisition unit is configured to render the real inference chain corresponding to each query text in the training dataset into a target image, and based on the target image, use a visual encoder and a large language model to obtain the hidden state corresponding to the last word of the output of the large language model as the target vector of the query text. The processing unit is configured to perform the following processing for each of the plurality of query texts: inputting the query text and the candidate documents corresponding to the query text into a re-ranking model to obtain the estimated latent information and the first estimated ranking result corresponding to the query text, wherein the estimated latent information is the low-dimensional feature corresponding to the estimated inference chain of the query text; determining the next lexical prediction loss based on the first estimated ranking result and the actual ranking result corresponding to the query text; and determining the alignment loss corresponding to the query text based on the estimated latent information and the target vector of the query text. The adjustment unit is configured to adjust the parameters of the reordering model by minimizing the next word prediction loss and the alignment loss, and to train the reordering model to obtain an enhanced reordering model.

10. A query device, characterized in that, include: The third acquisition unit is configured to input the text to be queried and the candidate documents corresponding to the text to be queried into the enhanced re-ranking model to obtain the ranking result of the candidate documents; The determining unit is configured to determine the candidate document most relevant to the query text based on the sorting results; The enhanced reordering model is obtained by the enhancement method described in any one of claims 1 to 6.

11. An electronic device, characterized in that, include: At least one processor; At least one memory that stores computer-executable instructions. Wherein, when the computer-executable instructions are executed by the at least one processor, they cause the at least one processor to execute the enhanced method of the reordering model as described in any one of claims 1 to 6 and / or the query method as described in any one of claims 7 to 8.

12. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by at least one processor, the at least one processor causes the processor to perform the enhanced method of the reordering model as claimed in any one of claims 1 to 6 and / or the query method as claimed in any one of claims 7 to 8.

13. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the enhancement method of the reordering model as described in any one of claims 1 to 6 and / or the query method as described in any one of claims 7 to 8.