Large model generated text score fusion method, device, storage medium and product
By generating a text scoring fusion model from a large model and dynamically fusing text features and multi-objective expert scores, the problem of blind spots in single reward models and scoring bias in ensemble methods is solved, resulting in more accurate and stable scoring results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN UNIV
- Filing Date
- 2026-02-11
- Publication Date
- 2026-06-19
AI Technical Summary
In existing methods for scoring text generated by large-scale language models, single-reward models have evaluation blind spots, and ensemble methods are prone to being dominated by experts without expertise in specific domains, leading to significant scoring biases.
A scoring fusion model is adopted. By acquiring the text features of the generated text and multiple target expert scores, the final score is calculated using a scoring fusion model trained based on training text samples and attention weights. The attention weights are determined based on the query vector and the expert key matrix. The expert key matrix is composed of learnable key vectors, and the dependence of the expert scores is dynamically adjusted.
It reduces scoring bias, improves scoring accuracy and robustness, and avoids the evaluation blind spots of single reward models and the insufficient calculation of fixed rules in ensemble methods.
Smart Images

Figure CN122240803A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of natural language processing technology, and in particular to methods, devices, storage media, and products for generating text scores using large models. Background Technology
[0002] With the rapid development of large language models (LLMs), aligning the content generated by these models with human intentions and values has become a key challenge. Currently, reward models are commonly used to simulate human preferences during the alignment phase of large language models.
[0003] Current methods include single-reward models and ensemble methods. Single-reward models use a single neural network as the reward model; however, they suffer from evaluation blind spots, which the generative model can easily exploit to generate inflated scores but low-quality content, leading to significant scoring bias. Ensemble methods deploy multiple independently trained reward models (experts), each scoring the same input separately. The final score is calculated based on fixed rules or statistics, making it susceptible to being dominated by experts lacking expertise in a specific domain, resulting in further scoring bias. Summary of the Invention
[0004] The main purpose of this application is to provide a method, device, storage medium and product for generating text scores from a large model, which aims to solve the technical problem of large deviation in the final score.
[0005] To achieve the above objectives, this application proposes a large-model-generated text scoring fusion method, the method comprising:
[0006] Obtain the text features of the generated text and multiple target expert scores for the generated text; The text features and the target expert score are input into a preset scoring fusion model to obtain the final score. The scoring fusion model is trained based on training text samples and attention weights. The attention weights are calculated based on query vectors and expert key matrices. The query vectors are determined based on the score distribution of the text features and the target expert score. The expert key matrix is a matrix composed of learnable key vectors corresponding to multiple experts.
[0007] In one embodiment, before the step of inputting the text features and the target expert score into a preset scoring fusion model, the method further includes: Obtain the training text sample and multiple expert scores for the training text sample; The attention weights are calculated based on the training text samples, the expert scores, and the expert key matrix. Based on the attention weights, the expert scores, and the preset calibration parameters, a fusion score is calculated after fusing the multiple expert scores. Based on the sample labels of the training text samples, the expert scores, the fusion scores, the preset loss function, and the preset hyperparameters, the parameters in the preset model to be trained and the learnable key vectors are adjusted to obtain the scoring fusion model.
[0008] In one embodiment, the step of calculating the attention weights based on the training text samples, the expert ratings, and the expert key matrix includes: The training text samples are input into a preset pre-trained language model to obtain text semantic vectors; The expert scores are input into a preset score encoder to encode the expert scores and obtain an expert score vector. The text semantic vector and the expert rating vector are concatenated to obtain a combined vector; The combined vector is input into a preset bottleneck-type multilayer perceptron to obtain the query vector; The attention weights are calculated based on the query vector and the expert key matrix.
[0009] In one embodiment, the attention weights include weight values corresponding to each of the expert scores, the calibration parameters include scaling factors and bias parameters, and the step of calculating the fused score after fusing the multiple expert scores based on the attention weights, the expert scores, and the preset calibration parameters includes: Multiply the expert score by the scaling factor, and add the bias parameter to the product to obtain the calibration score value corresponding to each expert score; Each calibration score value is multiplied by its corresponding weight value to obtain multiple weighted score values; The sum of the multiple weighted score values is calculated to obtain the fusion score.
[0010] In one embodiment, the loss function includes a ranking loss function, a difference calibration loss function, and a surrogate mean regularization loss function. The step of adjusting the parameters in the preset training model and the learnable key vector based on the sample labels of the training text samples, the expert scores, the fusion scores, the preset loss function, and the preset hyperparameters to obtain the scoring fusion model includes: Based on the fusion score, the hyperparameters, and the ranking loss function, the ranking loss of the model to be trained is calculated; Based on the sample labels, the fusion score, and the difference calibration loss function, the difference calibration loss of the model to be trained is calculated; Based on the expert score, the fusion score, and the agent mean regularization loss function, the agent mean regularization loss of the model to be trained is calculated. The total loss is calculated based on the ranking loss, the difference calibration loss, the proxy mean regularization loss, and the preset weight hyperparameters. Based on the total loss, the parameters in the model to be trained and the learnable key vector are adjusted to obtain the scoring fusion model.
[0011] In one embodiment, the training text samples include a first text sample and a second text sample, wherein the prompt words corresponding to the first text sample and the second text sample are the same, and the fusion score includes a first fusion score of the first text sample and a second fusion score of the second text sample. The step of calculating the ranking loss of the model to be trained based on the fusion score, the hyperparameters, and the ranking loss function includes: Calculate the difference between the first fusion score and the second fusion score to obtain the fusion score difference; The ranking loss of the model to be trained is calculated based on the fusion score difference, the hyperparameters, and the ranking loss function.
[0012] In one embodiment, the sample labels include a first text label for a first text sample and a second text label for a second text sample. The step of calculating the difference calibration loss of the model to be trained based on the sample labels, the fusion score, and the difference calibration loss function includes: Calculate the first label mean and standard deviation of the first text label, and the second label mean and standard deviation of the second text label, respectively; Based on the mean and standard deviation of the first label, the first label is standardized to obtain the first standardized label; Based on the mean and standard deviation of the second label, the second label is standardized to obtain the second standardized label; Calculate the difference between the first standardized label and the second standardized label to obtain the standardized label difference; The differential calibration loss of the model to be trained is calculated based on the standardized label difference, the fusion score difference, and the differential calibration loss function.
[0013] Furthermore, to achieve the above objectives, this application also proposes a large model-generated text scoring fusion device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the large model-generated text scoring fusion method as described above.
[0014] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the large model generating text scoring fusion method described above.
[0015] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the large model-generated text scoring fusion method described above.
[0016] One or more technical solutions proposed in this application have at least the following technical effects: This application obtains text features of the generated text and multiple target expert scores of the generated text, inputs the text features and the target expert scores into a preset scoring fusion model to obtain the final score. The scoring fusion model is trained based on training text samples and attention weights. The attention weights are calculated based on query vectors and expert key matrices. The query vectors are determined based on the score distribution of the text features and the target expert scores. The expert key matrix is a matrix composed of learnable key vectors corresponding to multiple experts.
[0017] To address the evaluation blind spots inherent in current single-reward models and the problem that ensemble methods, which calculate final scores based on fixed rules or statistics, are prone to being dominated by experts lacking expertise in specific domains, leading to significant scoring bias, this application trains a model using an attention mechanism calculated based on query vectors and expert key matrices. The trained model is then used for scoring, thus reducing scoring bias. Specifically, this application does not use a single reward model for scoring but rather fuses multi-objective expert scores, effectively avoiding the evaluation blind spots inherent in single-reward models. Furthermore, the attention weights in this application are determined by the query vector, composed of text features and the distribution of target expert scores, and the expert key matrix, composed of learnable key vectors from experts. During model training using attention weights and training text samples, the model learns the relationships between scores, expert key vectors, text features, and score distribution, adaptively adjusting the expert key vectors. In other words, the final score in this application is determined dynamically based on text features and score distribution, avoiding calculations based on fixed rules or statistics. Therefore, overall, this application reduces scoring bias. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating the text scoring fusion method for generating large models in this application is provided in Implementation Example 1. Figure 2 A schematic diagram of the overall model architecture provided in Embodiment 1 of the text scoring fusion method for generating large models in this application; Figure 3 A schematic diagram of the dataset after model feature processing provided in Embodiment 1 of the text scoring fusion method for generating large models in this application; Figure 4 A schematic diagram showing the isomorphic comparison of model features after feature processing provided in Embodiment 1 of the text scoring fusion method for generating large models in this application; Figure 5 A schematic diagram showing the heterogeneous comparison of model features after feature processing, provided in Embodiment 1 of the text scoring fusion method for generating large models in this application; Figure 6 A flowchart illustrating the second embodiment of the text scoring fusion method for generating large models in this application; Figure 7 This is a schematic diagram of the device structure of the hardware operating environment involved in the large model-generated text scoring fusion method in the embodiments of this application; Figure 8 This is a schematic diagram illustrating the data acquisition consent process involved in the large model-generated text scoring fusion method in this application embodiment.
[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0024] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, such as a large model-generated text scoring fusion device. The following description uses a large model-generated text scoring fusion device as an example to illustrate this embodiment and the subsequent embodiments.
[0025] With the rapid development of large language models (LLMs), ensuring that the content generated by these models aligns with human intentions and values has become a key challenge. In the alignment phase of LLMs, reward models (RMs) are typically used to simulate human preferences. To improve the accuracy and robustness of the evaluation, the industry often employs a single-model "multi-expert ensemble" strategy. Current ensemble solutions mainly include: 1. Single Reward Model Approach: This approach uses a single neural network as the reward model to score the input (prompt word, response) text pairs. Its workflow is as follows: input text pair, text encoder (such as BERT / GPT-like models), scoring head, output scalar reward score.
[0026] 2. Mean Ensemble: This scheme deploys multiple independently trained reward models, each scoring the same input. The scores from all experts are then simply averaged to obtain the final fused score. The process is as follows: input text pair, N expert models score in parallel, sum and divide by N, output average score.
[0027] 3. Uncertainty-based ensemble schemes (such as UWO): These schemes utilize the statistical variance (i.e., uncertainty) of each expert's score to adjust the final score. A common practice is to assign lower weights or impose score penalties to samples with high variance (i.e., large disagreements among experts). The process involves: inputting text pairs, having N expert models score in parallel, calculating the score variance, assigning weights based on the inverse of the variance, and finally, weighted summation and output.
[0028] In the aforementioned approaches, single-reward model methods suffer from evaluation blind spots. Generative models can easily exploit these blind spots to generate inflated but low-quality content (i.e., "reward hacking"), leading to significant scoring bias. Ensemble methods deploy multiple independently trained reward models (experts), each scoring the same input separately. The final score is calculated based on fixed rules or statistics. This approach fails to dynamically assess the applicability of different expert models according to the current task scenario (e.g., code generation, logical reasoning, or creative writing). In specific domains, scoring can be dominated by experts lacking expertise in that domain. When an expert model malfunctions or provides an outlier with an extremely erroneous score, or in scenarios where expert capabilities vary (e.g., weak models are mixed in), existing ensemble methods ultimately result in significant scoring bias.
[0029] Based on this, embodiments of this application provide a method for generating text scores using a large model, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the text scoring fusion method for generating large models in this application.
[0030] In this embodiment, the large model-generated text scoring fusion method includes steps S10~S20: Step S10: Obtain the text features of the generated text and multiple target expert scores of the generated text; It should be noted that generated text refers to text content produced by artificial intelligence models, natural language generation systems, or other automated text generation methods. Text features refer to quantified or structured information used to characterize the inherent attributes of the generated text, including but not limited to semantic features, grammatical structure, lexical diversity, fluency, coherence, and other calculable or extractable indicators. Target expert scores refer to scores independently given by multiple domain experts on specific evaluation dimensions, reflecting the text's performance level under human evaluation standards.
[0031] It should also be noted that the symbol and tensor dimension in this embodiment can be: Number of experts: N (e.g., 5); Text semantic feature dimensions: (e.g., 1024); Scoring feature dimensions: (e.g., 32); Number of attention heads: H (e.g., 4); Total hidden dimensions for Query (query vector) / Key (key vector): (e.g., 256); Single-head dimension ; Input: Text feature vector (Generated by any encoder, such as DeBERTa) (Results of hidden state pooling in an improved BERT model / Llama (a large language model)). Expert Original Rating Vector (Each line contains N expert ratings for the same candidate response); Output: Scalar score after fusion Attention weights , used for interpretability analysis.
[0032] Step S20: Input the text features and the target expert score into a preset scoring fusion model to obtain the final score. The scoring fusion model is trained based on training text samples and attention weights. The attention weights are calculated based on query vectors and expert key matrices. The query vectors are determined based on the score distribution of the text features and the target expert score. The expert key matrix is a matrix composed of learnable key vectors corresponding to multiple experts.
[0033] It should be noted that the rating fusion model refers to a machine learning model used to integrate multiple expert ratings and combine them with text features to output a comprehensive final rating. This model learns through training how to weight or fuse different expert ratings while considering the features of the text itself. Attention weights refer to the importance coefficients assigned to different experts by the model during the rating fusion process. These weights are dynamically generated and reflect the degree of contribution of each expert's rating to the final rating. This embodiment can output not only the final rating but also the distribution of attention weights. The overall architecture of this embodiment can be referred to... Figure 2 .
[0034] The query vector is the vector used in the attention mechanism for matching calculations with the expert key matrix. Its content is determined by the textual features of the currently generated text and the rating distribution of the target expert ratings, representing the requirements of the current rating fusion task. The expert key matrix is a matrix composed of multiple learnable key vectors corresponding to each expert, arranged column-wise (or row-wise). Each key vector represents the corresponding expert's rating preferences or style features, used to calculate similarity with the query vector to generate attention weights. Learnable key vectors are vector parameters associated with each expert, automatically optimized through backpropagation during model training, used to encode the expert's personalized characteristics in rating behavior.
[0035] It is understandable that, since the scoring fusion model introduces attention weights calculated based on the query vector and the expert key matrix, and the query vector itself is determined by the text features and the score distribution of the target expert scores, the model can dynamically adjust the dependence on different expert scores according to the specific characteristics of the currently generated text. Thus, it can adaptively fuse expert scores by combining the score distribution of the text and the experts, thereby improving the accuracy and robustness of the final score.
[0036] Furthermore, since the learnable key vectors in the expert key matrix are jointly optimized with the scoring fusion model during training, they can effectively capture the differences in scoring habits or preferences among different experts. This allows the model to reasonably allocate expert weights when faced with new generated text, reducing the bias of the final score obtained through fusion.
[0037] In one feasible implementation, the specific implementation prior to the step of inputting the text features and the target expert score into a preset scoring fusion model may also be: The training text samples and multiple expert ratings for the training text samples are obtained. Based on the training text samples, the expert ratings, and the expert key matrix, the attention weights are calculated. Based on the attention weights, the expert ratings, and preset calibration parameters, a fused score is calculated after fusing the multiple expert ratings. Based on the sample labels of the training text samples, the expert ratings, the fused score, a preset loss function, and preset hyperparameters, the parameters in the preset model to be trained and the learnable key vectors are adjusted to obtain the rating fusion model.
[0038] It should be noted that the sample labels of the training text samples refer to the real or reference scores corresponding to the training text samples. The model to be trained refers to the initial score fusion model that has not yet completed parameter optimization; its structure includes components for calculating the query vector, attention weights, and fused scores, and its parameters need to be updated using training data. The dataset after feature extraction processing in this embodiment can be referenced... Figure 3 .
[0039] It is understood that this implementation method uses training text samples, their corresponding multiple expert scores, and expert key matrices to calculate attention weights during the training phase, and performs weighted fusion of expert scores through preset calibration parameters, so that the fused scores can dynamically reflect the credibility and relevance of different experts in the current text context, thereby improving the accuracy of score fusion.
[0040] Since the model parameters and learnable key vectors in this implementation are jointly optimized based on sample labels, fused scores and preset loss functions, the model not only learns how to fuse scores, but also learns the personalized features of each expert in sync through learnable key vectors. This enables the attention mechanism to more accurately match text features and expert preferences, so that when scoring newly generated text in the inference stage, it can output a final score that is closer to human consensus, effectively improving the accuracy of the automatic evaluation system.
[0041] In one feasible implementation, the specific implementation of calculating the attention weights based on the training text samples, the expert scores, and the expert key matrix can also be: The training text samples are input into a preset pre-trained language model to obtain a text semantic vector. The expert scores are input into a preset score encoder to encode the expert scores and obtain an expert score vector. The text semantic vector and the expert score vector are concatenated to obtain a combined vector. The combined vector is input into a preset bottleneck multilayer perceptron to obtain the query vector. Based on the query vector and the expert key matrix, the attention weights are calculated.
[0042] It should be noted that a pre-trained language model refers to a neural network model pre-trained on a large-scale corpus, capable of mapping input text into a vector representation rich in semantic information. A text semantic vector is the vector output after encoding training text samples through the pre-trained language model, used to represent the deep semantic content of the text. A rating encoder is a neural network module specifically designed to convert numerical expert ratings into vector representations, allowing the ratings to participate in subsequent vector operations. An expert rating vector is the vector form obtained by encoding expert ratings through the rating encoder, used for fusion with text semantic information.
[0043] A combined vector refers to a joint representation vector formed by concatenating the text semantic vector and the expert rating vector dimensionally, containing both text semantic and rating distribution information. A bottleneck-type multilayer perceptron refers to a multilayer feedforward neural network with a significantly compressed intermediate layer dimension structure, used to extract key features from high-dimensional combined vectors and generate low-dimensional query vectors, helping to suppress redundant information and improve generalization ability.
[0044] It should also be noted that the rating encoder in this embodiment consists of a linear layer, an activation function layer (ReLU), and a layer normalization layer. Before encoding the ratings, Gaussian noise can be injected into the input expert ratings S to enhance the model's robustness to small perturbations in the expert ratings and prevent the model from over-relying on small numerical differences in certain expert scores. The specific formula is as follows:
[0045] in, For the score after adding noise, For configurable hyperparameters, when At that time, it degenerates into routine training without noise.
[0046] The formula for feature splicing in this embodiment is:
[0047] in, It is a combination feature. It is a high-dimensional feature mapped from the expert rating (the feature dimension can be 32).
[0048] The formula for calculating the query vector in this embodiment is:
[0049] Where Q is the query vector. It is a multilayer perceptron used for query vector computation. In multi-head attention scenarios, the query neighbor Q can be... Where B is the batch size, H is the number of attention heads, and d is the dimension of each attention head.
[0050] The formula for calculating attention weight in this embodiment is as follows:
[0051]
[0052] in, It is the calculated initial attention value. It is a normalization function. It is attention weight.
[0053] Understandably, since the query vector is generated by concatenating the text semantic vector and the expert rating vector and then passing it through a bottleneck-type multilayer perceptron, the query vector can simultaneously encode the semantic content of the generated text and the overall distribution pattern of the current expert ratings. Thus, when calculating attention weights, the model can dynamically adjust its dependence on different experts based on the text content and the distribution of expert ratings.
[0054] Furthermore, this implementation adopts a bottleneck-type multilayer perceptron structure, whose implicit dimensionality compression mechanism forces the model to focus on the most relevant feature subset in the combined vector, reducing noise interference; thereby improving the expressive efficiency and generalization ability of the query vector, making the attention weight calculated based on the query vector and the expert key matrix more accurate and reliable, and ultimately enhancing the ability of the scoring fusion model to fuse expert scores.
[0055] In one feasible implementation, the attention weights include weight values corresponding to each of the expert scores, and the calibration parameters include scaling factors and bias parameters. A further implementation of calculating the fused score based on the attention weights, the expert scores, and the preset calibration parameters can also be: The expert score is multiplied by the scaling factor, and the product is added to the bias parameter to obtain the calibration score value corresponding to each expert score. Each calibration score value is multiplied by the corresponding weight value to obtain multiple weighted score values. The sum of the multiple weighted score values is calculated to obtain the fusion score.
[0056] It should be noted that the scaling factor refers to a learnable or preset parameter used for linear scaling of expert scores, and the bias parameter refers to a learnable or preset parameter used for translation correction of expert scores. The calibrated score value refers to the corrected value obtained after linearly transforming the original expert scores using the scaling factor and bias parameter; it is used to eliminate inconsistencies caused by individual expert scoring habits and align the weighting of different experts. The weighted score value refers to the intermediate result obtained by multiplying each calibrated score value by its corresponding weight value, reflecting the expert's contribution to the final fused score after calibration.
[0057] The formula for calculating the calibration score in this embodiment is:
[0058] Where V is the calculated calibration score, and S is the original score. It is a scaling factor. It is a bias parameter.
[0059] The formula for calculating the fusion score is:
[0060] in, It is a fusion score. It is a linear layer.
[0061] It is understandable that this implementation method introduces scaling factors and bias parameters to linearly calibrate the original expert scores during the fusion process. This can effectively alleviate the systematic bias caused by differences in scoring habits among different experts, thereby making the calibrated scores more consistent in a distribution space, improving the accuracy of expert score distribution learning, and thus improving the accuracy of score fusion.
[0062] Furthermore, the calibration score value in this embodiment is multiplied and summed with the weight value generated by the attention mechanism, so that the final fusion score not only eliminates individual expert bias, but also adaptively allocates expert weights according to the semantic features and score distribution of the current training text sample, thereby significantly improving the accuracy of the fusion score while preserving the diversity of expert judgment.
[0063] In an optional implementation, the specific implementation prior to the step of inputting the combined vector into a preset bottleneck multilayer perceptron to obtain the query vector may also be: Obtain the prompt word that corresponds to both the first text sample and the second text sample, input the prompt word into the pre-trained language model to obtain the prompt word semantic vector, perform gating modulation on the combined vector based on the prompt word semantic vector to obtain the modulated combined vector, and input the modulated combined vector into the bottleneck multilayer perceptron to obtain the query vector.
[0064] It should be noted that the prompt word semantic vector refers to the context-independent or pooled semantic representation vector of the prompt word extracted after inputting it into the same pre-trained language model used for generating the text. This vector is used to characterize the semantic goal or constraints of the current generation task. Gated modulation refers to a mechanism that dynamically generates gating signals (such as weight vectors activated by sigmoid) based on the prompt word semantic vector and applies them element-wise to the combined vector. This is used to suppress or enhance feature dimensions in the combined vector that are less relevant to the current prompt word, thereby achieving semantically aligned feature selection. The modulated combined vector refers to the combined vector obtained after gating modulation driven by the prompt word semantic vector, whose feature distribution is guided in a direction consistent with the semantics of the current prompt word.
[0065] Understandably, since the scenario in this application explicitly limits the first text sample and the second text sample to have the same prompt words, and traditional methods only focus on a single text and its score when generating query vectors, ignoring the constraint that the same prompt should have a consistent scoring context, this embodiment introduces prompt word semantic vectors to perform gating modulation on the combined vectors, so that the query vectors are automatically filtered out from semantic noise that is not related to the current prompt when they are generated, and the parts related to the prompt task are strengthened, thereby improving the comparability of attention weights between different texts under the same prompt.
[0066] Furthermore, since the query vector is already constrained by the prompt words, the fused score difference can more accurately reflect the relative quality differences of the text under the same task objective, without being affected by score drift caused by irrelevant semantic interference. This makes the gradient signal of the ranking loss purer, accelerates model convergence, and further improves the accuracy of the score fusion model.
[0067] In an optional implementation, the specific implementation method before gating and modulating the combined vector based on the semantic vector of the prompt word can also be: Calculate the cosine similarity between the text semantic vector of the first text sample and the text semantic vector of the second text sample to obtain an intra-prompt semantic consistency score; compare the intra-prompt semantic consistency score with a preset threshold; if the intra-prompt semantic consistency score is lower than the preset threshold, apply a semantic enhancement operation to the prompt word semantic vector to obtain an enhanced prompt word semantic vector; generate the gating signal based on the enhanced prompt word semantic vector to perform gating modulation on the combined vector.
[0068] It should be noted that the semantic consistency score within the prompt refers to the cosine similarity between the semantic vectors of the first and second text samples generated under the same prompt word, used to quantify the degree of consistency between them in semantic content; a high score indicates that both texts follow the prompt instructions well, while a low score may indicate that at least one text deviates from the task objective. The preset threshold refers to a cosine similarity critical value set manually or determined through validation set tuning, used to determine whether the current sample pair meets the basic prompt consistency requirements. Semantic enhancement operation refers to the operation of strengthening the semantic vector of the original prompt word when semantic inconsistency is detected in the sample pair. Specifically, this operation can be a weighted superposition of the prompt word with itself or feature sharpening through a lightweight residual module to enhance its dominance in gating modulation, thereby more strongly constraining subsequent query vectors to focus on the core semantics of the prompt.
[0069] It is understood that this embodiment uses cosine similarity to determine the semantic similarity between the first text sample and the second text sample. When the two texts are distorted due to semantic deviation, the fusion score difference is made to more accurately reflect the relative quality under the same task constraints, thereby significantly improving the robustness of the query vector under noisy samples.
[0070] The test results of the isomorphic expert model in this embodiment are shown in the table below:
[0071] The test results of the heterogeneous expert model in this embodiment are shown in the table below:
[0072] The "Method" column in the table represents various models. Mean, UWO, MIN, and MAX in the table are comparisons of conventional algorithms. UWO, however, is a weighted average based on variance uncertainty that fuses scores from multiple experts. Test results show that in pairwise preference discrimination tasks, the AttentionPool in this embodiment achieves higher scoring accuracy than traditional strategies, regardless of whether the scenarios are homogeneous or heterogeneous.
[0073] This demonstrates that the model can dynamically determine which experts are more trustworthy based on the semantic features of the input text. Compared to the linear Mean / UWO, the non-linear layer of AttentionPool (MLP + Attention) can capture more complex expert combination patterns, thus making more accurate judgments on difficult samples. Especially in heterogeneous scenarios, even if there are experts with extremely poor performance (such as EXPERT4 with only 44.30%), AttentionPool can still accurately identify and reduce their weights through the semantic awareness mechanism, ultimately achieving a high accuracy of 68.40%, demonstrating extremely strong anti-interference ability.
[0074] Furthermore, this embodiment also loads a dedicated evaluation dataset containing 1000 prompts, each prompt corresponding to multiple candidate responses (approximately 6150 data points in total). The test employs an unbiased estimator method to simulate different sampling sizes N (N... Best-of-N results were achieved using the benchmark Gold Reward Model ({4, 16, 64, 128}). The selected responses were scored using a benchmark Gold Reward Model, and the average Gold Score was calculated. Higher scores indicate better generation quality. Test results for the isomorphic expert model are referenced. Figure 4 The test results of the heterogeneous expert model are referenced. Figure 5 .
[0075] from Figure 4 As can be seen, in homogeneous expert scenarios, the curves of the baseline methods (Mean / UWO) are relatively close because the differences between experts are small. However, the AttentionPool in this embodiment still maintains a significant lead, especially after N>16, the gap gradually widens. This indicates that even with highly similar expert opinions, this software can still uncover subtle differences in strengths and weaknesses through semantic perception. In heterogeneous scenarios, due to the presence of weak experts, the performance of simple averaging strategies (Mean Ensemble) and worst-case (Min) strategies is significantly hampered. In contrast, AttentionPool demonstrates extremely strong robustness, significantly outperforming conventional algorithms, indicating that the model successfully achieves "removing weak experts and retaining strong ones."
[0076] In summary, this embodiment obtains the text features of the generated text and multiple target expert scores of the generated text, inputs the text features and the target expert scores into a preset scoring fusion model to obtain the final score. The scoring fusion model is trained based on training text samples and attention weights. The attention weights are calculated based on query vectors and expert key matrices. The query vectors are determined based on the score distribution of the text features and the target expert scores. The expert key matrix is a matrix composed of learnable key vectors corresponding to multiple experts.
[0077] To address the evaluation blind spots inherent in current single-reward models, and the problem that ensemble methods, which calculate final scores based on fixed rules or statistics, are prone to being dominated by experts lacking expertise in specific domains, leading to significant scoring bias, this embodiment trains a model using an attention mechanism calculated based on query vectors and expert key matrices. The trained model is then used for scoring, thus reducing scoring bias. Specifically, this embodiment does not use a single reward model for scoring but rather fuses multi-objective expert scores, effectively avoiding the evaluation blind spots inherent in single-reward models. Furthermore, the attention weights in this embodiment are determined by the query vector, composed of text features and the distribution of target expert scores, and the expert key matrix, composed of learnable key vectors from experts. During model training using attention weights and training text samples, the model learns the relationships between scores, expert key vectors, text features, and score distribution, adaptively adjusting the expert key vectors. In other words, the final score in this embodiment is determined dynamically based on text features and score distribution, avoiding calculations based on fixed rules or statistics. Therefore, overall, this embodiment reduces scoring bias.
[0078] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 6 The loss function includes a ranking loss function, a difference calibration loss function, and a surrogate mean regularization loss function. The step of adjusting the parameters in the preset training model and the learnable key vector based on the sample labels of the training text samples, the expert scores, the fused scores, the preset loss function, and the preset hyperparameters to obtain the scoring fusion model further includes steps A10-A50: Step A10: Calculate the ranking loss of the model to be trained based on the fusion score, the hyperparameters, and the ranking loss function; It's important to note that the ranking loss function measures the difference in ranking consistency between the fused score and the sample labels, aiming to make the model's ranking order for different texts as consistent as possible with the order of the true labels. The difference calibration loss function constrains the absolute score differences between the fused score and the expert score, or between the fused score and the sample labels, aiming to improve the accuracy of the scores on a numerical scale. The surrogate mean regularization loss function is a regularization term that constrains the expected value of the fused score (or the surrogate mean) to approach a prior target (such as the expert score mean or the label mean) to prevent the overall model output from shifting and enhance stability. The ranking loss is the specific loss value calculated by the ranking loss function based on the fused score, sample labels, and hyperparameters, used to guide the model in optimizing its ranking performance.
[0079] Understandably, since the ranking loss is calculated based on the consistency between the fused score and the sample label at the ranking level, and is combined with hyperparameters for weighted control, the model not only focuses on the absolute numerical accuracy of the score during training, but also pays more attention to whether the relative order of quality between different texts conforms to human judgment, thereby effectively improving the discrimination ability of the score fusion model in practical application scenarios.
[0080] Furthermore, since the ranking loss is part of the total loss and participates in parameter updates, it can guide the learnable key vector and other model parameters to optimize in the direction of improving ranking consistency. This allows the allocation of attention weights to serve not only numerical fitting but also the structured ranking objective, further enhancing the practicality of the model.
[0081] In one feasible implementation, the training text samples include a first text sample and a second text sample, wherein the prompt words corresponding to the first text sample and the second text sample are the same, and the fusion score includes a first fusion score of the first text sample and a second fusion score of the second text sample. A further implementation of calculating the ranking loss of the model to be trained based on the fusion score, the hyperparameters, and the ranking loss function may be: Calculate the difference between the first fusion score and the second fusion score to obtain the fusion score difference; The ranking loss of the model to be trained is calculated based on the fusion score difference, the hyperparameters, and the ranking loss function.
[0082] It should be noted that the first text sample refers to a generated text instance in the training set corresponding to a specific prompt word. The second text sample refers to another generated text instance in the training set that shares the same prompt word as the first text sample; these are typically used to form comparison pairs to learn relative quality ranking. A prompt word refers to the instruction or context input to the text generation system, used to guide the generation of text with specific content. Different texts generated under the same prompt word can be used to evaluate the diversity or quality differences of the model's output.
[0083] The first fusion score refers to the fusion score calculated by the scoring fusion model for the first text sample. The second fusion score refers to the fusion score calculated by the scoring fusion model for the second text sample. The fusion score difference refers to the numerical difference between the first and second fusion scores, used to reflect the relative merits of the two texts with the same prompt under the model's scoring.
[0084] The ranking loss function in this embodiment is:
[0085] in, This is the ranking loss, where E is the expected value, and m and t are preset hyperparameters. and These are the first fusion score of the first text sample and the second fusion score of the second text sample, respectively.
[0086] Understandably, since the ranking loss is calculated based on the difference in fused scores between two text samples with the same prompt word, this implementation method enables the model to focus on learning which text is better under the same generation conditions by constructing a pairwise comparison learning objective, thereby effectively improving the model's ability to judge subtle quality differences.
[0087] Step A20: Calculate the difference calibration loss of the model to be trained based on the sample labels, the fusion score, and the difference calibration loss function; Understandably, relying solely on ranking loss might lead to a model that, while able to determine which response is better, lacks a reasonable scale for the differences in output scores, thus affecting the stability of downstream reinforcement learning or ranking systems. Since difference calibration loss directly measures the absolute error between the fused score and the sample label, and is quantified through the difference calibration loss function, the model, during optimization, not only focuses on the relative ranking between texts but also considers the accuracy of the scoring results in specific numerical values.
[0088] In one feasible implementation, the sample labels include a first text label for a first text sample and a second text label for a second text sample. A further implementation of calculating the difference calibration loss of the model to be trained based on the sample labels, the fusion score, and the difference calibration loss function can also be: Calculate the first label mean and standard deviation of the first text label, and the second label mean and standard deviation of the second text label, respectively. Based on the first label mean and standard deviation, standardize the first label to obtain a first standardized label. Based on the second label mean and standard deviation, standardize the second label to obtain a second standardized label. Calculate the difference between the first standardized label and the second standardized label to obtain a standardized label difference. Based on the standardized label difference, the fusion score difference, and the difference calibration loss function, calculate the difference calibration loss of the model to be trained.
[0089] It should be noted that the first sample label and the second sample label in this embodiment can be human labels or gold label labels. Human labels refer to the real scores or quality labels given by human annotators, while gold label labels refer to the reference scores or labels automatically generated by the preset large language model.
[0090] The standardized calculation formula in this embodiment is:
[0091] in, It is a standardized label. It is the average of the labels. It is the standard deviation of the label.
[0092] The difference loss function in this embodiment is:
[0093] in, and These are the supervision labels representing the two responses corresponding to the same prompt word. They can be human scores (human labels) or scores given by a pre-selected benchmark reward model (gold standard labels). It is the differential calibration loss.
[0094] Understandably, since the difference calibration loss introduces both the standardized label difference and the fusion score difference, this loss does not force the predicted difference to approach zero, but rather makes the difference output by the fusion model consistent with the true preference strength in scale, thereby ensuring the correctness of the ranking while avoiding excessive compression or distortion of the output score.
[0095] Step A30: Calculate the agent mean regularization loss of the model to be trained based on the expert score, the fusion score, and the agent mean regularization loss function. It should be noted that, in this embodiment, before calculating the proxy mean regularization term, the mean of each expert score is first calculated and standardized. The formula for calculating the mean is:
[0096] Where N is the number of ratings, It is the nth rating. It is the average score.
[0097] The standardized calculation formula is as follows:
[0098] in, It is the standardized mean score.
[0099] The proxy mean regularization loss function in this embodiment is:
[0100] in, It is a fusion score. It is a loss due to proxy regularization. It is the standardized mean score.
[0101] It is understood that the surrogate mean regularization term in this implementation is introduced only as a weak constraint, and its weight is significantly smaller than that of the ranking loss and the difference calibration loss. This regularization term is not used to replace the attention fusion mechanism, but rather to suppress the overall scale drift of the fusion model output during training, avoiding excessive conservatism or numerical divergence in the early stages of the model. Furthermore, since the surrogate mean regularization loss does not require sample labels and relies only on expert ratings, it can still play an effective role in partially labeled or weakly supervised scenarios.
[0102] Step A40: Calculate the total loss based on the ranking loss, the difference calibration loss, the proxy mean regularization loss, and the preset weight hyperparameters; It should be noted that weight hyperparameters refer to configurable coefficients preset during training to adjust the contribution ratio of ranking loss, difference calibration loss, and surrogate mean regularization loss, and are used to balance different learning objectives in multi-objective optimization.
[0103] The formula for calculating the total loss in this embodiment is:
[0104] Where L is the total loss, , , For weight hyperparameters.
[0105] It is understandable that in this embodiment, the surrogate mean regularization loss complements the ranking loss and the difference calibration loss. The ranking loss focuses on relative order, the difference calibration loss focuses on absolute values, and the surrogate mean regularization loss ensures the consistency of the global distribution. This embodiment obtains the total loss by linearly combining the ranking loss, difference calibration loss, and surrogate mean regularization loss using weight hyperparameters. This allows the model to flexibly adjust the emphasis on different optimization objectives during training according to task requirements. Thus, while maintaining ranking discrimination ability, it also considers the absolute accuracy of the score and the rationality of the global distribution, improving the generalization ability of the scoring fusion model and its practicality in real-world applications.
[0106] Step A50: Based on the total loss, adjust the parameters in the model to be trained and the learnable key vector to obtain the scoring fusion model.
[0107] Understandably, since the total loss integrates supervision signals from three dimensions—ranking consistency, numerical calibration accuracy, and mean distribution stability—and uses these to uniformly guide parameter updates, the parameters in the model to be trained and the learnable key vectors adapt to multi-objective constraints synchronously during the optimization process, thus avoiding overfitting or bias amplification problems that may be caused by single-objective optimization.
[0108] Furthermore, this embodiment uses the learnable key vector as the core component of the expert's personalized representation, and updates it together with other model parameters under the total loss. Its learning process is not only affected by its own score fitting, but also by the ranking and regularization terms, so that each expert's key vector can not only reflect its scoring habits, but also play a more reasonable discriminative role in score fusion, ultimately improving the accuracy of the score fusion model when facing newly generated text.
[0109] In summary, this embodiment constructs training pairs of first and second text samples, obtains the first sample label of the first text sample and the second sample label of the second text sample, calculates the ranking loss based on the relationship between the fusion score difference and the label ranking, the difference calibration loss based on the difference between the standardized first and second sample labels and the fusion score difference, and the surrogate mean regularization loss based on the expert score mean and the fusion score deviation, and finally, obtains the total loss by weighted summation through preset weight hyperparameters, and uses this to jointly optimize all parameters and learnable key vectors of the model to be trained, ultimately obtaining the score fusion model.
[0110] This embodiment standardizes and aligns the first and second sample labels corresponding to two samples under the same prompt word. It also designs three losses: fusion ranking, numerical calibration, and distribution regularization. This allows the model to learn the relative order of expert ratings during training, calibrate the absolute rating scale, and maintain the global stability of the output distribution.
[0111] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the text scoring fusion method for generating large models in this application. Any simple transformations based on this technical concept are within the protection scope of this application.
[0112] This application provides a large model-generated text scoring fusion device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the large model-generated text scoring fusion method in Embodiment 1 above.
[0113] The following is for reference. Figure 7This document illustrates a structural schematic diagram of a large model-generated text scoring fusion device suitable for implementing embodiments of this application. The large model-generated text scoring fusion device in embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, tablets, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The large model-generated text scoring fusion device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0114] like Figure 7 As shown, the large model generation text scoring fusion device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the large model generation text scoring fusion device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the large model generation text scoring fusion device to communicate wirelessly or wiredly with other devices to exchange data. Although a large model generation text scoring fusion device with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.
[0115] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0116] The large model-generated text scoring fusion device provided in this application, employing the large model-generated text scoring fusion method described in the above embodiments, can solve the technical problem of large final score deviation. Compared with the prior art, the beneficial effects of the large model-generated text scoring fusion device provided in this application are the same as those of the large model-generated text scoring fusion method described in the above embodiments, and other technical features of this large model-generated text scoring fusion device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0117] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0118] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0119] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the large model-generated text scoring fusion method described in the above embodiments.
[0120] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0121] The aforementioned computer-readable storage medium may be included in the large model-generated text scoring fusion device; or it may exist independently and not be assembled into the large model-generated text scoring fusion device.
[0122] The aforementioned computer-readable storage medium carries one or more programs, which, when executed by the large model-generated text scoring fusion device, cause the large model-generated text scoring fusion device to execute the aforementioned large model-generated text scoring fusion method.
[0123] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0124] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0125] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0126] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described large model-generated text scoring fusion method, which can solve the technical problem of large final score deviation. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the large model-generated text scoring fusion method provided in the above embodiments, and will not be repeated here.
[0127] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the large model generation text scoring fusion method described above.
[0128] The computer program product provided in this application can solve the technical problem of large deviation in the final score. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the large model-generated text score fusion method provided in the above embodiments, and will not be repeated here.
[0129] All user-related data involved in this application was obtained with the user's permission or consent, as per [reference]. Figure 8 In other words, when this application is applied to a specific product or technology, user permission is required to acquire and process the relevant data, and the processing of the relevant data must comply with the relevant laws, regulations and regulatory standards of the relevant countries and regions.
[0130] The above description is only a part of the embodiments of this application and does not limit the scope of protection of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A large model generated text score fusion method, characterized in that, The method includes: Obtain the text features of the generated text and multiple target expert scores for the generated text; The text features and the target expert score are input into a preset scoring fusion model to obtain the final score. The scoring fusion model is trained based on training text samples and attention weights. The attention weights are calculated based on query vectors and expert key matrices. The query vectors are determined based on the score distribution of the text features and the target expert score. The expert key matrix is a matrix composed of learnable key vectors corresponding to multiple experts.
2. The method of claim 1, wherein, Before the step of inputting the text features and the target expert score into the preset scoring fusion model, the method further includes: Obtain the training text sample and multiple expert scores for the training text sample; The attention weights are calculated based on the training text samples, the expert scores, and the expert key matrix. Based on the attention weights, the expert scores, and the preset calibration parameters, a fusion score is calculated after fusing the multiple expert scores. Based on the sample labels of the training text samples, the expert scores, the fusion scores, the preset loss function, and the preset hyperparameters, the parameters in the preset model to be trained and the learnable key vectors are adjusted to obtain the scoring fusion model.
3. The method of claim 2, wherein, The step of calculating the attention weights based on the training text samples, the expert scores, and the expert key matrix includes: The training text samples are input into a preset pre-trained language model to obtain text semantic vectors; The expert scores are input into a preset score encoder to encode the expert scores and obtain an expert score vector. The text semantic vector and the expert rating vector are concatenated to obtain a combined vector; The combined vector is input into a preset bottleneck-type multilayer perceptron to obtain the query vector; The attention weights are calculated based on the query vector and the expert key matrix.
4. The method of claim 2, wherein, The attention weights include weight values corresponding to each of the expert scores, and the calibration parameters include scaling factors and bias parameters. The step of calculating the fused score after fusing the multiple expert scores based on the attention weights, the expert scores, and the preset calibration parameters includes: Multiply the expert score by the scaling factor, and add the bias parameter to the product to obtain the calibration score value corresponding to each expert score; Each calibration score value is multiplied by its corresponding weight value to obtain multiple weighted score values; The sum of the multiple weighted score values is calculated to obtain the fusion score.
5. The method of claim 2, wherein, The loss function includes a ranking loss function, a difference calibration loss function, and a surrogate mean regularization loss function. The step of adjusting the parameters in the preset model to be trained and the learnable key vector based on the sample labels of the training text samples, the expert scores, the fused scores, the preset loss function, and the preset hyperparameters to obtain the scoring fusion model includes: Based on the fusion score, the hyperparameters, and the ranking loss function, the ranking loss of the model to be trained is calculated; Based on the sample labels, the fusion score, and the difference calibration loss function, the difference calibration loss of the model to be trained is calculated; Based on the expert score, the fusion score, and the agent mean regularization loss function, the agent mean regularization loss of the model to be trained is calculated. The total loss is calculated based on the ranking loss, the difference calibration loss, the proxy mean regularization loss, and the preset weight hyperparameters. Based on the total loss, the parameters in the model to be trained and the learnable key vector are adjusted to obtain the scoring fusion model.
6. The method of claim 5, wherein, The training text samples include a first text sample and a second text sample, wherein the prompt words corresponding to the first text sample and the second text sample are the same. The fusion score includes a first fusion score of the first text sample and a second fusion score of the second text sample. The step of calculating the ranking loss of the model to be trained based on the fusion score, the hyperparameters, and the ranking loss function includes: Calculate the difference between the first fusion score and the second fusion score to obtain the fusion score difference; The ranking loss of the model to be trained is calculated based on the fusion score difference, the hyperparameters, and the ranking loss function.
7. The method of claim 6, wherein, The sample labels include a first text label for a first text sample and a second text label for a second text sample. The step of calculating the difference calibration loss of the model to be trained based on the sample labels, the fusion score, and the difference calibration loss function includes: Calculate the first label mean and standard deviation of the first text label, and the second label mean and standard deviation of the second text label, respectively; Based on the mean and standard deviation of the first label, the first label is standardized to obtain the first standardized label; Based on the mean and standard deviation of the second label, the second label is standardized to obtain the second standardized label; Calculate the difference between the first standardized label and the second standardized label to obtain the standardized label difference; The differential calibration loss of the model to be trained is calculated based on the standardized label difference, the fusion score difference, and the differential calibration loss function.
8. A large model generated text score fusion device, characterized by, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the large model-generated text scoring fusion method as described in any one of claims 1 to 7.
9. A storage medium, characterized by The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the large model generating text scoring fusion method as described in any one of claims 1 to 7.
10. A computer program product, characterised in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the large model-generated text scoring fusion method as described in any one of claims 1 to 7.