A group consensus large model illusion reduction method based on multi-model interrogation
By constructing a group consensus method for multi-model questioning, utilizing full-encompassing bidirectional knowledge distillation and domain-adaptive fine-tuning, and combining hybrid kernel functions to calculate the similarity of group responses, the problem of large language model illusion is solved, achieving collaborative optimization and knowledge sharing among multiple models, and improving the reliability and domain adaptability of the answers.
Patent Information
- Application Number
- CN202511163861.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-08-20
AI Technical Summary
Existing technologies cannot effectively solve the problem of illusions generated by large language models (LLMs), especially in fields where information accuracy is critical. Existing methods cannot achieve collaborative optimization, knowledge sharing, and group consensus among multiple models, making it difficult to fundamentally solve the illusion problem.
By constructing a multi-model questioning group consensus method, employing full-encompassing bidirectional knowledge distillation and domain-adaptive fine-tuning, and combining hybrid kernel functions to calculate the similarity of group responses, collaborative optimization and knowledge sharing among multiple models are achieved, thus forming a group consensus.
It effectively reduces the illusion of large models, improves the reliability and domain adaptability of answers, ensures the stability and reliability of responses after multiple rounds of interaction, and avoids the limitations of a single model.
Smart Images

Figure CN120744065B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and particularly relates to a group consensus large model illusion reduction method based on multi-model questioning. BACKGROUND
[0002] With the rapid development of artificial intelligence technology, large language models (LLMs) have shown great capabilities in many fields of natural language processing, such as text generation, question answering systems, machine translation, etc. However, the illusion problem of large models has become a serious obstacle to their widespread application. Illusion refers to the fact that the text generated by the large model contains content that does not conform to the facts or is out of thin air, which greatly reduces the reliability and practicality of the model output, especially in scenarios where information accuracy is extremely high, such as medical, financial, legal, etc. The illusion problem may cause serious consequences.
[0003] Currently, there are many studies on the illusion problem of large language models, and existing technologies mainly focus on single-model self-detection or simple multi-model voting mechanisms, but these methods all have certain defects.
[0004] Firstly, Souvik Das and R. Srihari proposed in "Compos Mentis at SemEval2024 Task6: A Multi-Faceted Role-based Large Language Model Ensemble to Detect Hallucination" that multiple models and multiple roles are used to detect hallucination. Their multi-role model integration method only detects and identifies hallucination in parallel, which only judges hallucination, but does not establish a collaborative optimization mechanism between models. This means that although hallucination can be detected, it cannot actively reduce the hallucination rate. There is no way for models to communicate and improve each other, each model works independently and cannot learn from the advantages and experiences of other models, making it difficult to fundamentally solve the illusion problem. For example, in a complex text generation task, even if a model is detected to have produced an illusion, due to the lack of collaborative optimization between models, the model may still produce the same illusion when encountering similar problems next time.
[0005] Secondly, Ziwei Ji et al. in "Towards Mitigating Hallucination in Large Language Models via Self-Reflection" use self-reflection to improve the stability, entailment, and factuality of large language models' answers. The single-model self-reflection framework has obvious shortcomings. On the one hand, it lacks a group knowledge sharing mechanism. The model can only reflect within itself and cannot access the knowledge and information of other models, which limits its cognitive range to itself. On the other hand, its factuality verification relies on unquantified probability estimates, which leads to insufficient convergence stability. For example, when judging whether an answer to a medical question is accurate, the model's adjustment of its own answer may lack basis due to the lack of clear quantitative standards, leading to over-adjustment or under-adjustment, making it difficult to ensure accurate and stable answers every time.
[0006] Furthermore, Qiang Liu et al. in "Attention-guided Self-reflection for Zero-shot Hallucination Detection in Large Language Models" start from the relevance of single-model attention, non-attention answers, and original answers to judge the degree of hallucination of the original answer. However, this detection method based on attention relevance only provides partial hallucination evaluation, neither has a dynamic correction strategy nor lacks mathematical guarantees for group decision-making. It only analyzes the local part of the model's answer and cannot optimize the model as a whole, and it does not provide an effective method to solve hallucination, let alone a group solution, making it difficult to form a group consensus to reduce individual hallucination. For example, when dealing with a complex problem involving multiple aspects of knowledge, judging hallucination from a local perspective cannot fully improve the accuracy of the model's answer, and without group collaboration, a single model is difficult to break through its own limitations.
[0007] Finally, the Deepseek R1 model developed by the DeepSearch team uses the Group Relative Policy Optimization (GRPO) method, which generates group candidate responses and calculates the group advantage without the need for a value model. However, first, GRPO relies on pre-defined rules or reward functions to determine the scoring mechanism, making it difficult to break through existing knowledge boundaries and relying on the knowledge storage of rule and reward function definers, making it difficult to achieve stable "consensus" solutions for creative behaviors. Second, the candidate responses are generated from the same old policy, and the diversity of the results is difficult to guarantee, and the "group effect" is not significant enough. Therefore, although Deepseek R1 pays attention to the importance of group consensus in large model training, its diversity, creativity, and stability are still difficult to guarantee.
[0008] From the perspective of phenomenology, the "sinking of Dasein" phenomenon proposed by Heidegger is isomorphic with the hallucination generation of LLMs. In phenomenology, "sinking of Dasein" describes the state of a single cognitive subject in isolation, easily falling into a local optimal "sinking" state, just like a large model running alone may generate hallucinatory content that deviates from the facts based on its training data and algorithms. Husserl's intersubjectivity theory shows that by establishing an interactive verification and consensus formation mechanism between multiple subjects, individual cognitive limitations can be effectively broken through. In the context of large models, this means that by building an interactive mechanism between multiple models, the models can communicate and verify with each other to form a consensus, thereby breaking through the limitations of a single model and reducing hallucinations.
[0009] In summary, the existing research methods for large model hallucination problems all have their own limitations and cannot effectively solve the problem of large model hallucination. SUMMARY
[0010] The purpose of the present application is to overcome the defects of the prior art and provide a group consensus large model hallucination reduction method based on multi-model interrogation with high accuracy and strong field adaptability.
[0011] The purpose of the present application can be achieved by the following technical solutions:
[0012] The present application provides a group consensus large model hallucination reduction method based on multi-model interrogation, comprising:
[0013] According to the multi-dimensional comprehensive score result, the Top-N model is selected from the candidate model set, the full combination bidirectional knowledge distillation is performed on the Top-N model, the initial model group is obtained, and the field self-adaptation fine tuning is performed on each model in the initial model group by loading multiple field knowledge bases, and the group model set is constructed.
[0014] Given a user question, trigger multiple fine-tuned domain expert models in the group model set to generate initial answers through parallel reasoning, and iteratively optimize the answers by constructing a set of questions, generating question instructions, and updating the answers. In the iterative optimization process, a hybrid kernel function is used to calculate the similarity of the group answers. When the similarity and convergence stability both reach the preset threshold, or the maximum number of iterations is reached, the iteration is terminated and the result is output. The hybrid kernel function measures the similarity of the group answers by combining the semantic absolute distance measure represented by the Gaussian kernel and the semantic direction similarity represented by the cosine kernel.
[0015] Preferably, the multi-dimensional comprehensive score result includes semantic quality score, factual accuracy score and logical coherence score, and / or the semantic quality score considers the perplexity and the relevance of text generation, and / or the factual accuracy score is calculated by a fact triple extractor and a knowledge graph, and / or the logical coherence score evaluates the logical reasoning depth of the answer by a logical chain analyzer.
[0016] Preferably, the loss function of the bidirectional knowledge distillation includes a KL divergence loss term for constraining the alignment of probability distribution, a mean square error loss term for maintaining structural stability, and a regularization loss term for preventing overfitting; and a gradient reversal layer is added in the reverse distillation process of the bidirectional knowledge distillation.
[0017] Preferably, the domain adaptation loss function corresponding to the domain adaptation fine-tuning process includes a task loss term, a distillation loss term and an alignment loss term, and is characterized by a weighted sum form; and the alignment loss is measured by the maximum mean discrepancy.
[0018] Preferably, the domain adaptation fine-tuning process includes:
[0019] Progressive training: initially set the weight coefficients in the domain adaptation loss function to a first set value, and then adjust the weight coefficients in the domain adaptation loss function to a second set value; and / or,
[0020] Dynamic batch processing: adjust the training batch size according to the domain complexity; and / or
[0021] Parameter freezing: apply gradient masking to the underlying embedding layer and set the update rate.
[0022] Preferably, in the process of constructing the set of questions, k - nearest neighbors are used for optimization, specifically: the embedding vectors of all answers are constructed into a k - d tree, and in each iteration process, for each model's answer, a set number of farthest neighbors are queried to join the corresponding pair of answer sets.
[0023] Preferably, in the group interrogation process, knowledge verification constraints are introduced in the set high-risk field to enhance the field knowledge, specifically including: when the verification value of the model answer is lower than the set threshold, the standard answer is retrieved from the knowledge base as the answer of the current iteration.
[0024] Preferably, in the similarity calculation process of the group answer, the contribution degrees of the semantic absolute distance measurement represented by the Gaussian kernel and the semantic direction similarity represented by the cosine kernel are adjusted by using a hybrid weight.
[0025] The bandwidth of the Gaussian kernel is adaptively adjusted according to the distance between the embedding vector of all answers and the mean value.
[0026] The dynamic adjustment expression of the hybrid weight is:
[0027]
[0028] In the formula: is the model output distribution and the model output distribution KL divergence, used to measure the difference between the output distributions of two models. is a sensitivity coefficient.
[0029] Preferably, in the iterative optimization process, an approximate algorithm based on local sensitive hashing is used for incremental convergence acceleration, including:
[0030] 1) A vector is randomly sampled from a standard normal distribution by using a sign function The sign information is extracted from the result of the dot product of the embedding vector of the answer and the random bias, to generate a local sensitive hashing index.
[0031] 2) For each hash bucket , the cosine similarity in the bucket is calculated by using a cosine kernel.
[0032] 3) According to the calculated cosine similarity in the bucket, global similarity estimation is performed to obtain a global similarity estimation value, when the global similarity estimation value is greater than a set threshold, accurate calculation is triggered, otherwise local sensitive hashing estimation is continued.
[0033] Preferably, in the iterative optimization process, the convergence standard is dynamically adjusted according to the information entropy of the field knowledge base, and a differentiated convergence threshold is set.
[0034] Compared with the prior art, the present application has the following beneficial effects:
[0035] (1) Break through the limitations of a single model: By constructing a multi-model group questioning mechanism driven by cross-domain knowledge, the cognitive boundaries of self-correction of a single model are broken through, and collaborative optimization and knowledge sharing among multiple models are realized. The design of the hybrid kernel function integrates the dual advantages of Gaussian kernel and cosine kernel, and realizes adaptive optimization through a dynamic weight adjustment mechanism, effectively improving the robustness of consensus calculation and avoiding the "individual illusion" phenomenon that may occur when the candidate response is generated from the same old strategy in the GRPO training method.
[0036] (2) Form a group consensus: The group consensus convergence algorithm based on dynamic similarity threshold evaluates semantic consistency through a hybrid kernel function, and the difference threshold adjustment mechanism dynamically adjusts the convergence standard according to the information entropy of the domain knowledge base. This can ensure that the answer can automatically converge to a "consensus" after multiple interactions, while eliminating the need for manual scoring mechanisms, and has good stability and reliability.
[0037] (3) Reduce the illusion of large models: Through group consensus, combined with Gaussian kernel function to capture global similarity at semantic level and cosine kernel function to focus on consistency in semantic direction, mutual questioning among large models is realized, effectively reducing the illusion of large models and improving the reliability of answers.
[0038] (4) Unified alignment of knowledge representation space: A two-stage model optimization framework including pre-distillation and domain fine-tuning is established, and through bidirectional knowledge distillation and domain adaptation loss function, the unified alignment of cross-domain knowledge representation space is realized, improving the domain adaptability and knowledge generalization ability of the model. The hybrid kernel function combines the semantic absolute distance measurement of Gaussian kernel and the semantic direction similarity of cosine kernel to enhance the model's ability to handle different domain knowledge. BRIEF DESCRIPTION OF DRAWINGS
[0039] Figure 1 The method flowchart of the present application.
[0040] Figure 2 The cross-domain knowledge-driven multi-model group questioning flowchart in the embodiment.
[0041] Figure 3 The detailed flowchart of the model group construction stage in the embodiment.
[0042] Figure 4 The detailed flowchart of the group questioning stage in the embodiment.
[0043] Figure 5 The detailed flowchart of the consensus convergence determination stage in the embodiment. DETAILED DESCRIPTION
[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0045] Example
[0046] like Figure 1 As shown, this embodiment provides a method for reducing the illusion of large models in group consensus based on multi-model questioning. The method includes:
[0047] Based on the multidimensional comprehensive scoring results, Top-N models are selected from the candidate model set. The Top-N models undergo full-combination bidirectional knowledge distillation to obtain an initial model group. Multiple domain knowledge bases are loaded onto each model in the initial model group for domain adaptive fine-tuning to construct a group model set.
[0048] Given a user question, multiple finely tuned domain expert models in the group model set are triggered to perform parallel reasoning to generate an initial answer. Iterative optimization is performed by constructing a question set, generating question instructions, and updating answers. During the iterative optimization process, a hybrid kernel function is used to calculate the similarity of the group answers. When the similarity and convergence stability simultaneously reach a preset threshold, or when the maximum number of iterations is reached, the iteration is terminated and the result is output. The hybrid kernel function measures the similarity of the group answers by combining the semantic absolute distance metric represented by the Gaussian kernel and the semantic directional similarity represented by the cosine kernel.
[0049] The method of this embodiment will now be described in detail.
[0050] Phase 1: Population Model Construction Phase.
[0051] A. Top-N models are selected through multi-dimensional comprehensive scoring.
[0052] In this embodiment, a multi-dimensional comprehensive evaluation system is constructed, comprising semantic quality, factual accuracy, and logical consistency, to comprehensively score the model, as detailed below:
[0053] (1) Semantic quality score
[0054] Semantic quality assessment comprehensively considers the relevance of perplexity to text generation, for the sample set , For the sample set Each semantic unit (token) The model is the number of semantic units in the sample set. semantic quality score The calculation expression is:
[0055]
[0056]
[0057] wherein: is the perplexity of the model, the lower the perplexity, the more accurate the model's prediction on the validation set; is the perplexity of the model, the lower the perplexity, the more accurate the model's prediction on the validation set; predicts the current time step based on the history sequence is the conditional probability distribution of the th semantic unit, is the length of the th semantic unit in the sample set V; is an indicator measuring the relevance between the generated text and the real text by calculating the longest common subsequence, the value range is between 0 and 1, the higher the value, the stronger the relevance.
[0058] (2) Fact accuracy score
[0059] is the fact accuracy score of the model, the calculation expression is:
[0060]
[0061] wherein: is the fact triple extractor; is the knowledge graph, denotes the intersection; is the fact entailment judgment based on the natural language inference model NLI, is used to judge whether the answer of the model to the th semantic unit in the sample set V is consistent with the fact about the th semantic unit in the sample set V in the knowledge graph; is an indicator function, when is true, takes the value of , otherwise ; is the number of elements in the sample set V.
[0062] (3) Logical coherence score
[0063] Building a logic chain analyzer To assess the depth of logical reasoning in the answer, the model Logical coherence score The calculation expression is:
[0064]
[0065] In the formula: The normalization coefficient is... As the attenuation factor, For the sample set semantic units The corresponding number of reasoning steps; Represents the logic chain analyzer For the model Regarding the sample set semantic units In the In-depth evaluation of step-by-step reasoning; To represent the number of elements in the sample set V. In this embodiment, the attenuation factor... .
[0066] (4) Top-N model selection
[0067] For candidate model set , This represents the number of models in the candidate model set. For the first candidate model in the set One model calculates a multidimensional comprehensive score. The expression is:
[0068]
[0069] In the formula: , and The weighting coefficients for the corresponding items can be adjusted according to different application scenarios. In this embodiment, , , .
[0070] The Top-N model is selected to satisfy: ,in, and , respectively, are the mean and standard deviation of the scores for all candidate models.
[0071] B. Full combinatorial two-way knowledge distillation.
[0072] For the selected Top-N model set Perform bidirectional knowledge distillation of the entire portfolio.
[0073] (1) Define the bidirectional distillation loss function
[0074] For the teacher model and the student model , define the bidirectional distillation loss constraint function as the joint optimization target, the expression is:
[0075]
[0076] In the formula: , and are the KL divergence loss, mean square error loss and regularization loss respectively; , and are the weight coefficients of the corresponding items.
[0077] Use the KL divergence loss to constrain the alignment of probability distribution, the calculation expression is:
[0078]
[0079] In the formula: is the KL divergence, which measures the difference between the probability distribution of the teacher model and the predicted output of the student model when given the input , prompting the student model to learn the probability distribution characteristics of the teacher model.
[0080] Use the mean square error loss to maintain the structural stability, the calculation expression is:
[0081]
[0082] In the formula: and are the parameter matrices of the first layer of the teacher model and the student model respectively; is the total number of model layers; is the total number of parameters; is the F norm.
[0083] Use the regularization loss to prevent overfitting, the calculation expression is:
[0084]
[0085] In the formula: is the parameter of the student model; is the regularization coefficient; is the L2 norm.
[0086] (2) Bidirectional distillation protocol
[0087] For each pair of models , independently perform:
[0088] Forward distillation: train as the teacher, as the initial point , the optimizer uses AdamW, and the parameter settings in this embodiment are as follows: learning rate , , , . The student model learns the knowledge of the teacher model by adjusting its own parameters, so that its probability distribution and structure gradually approach those of the teacher model.
[0089] Reverse distillation: train as the teacher, as the initial point , the parameter settings are the same as in the forward process but with the addition of a gradient reversal layer. The gradient reversal layer causes the direction of the gradient to be reversed during backpropagation, which helps the student model learn different knowledge representations from the teacher model, further enriching the model's knowledge.
[0090] Early stopping condition: terminate training when the sample set perplexity difference is less than the set threshold, which is set to 0.05 in this embodiment.
[0091] Finally, generate differentiated pre-training models to form an initial model group: These models not only retain the characteristics of the original models in knowledge representation, but also learn from each other through knowledge distillation, laying the foundation for subsequent domain adaptation fine-tuning.
[0092] C. Domain adaptation fine-tuning.
[0093] For each model in the initial model group , load domain knowledge bases to perform domain adaptation fine-tuning to generate domain expert models and build a group model set.
[0094] (1) Define the domain adaptation loss function
[0095] Define the domain adaptation loss function , which is expressed as:
[0096]
[0097] wherein , and are the domain task loss, the distillation consistency loss and the cross-domain alignment loss, respectively; , and are the weight coefficients of the corresponding items.
[0098] Specifically, the domain task loss is calculated as follows:
[0099]
[0100] wherein denotes the domain corresponding dataset, is the number of samples in the domain corresponding dataset ; is the given input, is the output, is the historical output, is the predicted output, is the probability of event A occurring under the condition that event B occurs; is the number of iterations; denotes the length of the output sequence , i.e. the number of tokens in the sequence.
[0101] Specifically, the distillation consistency loss is calculated as follows:
[0102]
[0103] wherein is the iteration period; and are the probabilities of the pre-fine-tuned model and the post-fine-tuned model predicting the output when given the input ; is the JS (Jensen-Shannon) divergence, which is used to measure the difference between the probability distributions of the pre-fine-tuned model and the post-fine-tuned model predicting the output when given the input , and ensures that the model does not deviate too far from the knowledge obtained during pre-training during the fine-tuning process.
[0104] Specifically, the cross-domain alignment loss is calculated as follows:
[0105]
[0106]
[0107] wherein: represents the adoption of a radial basis RBF kernel function, represented as , is a bandwidth parameter of the radial basis kernel function; is the maximum mean discrepancy; is a model implicit representation mapping; is an expectation.
[0108] (2) Adaptive fine-tuning strategy
[0109] 1) Progressive training: initial step size sets the weight coefficients of each term in the domain adaptation loss function to a first set value, and subsequently adjusts the weight coefficients of each term in the domain adaptation loss function to a second set value. In this embodiment, the initial step size, the first set value is , , , and the subsequent adjustment to the second set value is , , .
[0110] 2) Dynamic batch processing: according to the complexity of the domain , the batch size is adjusted as follows: , wherein is the global maximum batch size.
[0111] 3) Parameter freezing: applying a gradient mask to the underlying embedding layer and setting an update rate. In this embodiment, the update rate is set to .
[0112] Finally, a total of domain expert models are generated, constituting a complete group model set .
[0113] Second stage: group interrogation stage.
[0114] A, parallel reasoning, generating an initial answer.
[0115] Given a user question , trigger fine-tuned domain expert models to perform parallel reasoning, at which time the model generates an initial answer , expressed as:
[0116]
[0117]
[0118] wherein: Representation Model Parameters; Indicates a hybrid sampling strategy; Indicates in model parameters ,enter and historical generation sequence Given the first t-1 words generated, generate the next word. The probability distribution; For the temperature coefficient, in this embodiment ; For kernel sampling probability, in this embodiment ; Indicator In the current model parameters and input Score under the given conditions For a vocabulary list; This is an indicator function.
[0119] B. Iterative optimization mechanism.
[0120] (1) Constructing a question set
[0121] For the In the next iteration, the model The answer Construct a set of comparative answers :
[0122]
[0123] In the formula: Let be the similarity function, expressed as , This represents the embedding function; in this embodiment, the MPNet model is used for sentence embedding. The similarity threshold is used to filter out answers that differ significantly from the current answer as the target for further questioning. In this embodiment... ; This represents the number of domain expert models.
[0124] In this embodiment, k-nearest neighbor optimization is used to reduce computational complexity:
[0125] All answers are embedded into vectors to construct a kd-tree (k-dimensional tree). In this embodiment, the data dimension is... ;
[0126] For the Model in the next iteration The answer Query its The farthest neighbor joined ,in denotes rounding down. This setting ensures the diversity of the challenge set and avoids calculating the similarity between all answers, greatly improving efficiency.
[0127] (2) Generating challenge instructions
[0128] Define the conflict detection function:
[0129]
[0130] wherein: is the answer of the model ; is the i-th answer in the set of counter-answers; is the natural language reasoning function; denotes contradiction; is the indicator function.
[0131] For each counter-answer , a challenge instruction template is dynamically generated:
[0132]
[0133] wherein:
[0134] is the dynamic challenge instruction generation template function, which generates a targeted natural language challenge instruction according to the difference between the current model answer and the counter-answer, guiding the model to correct the contradictions or missing information in the answer, and is specifically defined by the above segmented formula;
[0135] is a fact triple extracted using OpenIE, is the claim extraction function in the natural language reasoning task, and OpenIE is an information extraction technology that can extract meaningful fact information from text in the form of a triple (subject, predicate, object);
[0136] is the missing entity identified by the recognized missing entity, is the function of identifying the missing entity in B from the reference A, and in this embodiment, the importance of a word in the text is measured by TF-IDF (Term Frequency-Inverse Document Frequency), and the missing entity is identified by the TF-IDF difference;
[0137] is the domain knowledge base verification function, , denotes a triple (subject, predicate, object), which is used to determine whether the fact in the answer exists in the domain knowledge base , ensuring the rationality and accuracy of the challenge.
[0138] (3) Answer update
[0139] Model Receiving challenge feedback , the answer is revised as:
[0140]
[0141] Among them:
[0142]
[0143]
[0144] In the formula: represents the probability distribution of generating the next word under the condition of model parameters , input , answer and updated feedback integration function ; is the feedback integration function; is the updated feedback integration function; is the conflict penalty coefficient; is the attention function; is the attention weight, , , is a multi-layer perception machine, is an embedding function; and FW is a word to be generated.
[0145] In this embodiment, the embedding vectors of the answer and the embedding vectors of the feedback are processed by a multi-layer perception machine MLP to obtain scores ; the scores are converted into attention weights by a softmax function to determine the importance of each feedback to the updated answer; and the information of different feedbacks is integrated by an attention mechanism to generate a more accurate revised answer.
[0146] The third stage is the consensus convergence determination stage.
[0147] The consensus convergence determination mechanism realizes the quantitative evaluation of the consistency of group answers across models and across fields by constructing a dynamic similarity measurement system of multi-modal semantic space.
[0148] The specific implementation includes the following steps:
[0149] (1) Heterogeneous embedding space alignment
[0150] The semantic representations of different pre-training models (such as BERT, RoBERTa, and GPT series) differ. To achieve unified similarity calculation, the following mapping function is used to embed the output of different models into the same space:
[0151]
[0152] wherein: represents the classification label output vector of the model is the feature dimension of the model ; is a learnable alignment matrix, which is set to in this embodiment to achieve embedding representation of unified dimension; is a layer normalization operation used to stabilize the training process; is a bias.
[0153] The alignment parameters are optimized through the contrast learning objective function:
[0154]
[0155] wherein: is a set of cross-model positive sample pairs, which are selected from the answers of multiple models to the same question, aiming to make similar answers closer in the embedding space; is a similarity threshold used to measure whether a sample pair is similar, which is in this embodiment; is a ReLU function that retains the value when is greater than 0, otherwise it is 0, to guide the model to learn appropriate alignment parameters.
[0156] (2) Multi-kernel similarity joint measurement
[0157] Define the group answer set , wherein represents the total number of models.
[0158] Consensus degree is calculated by the following hybrid kernel function:
[0159]
[0160] wherein: is a Gaussian kernel function used to measure the absolute distance of semantics; is a cosine kernel function used to capture semantic direction similarity.
[0161] Specifically, the calculation expression of the Gaussian kernel function is:
[0162]
[0163] bandwidth The distance between the embedding vector of all answers and the mean is adaptively adjusted, thereby more flexibly reflecting the semantic distance, bandwidth The adaptive adjustment expression is:
[0164]
[0165] In the formula: is the mean of all answer embedding vectors.
[0166] Specifically, the calculation expression of the cosine kernel function is:
[0167]
[0168] Specifically, the dynamic adjustment expression of the mixing weight is:
[0169]
[0170] In the formula: is the KL divergence of the model output distribution, used to measure the difference between the output distributions of two models; is a sensitivity coefficient, in the embodiment . The mixing weight is adjusted according to the sensitivity of the KL divergence, so that when the difference between different models is large, the weights of the Gaussian kernel and the cosine kernel can be dynamically adjusted.
[0171] The design of the mixed kernel function combines the dual advantages of the Gaussian kernel and the cosine kernel: the Gaussian kernel function effectively captures the global similarity at the semantic level by measuring the absolute Euclidean distance between embedding vectors; the cosine kernel function focuses on the consistency of semantic direction by calculating the vector angle. The combination of the two can avoid the limitations of a single kernel function. The dynamic weight adjustment mechanism can real-time perceive the difference between the output distributions of the models through the KL divergence, increase the weight of the Gaussian kernel when the difference between the models is large to strengthen the semantic correction, and focus on the cosine kernel when the difference is small to maintain the semantic coherence, thereby realizing adaptive optimization.
[0172] The mixed kernel function realizes comprehensive evaluation of multi-dimensional semantic features by combining the semantic absolute distance measurement of the Gaussian kernel and the semantic direction similarity of the cosine kernel. Its dynamic weight adjustment mechanism adaptively adjusts the contribution degree of the kernel function according to the difference between the output distributions of the models, thereby improving the robustness of the consensus calculation.
[0173] (3) Incremental convergence acceleration
[0174] To reduce Computing complexity, designing an approximate algorithm based on local sensitive hashing (LSH), specifically including the following steps:
[0175] 1) Constructing a local sensitive hashing index (LSH index):
[0176] The sign function is used to randomly sample a vector from the standard normal distribution, and the sign information extracted from the result of the dot product of the answer embedding vector and the random bias is generated. (When the result is equal to 0, the value is 0; when the result is greater than 0, the value is 1; when the result is less than 0, the value is -1) Local sensitive hashing index (LSH index), expression:
[0177]
[0178] In the formula: ( is the number of hash functions); is a vector randomly sampled from the standard normal distribution ; is a random bias randomly sampled from a uniform distribution , used to reduce the collision probability.
[0179] 2) For each hash bucket , calculate the similarity in the bucket, calculate the cosine similarity in each hash bucket to approximate the overall similarity.
[0180] 3) Global similarity estimation:
[0181] When , trigger accurate calculation, otherwise continue LSH estimation, so as to reduce the amount of calculation while ensuring a certain accuracy.
[0182] (4) Domain adaptive threshold adjustment
[0183] Set different convergence thresholds for different domains :
[0184]
[0185] In the formula: is the basic threshold, in this embodiment, ; is the information entropy of the domain knowledge base, used to measure the uncertainty of the domain knowledge; is the maximum value of the domain information entropy; is the adjustment coefficient, in this embodiment, .
[0186] The differentiated threshold adjustment mechanism dynamically adjusts the convergence criteria according to the information entropy of the domain knowledge base. High-deterministic domains use stricter thresholds, while high-openness domains relax the thresholds appropriately, ensuring domain adaptability.
[0187] (5) Convergence stability verification
[0188] Define the answer sequence Lyapunov function to measure the overall dispersion of the answer sequence, the expression is:
[0189]
[0190] When the following three conditions are met simultaneously, it is determined that the system enters stable convergence, and the iteration process is terminated:
[0191] 1) ;
[0192] 2) In this embodiment ;
[0193] 3) In this embodiment .
[0194] Through the comprehensive judgment of the above three conditions, the stability of convergence is ensured.
[0195] (6) Actual deployment optimization
[0196] To cope with the scale expansion (such as ), the block parallel computing strategy is adopted: 1) Divide the model group into
[0197] blocks, and divide them into multiple computing blocks according to the number of models.
[0198] 2) Use NVIDIA Collective Communication Library to realize All-to-All (All-to-All) communication in each block, and calculate the similarity matrix in the computing block. NCCL library is used to efficiently realize block communication and similarity calculation.
[0199] 3) Global aggregation:
[0200]
[0201] In the formula: is the matrix trace operation, which realizes the cross-block similarity transmission. Through this block parallel computing and global aggregation, the computing efficiency under large-scale model group is improved.
[0202] The convergence determination mechanism of the embodiment can effectively reduce the calculation complexity and improve the convergence efficiency through the dynamic adjustment of the mixed kernel function and the incremental acceleration strategy.
[0203] Figure 2 The cross-domain knowledge driven multi-model group interrogation flowchart provided by the embodiment shows the complete processing flow from model group construction to final answer output, including three main stages: model group construction stage, group interrogation stage and consensus convergence determination stage. The flowchart particularly highlights the feedback control relationship between the consensus convergence determination stage and the group interrogation stage, forming a closed-loop optimization mechanism.
[0204] As shown in Figure 3 , the model group construction stage includes model screening, bidirectional distillation and domain fine-tuning, which is used to construct a model group with cross-domain knowledge representation capability. As shown in Figure 4 , the group interrogation stage includes four sub-steps executed in cycles: parallel reasoning, interrogation set construction, generation of interrogation instructions and update of answers, which realizes the collaborative optimization and knowledge sharing among multiple models. As shown in Figure 5 , the consensus convergence determination stage includes calculation of multi-element similarity and threshold judgment, which controls the loop iteration of the flowchart through dynamic similarity threshold.
[0205] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A multi-model challenge-based group consensus large model illusion reduction method, characterized in that, Comprise: According to the multi-dimensional comprehensive score result, the Top-N models are selected from the candidate model set, full combination bidirectional knowledge distillation is performed on the Top-N models to obtain an initial model group, and each model in the initial model group is loaded with multiple field knowledge bases for field adaptive fine-tuning to construct a group model set; Given a user question, a plurality of fine-tuned field expert models in the group model set are triggered to generate an initial answer through parallel reasoning, a set of interrogations is constructed, interrogation instructions are generated, and answers are updated for iterative optimization, a hybrid kernel function is used to calculate the similarity of the group answers during the iterative optimization process, and when the similarity and convergence stability simultaneously reach a preset threshold or the maximum number of iterations is reached, the iteration is terminated and the result is output; wherein the hybrid kernel function measures the similarity of the group answers by combining the semantic absolute distance measure represented by the Gaussian kernel and the semantic directional similarity represented by the cosine kernel.
2. The method of claim 1, wherein the method is based on a multi-model interrogation of a consensus large model hallucination reduction method. The multi-dimensional comprehensive score result includes semantic quality score, fact accuracy score and logical coherence score, and / or the semantic quality score comprehensively considers perplexity and text generation correlation, and / or the fact accuracy score is calculated by a fact triple extractor and a knowledge graph, and / or the logical coherence score evaluates the logical reasoning depth of the answer by a logical chain analyzer.
3. The method of claim 1, wherein the method is based on a multi-model interrogation of a consensus large model hallucination reduction method. The loss function of the bidirectional knowledge distillation includes a KL divergence loss term for constraining probability distribution alignment, a mean square error loss term for maintaining structural stability, and a regularization loss term for preventing overfitting; wherein a gradient reversal layer is added in the reverse distillation process of the bidirectional knowledge distillation.
4. The method of claim 1, wherein the method is based on a multi-model interrogation of a consensus large model hallucination reduction method. The field adaptation loss function corresponding to the field adaptive fine-tuning process includes a task loss term, a distillation loss term and an alignment loss term, which are represented in the form of weighted sum; wherein the alignment loss is measured by maximum mean difference.
5. The method of claim 4, wherein, The field adaptive fine-tuning process comprises: Progressive training: initially set the weight coefficients in the field adaptation loss function to a first set value, and then adjust the weight coefficients in the field adaptation loss function to a second set value; and / or, Dynamic batch processing: adjust the training batch size according to the field complexity; and / or Parameter freezing: apply gradient masking to the underlying embedding layer and set the update rate.
6. The method of claim 1, wherein the method is based on a multi-model interrogation of a consensus large model hallucination reduction. In the process of constructing the set of interrogations, k-nearest neighbors are used for optimization, specifically: the embedding vectors of all answers are constructed into a k-d tree, and in each iteration process, for each model's answer, a set number of farthest neighbors are queried to join the corresponding pair of answer sets.
7. The method of claim 1, wherein the method is based on a multi-model interrogation of a consensus large model hallucination reduction method. In the group interrogation process, in the set high-risk field, knowledge verification constraints are introduced for field knowledge enhancement, specifically including: when the verification value of the model answer is lower than the set threshold, the standard answer is retrieved from the knowledge base as the answer of the current iteration.
8. The method of claim 1, wherein the method is based on a multi-model interrogation of a consensus large model hallucination reduction method. In the process of calculating the similarity of the group answers, the contribution degrees of the semantic absolute distance measure represented by the Gaussian kernel and the semantic directional similarity represented by the cosine kernel are adjusted by a hybrid weight; The bandwidth of the Gaussian kernel is adaptively adjusted according to the distance between the embedding vectors of all answers and the mean; The dynamic adjustment expression of the hybrid weight is: , where: is the model output distribution and the model output distribution KL divergence of two model output distributions, used to measure the difference between two model output distributions; is the sensitivity coefficient.
9. The method of claim 1, wherein the method is based on a multi-model interrogation of a consensus large model hallucination reduction. In the iterative optimization process, an approximate algorithm based on locality sensitive hashing is used for incremental convergence acceleration, including: 1) A vector randomly sampled from the standard normal distribution using the sign function The sign information is extracted from the result of the dot product of the answer embedding vector and the random bias, generating a local sensitive hashing index; 2) For each hash bucket Compute cosine similarity within the bucket by cosine kernel. 3) According to the calculated cosine similarity in the bucket, global similarity estimation is carried out to obtain a global similarity estimation value, and when the global similarity estimation value is greater than a set threshold, accurate calculation is triggered, otherwise the locality sensitive hashing estimation is continued.
10. The method of claim 1, wherein the method is based on a multi-model interrogation of a consensus large model hallucination reduction method. In the iterative optimization process, the convergence standard is dynamically adjusted according to the information entropy of the domain knowledge base, and a differentiated convergence threshold is set.
Citation Information
Patent Citations
Large model reasoning method and system based on tree diagram and knowledge graph retrieval enhancement
CN119961377A
Black box large language model illusion detection and correction method and device
CN120258147A