Method for training large model, interaction method based on large model and intelligent agent

By receiving initial and perturbed training samples to generate sample label distributions and perturbation label distributions, determining the uncertainty intensity, and training large models, the illusion problem caused by data quality issues in large models is solved, output matching degree and robustness are improved, and semantic understanding ability is enhanced.

CN121638458APending Publication Date: 2026-03-10BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Large models are prone to degradation in output generative content quality when processing multimodal data due to input data quality issues. This is especially true in cases of image semantic perturbation, which can lead to model illusions and affect their usability and compliance in scenarios such as healthcare. Existing training methods are unable to effectively reduce model illusions, resulting in insufficient robustness and generalization ability.

Method used

By receiving initial training samples and perturbed training samples, a large model is used to generate sample label distribution and perturbation label distribution, determine the uncertainty intensity, and fuse the uncertainty intensity and label response text differences to train the large model, thereby improving its ability to suppress data perturbation factors.

Benefits of technology

It improves the output matching accuracy and robustness of large models when performing target tasks, enhances semantic understanding capabilities, and improves usability and generalization ability in the reasoning process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121638458A_ABST
    Figure CN121638458A_ABST
Patent Text Reader

Abstract

The invention provides a method for training a large model, an interaction method based on the large model and an intelligent agent, and relates to the technical fields of large models, automatic driving, intelligent medical treatment, intelligent transportation, computer vision and the like. The method for training the large model comprises the steps that training samples and label reply texts are received, the training samples represent demand intentions of sample objects, and the training samples comprise initial training samples and disturbance training samples for performing disturbance determination on the initial training samples; executing a target task by using the large model according to the initial training sample and the disturbance training sample to obtain sample mark distribution and disturbance mark distribution, the sample mark distribution and the disturbance mark distribution representing a selection probability for a plurality of candidate text marks; determining the uncertainty intensity based on the difference between the sample mark distribution and the disturbance mark distribution; and training the large model by fusing the uncertainty intensity and the difference between the label reply text and the sample reply text to obtain a trained large model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of artificial intelligence, and particularly relates to the technical fields of large models, automatic driving, intelligent medical treatment, intelligent transportation, computer vision, etc. BACKGROUND

[0002] With the rapid development of artificial intelligence technology, large models can be used to generate information content for meeting user needs by processing multi-modal data such as images, videos, and texts. For example, a large model can be used to process video data to generate video summary text related to the video content. SUMMARY

[0003] The present disclosure provides a method for training a large model, a large model-based interaction method, an apparatus, an electronic device, and a storage medium.

[0004] According to an aspect of the present disclosure, a method for training a large model is provided, including: receiving a training sample and a label reply text, the training sample representing a demand intention of a sample object, the training sample including an initial training sample and a perturbed training sample determined by perturbing the initial training sample, and the label reply text matching the demand intention; using the large model to perform a target task according to the initial training sample and the perturbed training sample to obtain a sample label distribution and a perturbed label distribution, the sample label distribution and the perturbed label distribution representing selection probabilities of a plurality of candidate text labels; determining an uncertainty strength based on a difference between the sample label distribution and the perturbed label distribution, the uncertainty strength representing a degree of hallucination of the candidate text labels generated by the large model during the performance of the target task; training the large model by fusing the uncertainty strength and a difference between the label reply text and a sample reply text to obtain a trained large model, the sample reply text being determined based on the sample label distribution.

[0005] According to another aspect of the present disclosure, a large model-based interaction method is provided, including: receiving demand information of a target object and a target image, the demand information representing a demand intention of the target object for the target image; using a large model to perform a target task according to the demand information and the target image to obtain a reply text matching the demand intention, wherein the large model is determined according to the method for training the large model provided in an embodiment of the present disclosure; and pushing the reply text to the target object.

[0006] According to another aspect of the present disclosure, an apparatus for training a large model is provided, comprising: a first receiving module configured to receive training samples and label reply texts, the training samples representing a demand intention of a sample object, the training samples comprising initial training samples and perturbed training samples determined by perturbing the initial training samples, and the label reply texts matching the demand intention; a first task execution module configured to execute a target task based on the initial training samples and the perturbed training samples using a large model to obtain sample label distributions and perturbed label distributions, the sample label distributions and the perturbed label distributions representing selection probabilities of candidate text labels; a first determining module configured to determine an uncertainty strength based on a difference between the sample label distributions and the perturbed label distributions, the uncertainty strength representing a degree of hallucination of the candidate text labels generated by the large model during execution of the target task; and a training module configured to train the large model by fusing the uncertainty strength and a difference between the label reply texts and sample reply texts determined based on the sample label distributions, to obtain a trained large model.

[0007] According to another aspect of the present disclosure, an apparatus for interacting based on a large model is provided, comprising: a second receiving module configured to receive demand information of a target object and a target image, the demand information representing a demand intention of the target object for the target image; a second task execution module configured to execute a target task based on the demand information and the target image using a large model to obtain a reply text matching the demand intention, wherein the large model is determined according to a method for training a large model provided by an embodiment of the present disclosure; and a pushing module configured to push the reply text to the target object.

[0008] According to another aspect of the present disclosure, an artificial intelligence agent is provided, comprising: an input module configured to receive input information; a processing module configured to determine a target task based on the input information received by the input module, determine a large model based on the target task, and obtain output information by calling a method for training a large model provided by an embodiment of the present disclosure, a method for interacting based on a large model, based on the large model; and an output module configured to output the output information obtained by the processing module.

[0009] According to another aspect of the present disclosure, an electronic device is provided, comprising: 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, and the instructions are executed by the at least one processor to enable the at least one processor to perform a method provided by an embodiment of the present disclosure.

[0010] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to perform a method provided by an embodiment of the present disclosure.

[0011] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method provided according to embodiments of this disclosure.

[0012] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0013] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0014] Figure 1 The illustration schematically depicts an exemplary system architecture for methods and apparatuses for training large models according to embodiments of the present disclosure.

[0015] Figure 2 A flowchart illustrating a method for training a large model according to an embodiment of the present disclosure is shown schematically.

[0016] Figure 3 The schematic diagram illustrates the principle of sample label distribution and perturbation label distribution according to embodiments of the present disclosure.

[0017] Figure 4 A flowchart illustrating a large-model-based interaction method according to an embodiment of the present disclosure is shown schematically.

[0018] Figure 5 A block diagram of an apparatus for training a large model according to an embodiment of the present disclosure is shown schematically.

[0019] Figure 6 A block diagram of an interactive device for a large model is shown schematically according to an embodiment of the present disclosure.

[0020] Figure 7 A schematic block diagram of an artificial intelligence agent according to an embodiment of the present disclosure is shown.

[0021] Figure 8 A schematic block diagram of an example electronic device 800 is shown, illustrating a method for training a large model and an interaction method based on a large model that can be used to implement embodiments of the present disclosure. Detailed Implementation

[0022] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0023] In the technical solution disclosed herein, the acquisition, storage, and application of user personal information comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and there is no violation of public order and good morals.

[0024] The inventors discovered that large models, when performing generative tasks based on multimodal data such as images and text, are prone to a decline in the quality of their output generative content due to factors such as the quality of the input data. For example, when the input image contains semantic perturbations such as occlusion, brightness variations, and viewpoint shifts, large models are prone to "model illusions" regarding the semantic details of the input image, such as texture attributes and object types. This manifests as a high sensitivity to noise perturbations in the input information and insufficient reliance on visual facts. Consequently, the text output by the large model exhibits model illusions regarding image semantics related to perturbations, reducing text quality and affecting the usability and compliance of large models in healthcare and other related scenarios. Furthermore, training methods for large models struggle to accurately reduce these model illusions, resulting in insufficient robustness and generalization ability during inference, and making the model's performance susceptible to degradation due to the quality of the input data.

[0025] Embodiments of this disclosure provide a method for training a large model, a large model-based interaction method, an apparatus, an electronic device, and a storage medium. The method for training a large model includes: receiving training samples and labeled response text, wherein the training samples represent the demand intent of a sample object, the training samples include an initial training sample and a perturbed training sample determined by perturbing the initial training sample, and the labeled response text matches the demand intent; using the large model to perform a target task based on the initial training samples and the perturbed training samples, obtaining a sample label distribution and a perturbed label distribution, the sample label distribution and the perturbed label distribution representing the selection probability for multiple candidate text labels; determining an uncertainty intensity based on the difference between the sample label distribution and the perturbed label distribution, the uncertainty intensity representing the degree of illusion generated by the large model regarding candidate text labels during the execution of the target task; and training the large model by fusing the uncertainty intensity and the difference between the labeled response text and the sample response text, obtaining a trained large model, wherein the sample response text is determined based on the sample label distribution.

[0026] According to embodiments of this disclosure, the uncertainty intensity is determined based on the difference between the sample label distribution and the perturbation label distribution to represent the degree of illusion generated by the large model for the initial training samples and the perturbation-determined training samples. By fusing the uncertainty intensity and the difference between the labeled text and the sample response text to train the large model, the large model can more fully understand the illusion generated by the selection probability of candidate text labels during the execution of the target task. Based on the training process, the large model learns the ability to suppress perturbation factors in the input data. This enables the trained large model to suppress model illusions for input data with data quality problems during the execution of the target task, improving the matching degree between the output response text and the target object's needs and the information content of the input information. This enhances the robustness, semantic understanding, and target task execution capabilities of the large model, thereby improving its usability and generalization ability during inference.

[0027] Figure 1 The illustration schematically depicts an exemplary system architecture for methods and apparatuses for training large models according to embodiments of the present disclosure.

[0028] It is important to note that Figure 1 The examples shown are merely examples of system architectures that can be applied to embodiments of this disclosure, to help those skilled in the art understand the technical content of this disclosure, but do not imply that embodiments of this disclosure cannot be used in other devices, systems, environments, or scenarios. For example, in another embodiment, an exemplary system architecture for applying the method and apparatus for training large models may include a terminal device, but the terminal device can implement the method and apparatus for training large models provided by embodiments of this disclosure without interacting with a server.

[0029] like Figure 1 As shown, the system architecture 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0030] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as knowledge reading applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (for example only).

[0031] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0032] Server 105 can be a server that provides various services, such as a backend management server that supports the content browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0033] It should be noted that the method for training a large model provided in this disclosure embodiment can generally be executed by server 105. Correspondingly, the apparatus for training a large model provided in this disclosure embodiment can generally be located in server 105. The method for training a large model provided in this disclosure embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the apparatus for training a large model provided in this disclosure embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.

[0034] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0035] Figure 2 A flowchart illustrating a method for training a large model according to an embodiment of the present disclosure is shown schematically.

[0036] like Figure 2 As shown, the method for training the large model includes operations S210~S240.

[0037] In operation S210, training samples and labeled response text are received.

[0038] In operation S220, the target task is performed using a large model based on the initial training samples and perturbation training samples, resulting in the sample label distribution and the perturbation label distribution.

[0039] In operation S230, the uncertainty intensity is determined based on the difference between the sample label distribution and the perturbation label distribution.

[0040] In operation S240, a large model is trained by fusing the uncertainty intensity and the difference between the labeled response text and the sample response text, resulting in a trained large model.

[0041] According to embodiments of this disclosure, training samples represent the demand intent of the sample object, and training samples can be data of any modality, such as images or text. For example, training samples can be demand text representing the demand intent of the sample object. In some examples, training samples can be multimodal sample data; for example, training samples may include text data and image data, and the training samples represent the demand intent of the sample object for processing image data.

[0042] According to embodiments of this disclosure, the tagged response text matches the demand intent, and the tagged response text can be feedback information responding to the demand intent of the sample object. For example, the training sample can be a sample image and a sample demand text representing vehicle recognition of the sample image. The sample response text can represent the response text obtained by recognizing vehicle attributes such as the location, model, and color of the vehicle in the sample image. For example, the sample response text can be "red sedan".

[0043] According to embodiments of this disclosure, the training samples include initial training samples and perturbed training samples determined by perturbing the initial training samples. In one example, the initial training samples can be multimodal data that meets data quality requirements. For example, the initial training samples can be original images and requirement text that meet image quality requirements. The data quality of the perturbed training samples is lower than that of the initial training samples. The perturbed training samples can be obtained by perturbing the initial training samples, for example. For example, the sample images in the initial training samples can be noise-perturbed to obtain the perturbed training samples; or, for example, the sample requirement text in the initial training samples can be masked to obtain the perturbed training samples.

[0044] It should be noted that the perturbation training sample and the initial training sample represent the same demand intent of the sample object. The labeled response text is associated with both the perturbation training sample and the initial training sample. The embodiments of this disclosure do not limit the specific method of determining the perturbation training sample, as long as the data quality of the perturbation training sample is lower than that of the initial training sample.

[0045] According to embodiments of this disclosure, the large model can be a deep learning model with a large number of parameters, ranging from hundreds of millions to billions. This allows for semantic understanding of data from any modality and the execution of generative tasks based on the large parameter size of the large model, generating response content such as text. The large model involved in these embodiments can be a multimodal large model for processing data from any modality. The large model can process training samples to semantically understand the intent of the sample object and execute target tasks, generating sample response text to satisfy that intent.

[0046] According to embodiments of this disclosure, the large model processes initial training samples and perturbed training samples respectively, outputting a sample label distribution corresponding to the initial training samples and a perturbed label distribution corresponding to the perturbed training samples. The sample label distribution and the perturbed label distribution represent the selection probabilities for multiple candidate text labels. The sample label distribution and the perturbed label distribution can be the probability distribution of the large model output for the labels (tokens) corresponding to the candidate text. For example, the label distribution can be a graph distribution, representing the probability distribution of multiple candidate text labels in a preset vocabulary when the large model generates a token. The candidate text labels can represent candidate text characters in the preset vocabulary, and the sample response text characters output by the large model can be determined based on the selection probabilities corresponding to the multiple candidate text labels. When the multiple sample response text characters are arranged in the order output by the large model, the sample response text output by the large model can be obtained.

[0047] According to embodiments of this disclosure, the sample label distribution represents the sample response text output by the large model when it understands the initial training samples with high data quality to perform the target task, and the perturbation label distribution represents the perturbation response text output by the large model when it understands the perturbed training samples with low data quality to perform the target task. The perturbation label distribution can represent the selection probability of multiple candidate text labels obtained by the large model when it understands the perturbed training samples to perform the target task, given the presence of perturbation factors in the training samples. Therefore, the difference between the sample label distribution and the perturbation label distribution can represent the deviation of the perturbation factors in the perturbed training samples from the selection probability of candidate text labels generated by the large model when performing the target task. Thus, the uncertainty intensity determined based on the difference between the sample label distribution and the perturbation label distribution characterizes the degree of illusion generated by the large model regarding candidate text labels during the execution of the target task.

[0048] It should be noted that the uncertainty intensity can be determined based on the difference in selection probabilities between the sample label distribution and the perturbation label distribution, but it is not limited to this. The uncertainty intensity can also be represented by calculating the distance between the sample label distribution and the perturbation label distribution. The embodiments of this disclosure do not limit the specific method of determining the uncertainty intensity, as long as it can characterize the difference between the sample label distribution and the perturbation label distribution.

[0049] In some embodiments, the sample response text is determined based on the sample label distribution. Training a large model by fusing the uncertainty intensity and the difference between the labeled response text and the sample response text can include using a loss function to process the labeled response text and the sample response text to obtain initial loss information, and using the uncertainty intensity to update the initial loss information to obtain loss information that can represent the degree of model illusion generated by the large model for candidate text labels during the execution of the target task. This loss information can be used to train the large model, enabling it to learn during training to suppress model illusions for target tasks with perturbation factors in the input data, thereby reducing the degree of model illusion for candidate text labels, improving the rationality and robustness of candidate text label selection probabilities, and enhancing the matching degree and text accuracy between the response text and the demand intent, ultimately improving model performance.

[0050] In some embodiments, the sample label distribution and the perturbation label distribution can be selection probability distributions corresponding to the sample response text words in the sample response text and the perturbation text words in the perturbation response text, respectively. For example, the sample response text is "a red car", and the perturbation response text is "a blue toy". The sample label distribution can include multiple ones, and the multiple sample label distributions can be four sample label distributions corresponding to "a", "car", "red", and "car" respectively. Based on the selection probabilities of the candidate text words corresponding to the four sample label distributions, the sample response text words are determined. Correspondingly, the multiple perturbation label distributions can be corresponding to "a", "a", "blue", and "toy" respectively. Thus, the uncertainty intensity corresponding to the sample response text words can be determined based on the difference between the perturbation response text words and the sample response text words. According to the uncertainty intensities corresponding to the multiple sample response text words, it can represent the degree of model hallucination that is likely to occur in the selection probabilities of the candidate texts for multiple positions during the process of the large model performing the target task of outputting the sample response text words corresponding to each position in the sample response text. Furthermore, by fusing the multiple uncertainty intensities and the difference between the sample response text words and the label response text words, the large model can be trained so that the large model can learn to suppress model hallucination according to the uncertainty intensity during the execution of the target task corresponding to each position in the sample response text. Thus, the trained large model can more precisely control the selection probability of the candidate text words corresponding to each position. By suppressing the model hallucination for the input data with perturbation factors during the execution of the target task based on the input data with different data qualities, the accuracy of the selection probability of the candidate text words is improved, thereby improving the accuracy and rationality of the response text and enhancing the model robustness and model performance.

[0051] It should be noted that by training the large model by fusing the uncertainty intensity and the difference between the label response text and the sample response text, the training process for the large model can be performed based on any supervised training or unsupervised training method, as long as the uncertainty intensity, the label response text, and the sample response text can be applied.

[0052] In some embodiments, the initial training sample includes the sample initial image, the perturbation training sample includes the sample perturbation image determined by performing image perturbation on the sample initial image, and the training sample further includes the sample demand information, where the sample demand information represents the demand intention of the sample object for the sample initial image or the sample perturbation image. The sample demand information can be text representing the demand intention of the sample object. For example, the sample initial image can be a landscape image, and the sample demand information can be: "What is the building on the mountain?" The large model can perform the target task on the sample demand information and the sample initial image to generate the sample label distribution, and the sample response text "The temple on the mountain is the famous A building" can be determined according to the sample label distribution.

[0053] Sample requirement information can be associated with both the sample perturbation image and the initial sample image. This allows the large model to perform the target task and output a sample label distribution based on the sample requirement information and the initial sample image, and also allows the large model to perform the target task and output a perturbation label distribution based on the sample requirement information and the sample perturbation image. For example, the sample perturbation image can be obtained by adding noise data to the initial sample image. The large model can generate a perturbation label distribution by performing the target task on the sample requirement information and the sample perturbation image, and determine the perturbation response text "The pavilion on the mountain is a famous building B" based on the perturbation label distribution. The sample label distribution and the perturbation label distribution, each representing the selection probability for candidate text labels, can more precisely represent the likelihood of candidate text label selection obtained by the large model when performing the target task based on the original sample initial image and the perturbation sample perturbed image. Thus, the uncertainty intensity can be used to represent the model illusion generated by the large model when performing image semantic understanding based on perturbed sample images with perturbation factors. Furthermore, by fusing the uncertainty intensity with the difference between the label response text and the sample response text, the large model can be trained to suppress model illusion for input images with perturbation factors, improve the semantic understanding ability and model illusion suppression ability for images of various data qualities, and improve the rationality and accuracy of the subsequent output sample response text.

[0054] In some embodiments, perturbing the initial sample image can include adding noise data to the initial sample image, such as adding Gaussian noise. Alternatively, a perturbed sample image can be obtained by perturbing a portion of the image region in the initial sample image. For example, noise data can be added to the image region in the initial sample image corresponding to the vehicle, building, or other object to be identified to obtain the perturbed sample image. Thus, the degree of model illusion for key regions to be identified in the perturbed sample image can be represented based on the uncertainty intensity corresponding to the sample response text words corresponding to the image regions. This allows the large model to be trained to suppress key image regions in the input image based on the uncertainty intensity, thereby improving the robustness of the large model.

[0055] In some embodiments, the initial training sample includes an initial sample image, and the perturbation training sample includes a perturbation sample image, which is determined by performing at least one of the following first, second, or third operations on the initial sample image.

[0056] In some examples, the first operation represents occlusion of the image region representing the specified object in the initial sample image. For instance, the first operation could be to add image elements such as squares or stripes to the image region or detection box representing the specified object, such as a vehicle or person, in the initial sample image to occlude it. The area of ​​the occluded image region in the perturbed sample image can account for 10%–25% of the area of ​​the initial sample image. Thus, the first operation can cover the core semantic regions representing the specified object in the initial sample image, thereby improving the semantic understanding ability of the large model for input images that occlude the specified object, such as the vehicle body or person's face, and reducing the degree of model illusion regarding the specified object in the input image.

[0057] In some examples, the second operation represents adjusting the texture attributes of the initial sample image. For instance, a color desaturation operation or a color attribute shift operation can be performed on a specified image region in the initial sample image to weaken the color representation of the perturbed sample image, thereby reducing the ability of the large model to recognize the colors in the perturbed sample image. This allows the perturbed sample image to be used as perturbed training samples, enabling the trained large model to more accurately understand input images with color shifts or those taken under poor lighting conditions, and reducing the model's illusion regarding the color texture of the input image representation during the execution of the target task.

[0058] The third operation represents reducing the image resolution of at least one image region in the initial sample image. For example, the third operation could represent applying noise or low-pass filtering to key image regions in the initial sample image, making the boundaries of contours or lines representing a specified object in the perturbed sample image unclear. Alternatively, lossy image compression could be applied to the initial sample image to reduce its overall resolution.

[0059] According to embodiments of this disclosure, by perturbing the initial sample image to generate a perturbed sample image, the visual expressive effect of key image semantics such as the specified object in the initial sample image can be weakened. Thus, by generating a perturbed marker distribution through large model processing containing the perturbed sample image and sample requirement information, the selection probability corresponding to each candidate text marker in the perturbed marker distribution at the corresponding position can represent the task execution capability of the large model for the image region in the perturbed sample image corresponding to the response text character at that position. Furthermore, based on the uncertainty intensity corresponding to each position, the degree of model illusion of the large model for each image region in the perturbed sample image can be quantified in fine granularity, realizing the use of the uncertainty intensity corresponding to each position as an observable illusion degree signal. The large model is trained by quantifying the degree of model illusion, enabling the trained large model to suppress model illusion for input images with low data quality, improving the accuracy of the selection probability of the candidate text marker represented by the output marker distribution, and thus improving the accuracy of the output response text.

[0060] In one embodiment, multiple uncertainty intensities can be obtained based on the following, and a large model can be trained using these multiple uncertainty intensities.

[0061] The large model input training samples include initial training samples p1 and perturbed training samples p2. Initial training sample p1 includes the initial sample image v and sample requirement information q, while perturbed training sample p2 includes the perturbed sample image v' and sample requirement information q. The perturbed sample image is obtained by adding Gaussian noise to the initial sample image. Based on the model parameters corresponding to the current model strategy π of the large model, the initial training samples p1 and perturbed training samples p2 are processed to obtain the initial label distribution of the samples. and perturbation marker distribution Where t represents the time step of the sample response text and sample perturbation text output by the large model, and y1 t and y2 t These represent the sample response text or sample perturbation text output at the position corresponding to the t-th time step, respectively. In this embodiment, the sample label distribution is the same as the initial sample label distribution. . This represents the initial label distribution or perturbed label distribution of samples generated before time step t in the large model.

[0062] In this embodiment, multiple initial sample label distributions and multiple perturbation label distributions are aligned in length so that the initial sample label distribution at each time step can be compared with the perturbation label distribution to determine the uncertainty intensity corresponding to that time step. A preset number T can be used to represent a preset threshold for the number of time steps. If the number of initial sample label distributions in the initial sample label distribution sequence exceeds the preset threshold, the initial sample label distributions exceeding the preset threshold can be masked. Similarly, if the number of perturbation label distributions in the perturbation label distribution sequence exceeds the preset threshold, the perturbation label distributions exceeding the preset threshold can also be masked. This ensures that the multiple initial sample label distributions and multiple perturbation label distributions are aligned in length, allowing the initial sample label distribution and perturbation label distribution at each time step to be compared to generate the uncertainty intensity corresponding to time step t. Therefore, by ensuring that the number of initial sample label distributions and perturbation label distributions is consistent and that the time steps are aligned, the consistency of subsequent loss calculations is improved, avoiding training errors caused by information misalignment or tensor dimension mismatch due to sequence truncation.

[0063] For each time step, the uncertainty intensity corresponding to that position can be generated. For example, the uncertainty intensity corresponding to the t-th time step can be determined based on formula (1). .

[0064] (1).

[0065] Therefore, based on formula (1), the t uncertainty intensities corresponding to each of the t time steps can be determined, resulting in an uncertainty intensity sequence. Multiple uncertainty intensities can represent the cognitive instability of the large model regarding the probability of selecting multiple candidate text tags for the target task at each time step. A higher uncertainty intensity indicates stronger prediction instability of the large model for multiple candidate text tags at that time step, and greater sensitivity of the large model to perturbation factors in the training samples. Thus, the degree of model illusion at that time step can be quantified based on the uncertainty intensity, forming a potential illusion trigger location based on the uncertainty intensity corresponding to the time step.

[0066] In this implementation, the sample response text is determined based on the initial label distribution of the samples. A large model is trained using a reinforcement learning mechanism. The advantage weight (or advantage scaling parameter) of the gradient policy term for training the large model is determined based on the uncertainty intensity corresponding to each time step. Furthermore, by fusing the uncertainty intensity with the difference between the labeled response text and the sample response text, the large model can be trained to improve its ability to suppress model illusions for input images with perturbation factors.

[0067] Figure 3 The schematic diagram illustrates the principle of sample label distribution and perturbation label distribution according to embodiments of the present disclosure.

[0068] like Figure 3 As shown, the large model can output the sample label distribution and perturbation label distribution for each time step based on the initial training samples and perturbed training samples. For example, at the third time step, i.e., time step t=3, the sample label distribution 310 includes the selection probabilities corresponding to multiple candidate text labels in the preset vocabulary 301. Correspondingly, the perturbation label distribution 320 can also include the selection probabilities corresponding to multiple candidate text labels in the preset vocabulary 301. The multiple candidate text labels in the preset vocabulary can be, for example, "This...is...blue...red...car, toy, airplane...", where "..." represents candidate text labels omitted between different candidate text labels.

[0069] At time step t=3, the probability of selecting "blue" in sample label distribution 310 is, for example, 0.3, and the probability of selecting "red" is 0.7. The probability of selecting "blue" in perturbation label distribution 320 is, for example, 0.6, and the probability of selecting "red" is 0.2. The uncertainty intensity 330 corresponding to time step t=3 can be determined based on the difference between sample label distribution 310 and perturbation label distribution 320. Uncertainty intensity 330 represents the difference between sample label distribution 310 and perturbation label distribution 320.

[0070] It should be understood that, at time steps t=1 to n, the sample label distribution and the perturbation label distribution can respectively determine the uncertainty intensity corresponding to that time step. Therefore, loss can be calculated based on the differences between the labeled response text and the sample response text, using multiple uncertainty intensities corresponding to multiple time steps. This yields gradient information for training a large model, facilitating precise adjustments to the model strategy and improving the model's ability to suppress visual illusions related to visual semantic attributes such as color, contour lines, and object categories in images, thereby enhancing the robustness of the large model.

[0071] In some embodiments, performing a target task using a large model based on initial training samples and perturbed training samples may include: processing the initial training samples and perturbed training samples using the large model according to the current model strategy to obtain an initial label distribution and a perturbed label distribution; and fusing the initial label distribution and the perturbed label distribution to obtain a denoised label distribution.

[0072] According to embodiments of this disclosure, the sample label distribution includes at least one of an initial sample label distribution and a denoised sample label distribution. This allows multiple sample response texts to be determined based on at least one of the initial sample label distribution and the denoised sample label distribution. For example, for the same initial training samples, an initial sample response text can be determined based on the initial sample label distribution, and a denoised sample response text can be determined based on the denoised sample label distribution. For multiple initial training samples in a batch, the initial sample response text or the denoised sample response text is sampled using a preset sampling probability to obtain sample response texts. The preset sampling probability can be, for example, a first sampling probability of 0.6 corresponding to the initial sample response text and a second sampling probability of 0.4 corresponding to the denoised sample response text, thereby making the ratio between the number of initial sample response texts and the number of denoised sample response texts in the multiple sample response texts 0.6 / 0.4.

[0073] In some embodiments, the initial sample label distribution and the perturbation label distribution are fused to obtain the sample denoising label distribution. This can include processing the initial sample label distribution and the perturbation label distribution using any type of fusion algorithm, such as the mean algorithm, the weighted fusion algorithm, or the accumulation algorithm. The embodiments of this disclosure do not limit the specific algorithm type for fusing the initial sample label distribution and the perturbation label distribution.

[0074] According to embodiments of this disclosure, the initial label distribution represents the probability of a large model selecting candidate text labels when performing the target task on initial training samples with high data quality. Therefore, training a large model based solely on sample response text determined by the initial label distribution causes the large model to ignore reasonable text semantic transformations generated during the target task execution, reducing its text generation capability and making it difficult to learn model illusions regarding input images based on a relatively accurate initial label distribution. Conversely, training a large model solely by determining perturbed sample response text through perturbation label distribution causes the large model to be severely misled by perturbation factors, reducing training efficiency.

[0075] By fusing the initial label distribution and the perturbation label distribution, the sample denoising label distribution can semantically smoothly represent the degree of model illusion of a large model in response to perturbation factors. This enables the sample denoising response text determined based on the sample denoising label distribution to semantically stably represent the degree of model illusion of a large model, thereby improving the training efficiency for large models.

[0076] In some embodiments, the initial response text and the denoised response text of the sample can be determined based on the following methods.

[0077] For the current model policy π of the large model, the initial training samples and perturbed training samples are processed using the current model policy to obtain the initial label distribution of the samples at each time step. and perturbation marker distribution For each time step, the initial label distribution of the samples is processed based on a log-probability algorithm. and perturbation marker distribution This yields the candidate text tag scores in logarithmic space for multiple candidate text tags. For example, it can be based on... This represents the candidate text tag score corresponding to the initial sample tag distribution. Based on the candidate text tag scores corresponding to the initial sample tag distribution, the initial sample response text word is determined from the candidate text words corresponding to multiple candidate text tags. Therefore, the initial sample response text can be determined based on the sequence of initial sample response text words arranged according to multiple time steps. The initial sample response text can be represented as Y1 = (y1, ..., y...). t ), where y t This represents the initial response text of the sample at time step t.

[0078] For sample noise reduction label distribution The sample denoising label distribution can be processed based on decoding methods such as Greedy Decoding or Low-beam Decoding to obtain the sample denoising response text words corresponding to multiple time steps, and then determine the sample denoising response text Y2' = (y1', ..., y2'). t '). Among them, y t ' represents the sample denoised response text corresponding to time step t.

[0079] In one example, the sample denoised response text is determined based on the following formula (2).

[0080] (2).

[0081] Here, argmax represents a greedy decoding algorithm, which generates denoised response text Y2'=(y1', ..., yt') by progressively decoding the sample denoising label distribution corresponding to each time step. This ensures that the decoding result reflects the semantic consistency with the original initial training samples and characterizes the semantic smoothness of the output result under perturbation conditions. By generating denoised response text and sample response text, and sampling the denoised response text and sample response text corresponding to each training sample, sample response text is obtained. Then, the sample response text and label response text are processed by a reward function to obtain the reward information corresponding to the training samples. The uncertainty intensity, reward information, training samples, and sample response text corresponding to the training samples are associated and stored in an array (S, a, r), where S represents state information based on the sample response text, a represents action information based on the input training samples, and r represents reward information. Multiple arrays are used to construct a cache pool. Therefore, reinforcement learning algorithms can be executed based on the arrays in the cache pool to adjust the current model policy of the large model until the training conditions are met.

[0082] In one example, a large model can be trained based on a reinforcement learning mechanism. A reward function is used to process labeled response texts and sample response texts to obtain reward information corresponding to the sample response texts. Sample response texts can be determined by sampling from initial response texts and denoised response texts corresponding to training samples. The initial advantage weight of a sample response text relative to multiple sample response texts in the same batch is determined using the reward information from multiple sample response texts. The initial advantage weights, uncertainty intensity, and sample response texts are fused using a policy gradient loss function to obtain the loss information corresponding to the current model policy. The current model policy of the large model is then adjusted using this loss information to obtain an updated large model. Thus, the current model policy of the large model can be continuously updated based on a reinforcement learning mechanism until the training conditions are met, resulting in a trained large model.

[0083] In some embodiments, fusing the initial sample label distribution and the perturbation label distribution may include: fusing the initial sample label distribution and the perturbation label distribution based on a preset denoising weight to obtain the sample denoising label distribution.

[0084] In one example, the preset denoising weights are directly proportional to the degree of denoising for the perturbation label distribution. For example, the initial label distribution and the perturbation label distribution can be fused based on the following formula (3).

[0085] (3).

[0086] Where α represents the preset noise reduction weight. This represents the initial label distribution of the samples corresponding to time step t. This represents the distribution of perturbation markers corresponding to time step t. This represents the denoised label distribution of samples corresponding to time step t. A preset denoising weight α controls the denoising intensity of the perturbed label distribution. A larger preset denoising weight α indicates stronger noise suppression capability and a higher degree of denoising for the initial training samples. A smaller preset denoising weight α indicates that more perturbing factors are retained in the perturbed training samples, resulting in a weaker degree of denoising. Therefore, the semantic stability of the selection probability of candidate text labels output by the large model can be maintained based on the sample denoised label distribution, and the sample denoised label distribution can deviate to a certain extent from the initial label distribution determined for the original initial training samples. Thus, the large model can be trained based on the sample response text and uncertainty intensity determined by the sample denoised label distribution. During training, the large model learns to suppress model illusions during the execution of the target task and outputs semantically stable and coherent response text, improving the robustness and accuracy of the large model.

[0087] In some embodiments, both the initial sample label distribution and the perturbation label distribution correspond to a specified sample word in the sample response text. The specified sample word may correspond to a time step, thereby allowing the sample denoising label distribution corresponding to each of the multiple time steps to be determined based on the initial sample label distribution and perturbation label distribution corresponding to each of the multiple time steps.

[0088] In some embodiments, fusing the initial sample label distribution and the perturbation label distribution based on preset noise reduction weights may further include: for the initial sample label distribution and the perturbation label distribution corresponding to the sample word: updating the initial sample label distribution corresponding to the sample word according to a specified weight determined based on preset noise reduction weights to obtain a first specified distribution; updating the perturbation label distribution corresponding to the sample word based on preset noise reduction weights to obtain a second specified distribution; and determining the sample noise reduction label distribution corresponding to the sample word based on the difference between the first specified distribution and the second specified distribution.

[0089] In one example, the specified weight determined based on the preset noise reduction weight may include the specified weight obtained by fusing the pre-denoising parameter with the preset noise reduction weight. Updating the initial label distribution of the sample corresponding to the sample word using the specified weight may include multiplying the specified weight with the initial label distribution of the sample corresponding to the time step to obtain a first specified distribution.

[0090] In one example, updating the perturbation label distribution corresponding to the sample word based on a preset noise reduction weight may include multiplying the preset noise reduction weight by the perturbation label distribution to obtain a second specified distribution.

[0091] In one example, based on the difference between the first specified distribution and the second specified distribution, the sample denoising label distribution corresponding to the sample word is determined. Subtraction can be performed on the first specified distribution and the second specified distribution corresponding to the same time step to obtain the sample denoising label distribution corresponding to the same time step.

[0092] In some embodiments, in order to suppress random fluctuations introduced by visual noise factors of perturbed images in perturbed training samples, the initial label distribution and the perturbed label distribution of samples can be fused in the logarithmic probability space based on a linear algorithm.

[0093] For example, a first specified distribution can be obtained by fusing the initial label distribution of samples in the logarithmic space with specified weights, and a second specified distribution can be obtained by updating the perturbation label distribution in the logarithmic space based on preset denoising weights. Based on the difference between the first and second specified distributions in the logarithmic space, the initial sample denoising label distribution in the logarithmic space is determined, and the sample denoising probability distribution corresponding to the specified sample word is obtained by processing the initial sample denoising label distribution in the logarithmic space based on a normalization function.

[0094] In one example, for each time step Initial label distribution of samples and perturbation marker distribution Perform logarithmic calculations to obtain the initial label distribution of the samples in the logarithmic space. , and the perturbation label distribution in logarithmic space Processing the initial label distribution of samples in logarithmic space based on a linear algorithm. , and the perturbation label distribution in logarithmic space This process smooths the sample label distribution to obtain the initial sample denoising label distribution in logarithmic space. For example, the initial sample denoising label distribution can be determined based on formula (4). .

[0095] (4).

[0096] Then, based on the softmax function of formula (5), the initial sample is denoised and labeled. Perform a normalization operation to obtain the sample denoising probability distribution corresponding to the specified sample word. .

[0097]

[0098] Among them, the sample denoising probability distribution The generation of this information allows the large model to "see" the model illusions it generates for each time step under perturbation factors when updating its model strategy. This enables the large model to automatically learn to stably generate response text and suppress model illusions by adjusting the model strategy. Thus, it automatically learns to stably generate and reject illusions during training.

[0099] In some embodiments, the sample label distribution includes an initial sample label distribution and a denoised sample label distribution. For example, based on the sampling probability, the initial sample label distribution and the denoised sample label distribution of multiple training samples in the same batch are sampled to match the initial sample response text and the denoised sample response text with the sampling probability in multiple sample response texts.

[0100] In some embodiments, training a large model may further include training the large model based on multiple training stages, wherein the multiple training stages are arranged sequentially. Each training stage may adjust the model strategy of the large model once or multiple times, and the embodiments of this disclosure do not limit the number of times the model strategy is adjusted in each training stage.

[0101] It should be noted that adjusting the model strategy of a large model can include adjusting any type of model-related attributes such as model parameters and network structure. The embodiments disclosed herein do not limit the specific adjustment method of the model strategy.

[0102] In some embodiments, the proportion of samples corresponding to the sample denoising label distribution decreases sequentially in multiple training stages, where the sample proportion represents the ratio between the amount of data in the sample denoising label distribution and the amount of data in the sample label distribution. It should be understood that the sample label distribution includes the sample denoising label distribution and the initial sample label distribution, and the sample proportion represents the ratio of the amount of data in the sample denoising label distribution to the amount of data in the total sample label distribution.

[0103] For example, in the first training phase, the ratio of the amount of data in the denoised labeled distribution to the amount of data in the labeled distribution is 0.6, while in the second training phase, the ratio is 0.4. This allows the sample proportion to decrease sequentially in the first and second training phases.

[0104] According to embodiments of this disclosure, by sequentially decreasing the proportion of samples in the denoised label distribution within the sample label distribution during multiple training phases, the large model can learn the model illusion generated by the selection probability of candidate text labels represented by the denoised label distribution in the initial training phase. This avoids the large model adjusting its model strategy based on the initial sample label distribution, making it less likely for the large model to confuse the model illusion for candidate text labels with the chaotic model strategy adjustment caused by low text prediction ability. Thus, in the initial stage, the large model is trained based on the semantically smooth and stable sample response text represented by the denoised label distribution, combined with the uncertainty intensity corresponding to each word in the sample response text. This allows the large model to learn the degree of model illusion for training samples with perturbation factors relatively quickly in one or more initial training phases. Therefore, as the training phase continues, the proportion of samples in the denoised label distribution is reduced, allowing the large model to gradually learn to suppress model illusions by adjusting according to the model strategy and increasing the proportion of sample response text determined by the initial label distribution. This gradually reduces the model's perceived interference, improves its ability to suppress model illusions, and enables the trained large model to improve its semantic understanding and target task execution capabilities for input data with low data quality, reduce the error rate of output text caused by model illusions, and improve the robustness and accuracy of the large model.

[0105] In some embodiments, the large model processes multiple initial training samples based on the current model strategy to obtain multiple sample response texts, with multiple uncertainty intensities corresponding to each of the multiple initial training samples.

[0106] According to embodiments of this disclosure, training a large model may further include: processing the difference between the labeled response text and the sample response text based on a reinforcement learning mechanism to obtain initial advantage weights corresponding to the initial training samples; updating the initial advantage weights according to the uncertainty intensity corresponding to the initial training samples to obtain target advantage weights corresponding to the initial training samples; processing the sample label distribution using a loss function based on the target advantage weights to obtain target loss information, and training the large model based on the target loss information.

[0107] According to embodiments of this disclosure, the initial advantage weights characterize the degree of illusion generated during the execution of the target task by the current model policy. In some examples, a reward function based on a reinforcement learning mechanism is used to process the labeled response text and the sample response text to obtain reward information corresponding to the initial training samples. The initial advantage weights are determined based on the reward information corresponding to each of the multiple initial training samples.

[0108] For example, the initial advantage weight A can be determined based on the following formula.

[0109] For each initial training sample, the sample response text y can be determined by sampling from the initial sample response text y1 and the sample denoised response text y2'. The reward information r is calculated based on formula (6). The reward information r is used to measure whether the generated sample response text inhibits the sample images in the initial training samples, and whether the sample response text is natural and coherent.

[0110] (6).

[0111] Where: R() represents the reward function, used to evaluate the factual consistency and semantic accuracy between the sample response text and the label response text; y represents the sample response text; and golden_label represents the label response text. p1 represents the initial training samples, which include sample requirement information and sample images.

[0112] The mean of the reward information corresponding to multiple initial training samples in the same batch can be calculated as formula (7).

[0113] (7).

[0114] Among them, y i p represents the response text of the i-th sample corresponding to the i-th initial training sample. 1i This represents the i-th initial training sample. This represents the mean of the reward information corresponding to each of the multiple initial training samples within the same batch. The initial advantage weight Ai corresponding to the response text yi of the i-th sample is determined based on the following formula (8).

[0115] (8);

[0116] The initial advantage weight Ai is used to measure the advantage level of the i-th sample response text yi relative to the mean of the reward information of multiple sample response texts in the same batch. In some embodiments, if Ai > 0, it indicates that the i-th sample response text yi has strong semantic accuracy and semantic consistency and low model illusion. If Ai < 0, it indicates that the i-th sample response text yi has poor semantic accuracy and semantic consistency and has a deep degree of model illusion and semantic understanding error.

[0117] The target advantage weights are further determined based on the following formula (9).

[0118] (9).

[0119] in, This represents the uncertainty intensity corresponding to the i-th initial training sample. Let be the target advantage weight corresponding to the i-th initial training sample.

[0120] Therefore, based on the reinforcement learning mechanism, the loss value corresponding to the sample label distribution of the current model policy output can be calculated according to the advantage weights corresponding to the advantage weights used as the policy gradient term in the loss function, thus obtaining the target loss information. Based on this target loss information, the current model policy of the large model can be adjusted until the training conditions are met, resulting in a trained large model.

[0121] In some embodiments, in the sample response text corresponding to each initial training sample, multiple positions in the sample response text correspond to different uncertainty intensities. This allows for the determination of the target dominance weights corresponding to the sample label distribution based on the uncertainty intensities associated with the sample response text characters. This enables fine-grained characterization of the model illusion degree generated by the large model during the execution of the target task of generating sample response text characters. This avoids averaging the model illusion degree of the large model regarding key image regions containing perturbation factors in the perturbed sample image across the entire sample response text when determining the overall target dominance weights. This prevents the large model from accurately learning the influence of the location or region of the perturbation factor on the model illusion, thereby improving the accuracy and learning efficiency of the large model's ability to autonomously learn and suppress model illusions, and enhancing the robustness and generalization ability of the trained large model.

[0122] In some embodiments, uncertainty intensity characterizes the degree to which the current model strategy is illusory about the target sample word at the target location in the sample response text, with multiple target locations corresponding to multiple uncertainty intensities.

[0123] In some embodiments, the reward information corresponding to the target position in the sample response text can be determined based on formula (10).

[0124] (10).

[0125] Where: R() represents the reward function, used to evaluate the factual consistency and semantic accuracy between the sample response text and the label response text; o_t_final represents the sample response text word corresponding to the current target position; o_t_final can also represent the target sample word corresponding to the target position; golden_label_i represents the label response text word in the label response text corresponding to the current target position; p1 represents the initial training samples, which include sample requirement information and sample images.

[0126] In some embodiments, updating the initial advantage weights based on the uncertainty intensity corresponding to the initial training samples may further include: updating the initial advantage weights corresponding to the target sample characters based on the uncertainty intensity corresponding to the target position, thereby obtaining the target advantage weights corresponding to the target sample characters.

[0127] According to embodiments of this disclosure, the uncertainty intensity corresponding to the target position can be expressed as the uncertainty intensity corresponding to the sample response text word. The initial advantage weight corresponding to the target sample word can be determined based on the reward information corresponding to the sample response text word. For example, the initial advantage weight corresponding to the target sample word can be determined based on formulas (7) to (10).

[0128] In some embodiments, updating the initial advantage weight corresponding to the target sample word based on the uncertainty intensity corresponding to the target position may include fusing the initial advantage weight corresponding to the target sample word by multiplying or adding the uncertainty intensity update corresponding to the target position with the initial advantage weight corresponding to the target sample word to obtain the target advantage weight corresponding to the target sample word.

[0129] According to embodiments of this disclosure, target loss information is determined based on multiple target advantage weights corresponding to each of the multiple target sample words. For example, the target advantage weights and sample label distribution corresponding to each target sample word can be processed based on the policy gradient term loss function to obtain the loss information corresponding to each target sample word. Thus, the target loss information corresponding to the sample response text can be determined based on the loss information corresponding to multiple target sample words, and the current model policy of the large model can be adjusted based on the target loss information until the training conditions are met, resulting in a trained large model.

[0130] In some embodiments, obtaining target loss information by processing the sample label distribution using a loss function based on the target advantage weight may include: processing the sample label distribution corresponding to the target sample word using a loss function according to the target advantage weight corresponding to the target sample word to obtain sub-loss information; and fusing the sub-loss information corresponding to multiple target sample words to obtain target loss information.

[0131] In one example, the target advantage weight corresponding to the t-th target sample word can be determined based on the following formula (11). .

[0132] (11).

[0133] Among them, A it This represents the initial advantage weight corresponding to the t-th target sample word in the i-th sample's response text. This represents the uncertainty intensity corresponding to the t-th target sample word in the i-th sample response text.

[0134] Therefore, the target advantage weight can be processed based on the policy gradient term loss function expressed by the following formula (12). And the current model strategy π θ1 Output sample label distribution Obtain target loss information L policy .

[0135] (12).

[0136] Where T represents the number of target locations in the response text of the i-th sample.

[0137] It should be noted that, It can represent the sub-loss information corresponding to the target sample word, and the target loss information L policy It is determined by accumulating T sub-loss information.

[0138] According to embodiments of this disclosure, by determining the target advantage weights corresponding to multiple target sample characters, a large model can autonomously learn to suppress model illusions in input data with perturbation factors based on these target advantage weights. This allows the trained large model to stably output the label distribution corresponding to each position. Consequently, during model policy adjustment of the large model, the update intensity of the model policy is increased for target positions with higher target advantage weights and decreased for target positions with lower target advantage weights. This achieves refined model policy updates for the large model, thereby improving the accuracy of the large model's selection probability of multiple candidate text labels during target task execution, reducing model illusions, and enhancing the performance and robustness of the trained large model.

[0139] In one example, the update intensity of the model policy for multiple target sample words during training can be represented by the content shown in Table 1. Table 1 shows the sample response text as "This is a blue car" and the tag response text as "This is a red car". The update intensity of the model policy can be represented as the difference in parameter values ​​of the model parameters, or it can be represented as the gradient weights for the model parameters. The gradient weights are directly proportional to the update intensity; a larger gradient weight can be used to perform a more intensive update of the model policy. By generating different sub-loss information for different target sample words and further generating gradient weights corresponding to the target advantage weights, a more intensive update of the model policy can be performed on the target task of generating sample response text words at different positions. This achieves accurate updates of the model policy, reduces training resource waste, and improves training performance.

[0140] Table 1

[0141]

[0142] In some embodiments, processing the sample label distribution using a loss function based on the target advantage weight to obtain target loss information may further include: processing the sample label distribution using a first loss function based on the target advantage weight to obtain first loss information; and processing the sample label distribution and the reference label distribution using a second loss function to obtain second loss information.

[0143] According to embodiments of this disclosure, the reference label distribution is determined by the large model based on a reference model policy when processing initial training samples. In one example, the current model policy can be obtained by adjusting the reference model policy. For example, the reference model policy can be the model policy determined in the first training phase, and the current model policy can be the model policy to be adjusted in the third training phase.

[0144] In some embodiments, the first loss information can be determined, for example, by processing the target advantage weights and sample distribution labels corresponding to multiple target sample words based on a policy gradient loss function. The second loss function can be, for example, a regularization loss function based on a reinforcement learning mechanism. The reference label distribution and the sample label distribution can be processed based on the regularization loss function to determine the KL (Kullback-Leibler) divergence between the reference label distribution and the sample label distribution, and the second loss information can be determined based on the KL divergence.

[0145] For example, the second loss information L can be determined based on the following formula (13). KL .

[0146] (13)

[0147] Where β is the regularity coefficient, D KL Represents the KL divergence algorithm function, π old ( ) represents the distribution of reference markers determined based on the reference model strategy, π θ1 ( ) represents the sample label distribution determined based on the current model strategy. By determining the second loss information, the magnitude of the model strategy update can be constrained, preventing the updated current strategy from deviating excessively from the original language distribution, and ensuring that language fluency and expressiveness are not lost while correcting illusions.

[0148] The total loss information L is determined as the target loss information based on the following formula (14).

[0149] (14)

[0150] The total loss information L represents the sample label distribution obtained by sampling from the initial sample label distribution and the denoised sample label distribution. This ensures that the large model can maintain a balance between the initial sample label distribution and the denoised sample label distribution during training, thereby improving the robustness of the large model.

[0151] In some embodiments, training a large model by fusing uncertainty intensity and the difference between the labeled response text and the sample response text to obtain a trained large model may further include: training a first large model by fusing uncertainty intensity and the difference between the labeled response text and the sample response text to obtain a trained first large model; and using the trained first large model as a teacher model, training a second large model based on a knowledge distillation mechanism to obtain a trained second large model.

[0152] In one example, a first-level trained model can be used as the teacher model, and the first sample response text output by the teacher model based on the training samples can be used as the label data for the second-level model. The second sample response text output by the second model when performing the target task based on the training samples is obtained, and a loss function is used to process the first and second sample response texts to obtain loss information. The loss information is then used to adjust the model strategy of the second-level model until the training conditions are met, resulting in a trained second-level model.

[0153] In some embodiments, the number of model parameters of the first large model is greater than the number of model parameters of the second large model.

[0154] In one example, model parameters from a first trained model can be transferred to a second model to be trained, thereby enabling the second model to have the ability to suppress model illusions for multimodal training samples, thus improving the performance of the second model.

[0155] According to embodiments of this disclosure, the first large model has a larger number of model parameters than the second large model. Therefore, the trained large model can be used as a teacher model to train the second large model with fewer model parameters based on a knowledge distillation mechanism. This allows the second large model to learn the model illusion suppression capability of the trained first large model through knowledge distillation without relying on new labeled data. Thus, a large model already deployed in an application scenario can be used as the second large model to be trained. This allows for faster adjustments to the large model already deployed in the application scenario through the knowledge distillation mechanism, avoiding model structure adjustments and data labeling for application scenario-specific large models, and reducing the computational overhead required for training the large model.

[0156] Figure 4 A flowchart illustrating a large-model-based interaction method according to an embodiment of the present disclosure is shown schematically.

[0157] likeFigure 4 As shown, the interaction method based on the large model includes operations S410~S430.

[0158] During operation of S410, the target object's requirement information and target image are received.

[0159] When operating the S420, the large model is used to perform the target task based on the demand information and target image, and the response text that matches the demand intent is obtained.

[0160] When operating S430, push reply text to the target object.

[0161] According to embodiments of this disclosure, demand information represents the target object's intention to demand a target image. Demand information can be, for example, question text asking about the target image. The large model can understand the image semantics of the target image based on the demand intention represented by the question text and output a response text that satisfies the demand intention.

[0162] It should be noted that the number of target images can be one or more, and the image type of the target images can be any type of image such as video frame sequence, infrared sensing image, nuclear magnetic resonance scan image, etc. The embodiments of this disclosure do not limit the number and image type of target images.

[0163] According to embodiments of this disclosure, the large model applied in the large model-based interaction method is determined according to the method for training a large model provided in embodiments of this disclosure, and will not be described again here.

[0164] In some embodiments, the target image may contain perturbation factors such as low resolution, visual blur, color deviation, and contour distortion. The large model determined by the method for training a large model according to embodiments of this disclosure can perform target tasks on target images and demand information containing perturbation factors, and suppress model illusions caused by data quality during the execution of the target task, thereby reducing the degree of model illusion corresponding to the output text tag distribution, improving the accuracy of the selection probability for candidate text tags, and thus improving the semantic accuracy and logical coherence of the response text determined based on the text tag distribution, and improving the matching degree between the response text and the demand intent of the target object.

[0165] It should be noted that the technical terms involved in the interaction method based on the large model provided in the embodiments of this disclosure, including but not limited to text label distribution, response text, target image, etc., have the same or similar meanings as the technical terms involved in the method for training the large model provided in the embodiments of this disclosure, including but not limited to sample label distribution, sample response text, sample image, etc., and will not be repeated in the embodiments of this disclosure.

[0166] In some embodiments, the target image includes a medical examination image related to the object to be detected, and the response text represents examination recommendation text for the object to be detected.

[0167] For example, if the target image is a scanned image obtained from an MRI scan of the object to be detected, and the required information is "detect abnormalities in the scanned image", the response text could be "There is a suspected fracture in the left A bone, which requires the attention of a doctor".

[0168] The interactive method provided in this disclosure can be applied to medical image analysis scenarios. For example, in medical image question-answering tasks, large models often produce "hallucination-like" conclusions due to local blurring or occlusion of the input medical images, leading to incorrect judgments in the output response text regarding the color or location of lesions in the medical images. The trained large model determined by the training method provided in this disclosure can actively detect and correct uncertain outputs in the response text through its hallucination suppression capability, improving the reliability of the large model in medical advice report generation and assisted diagnosis tasks.

[0169] In some embodiments, the target image includes an image to be reviewed, and the response text is a review conclusion text related to the image content of the image to be reviewed. For example, when the target image is a social media image, the review process for social media images can be based on the large model-based interaction method provided in this disclosure. The trained large model determined by the method for training the large model provided in this disclosure can be guided to reduce the risk prediction confidence in uncertain image regions of social media images through uncertainty intensity perception and reward mechanisms, thereby reducing the "over-checking" and "under-checking" phenomena in the response text representation. This avoids the defects that may occur in the traditional large model image review process due to blurred backgrounds or changes in lighting, leading to the identification of harmless images as illegal content, ensuring the consistency between the review output results and the image facts. It can be applied to high-risk business scenarios such as social platforms, short video content review, advertising security review, and filtering of content for minors, realizing the automation and interpretability of multimodal security review.

[0170] In some embodiments, the trained large model determined based on the training large model method provided in this disclosure can be used as an application system such as text-to-text question answering, virtual reality (VR) interaction, augmented reality (AR) interaction, and visual-assisted writing, so that the trained large model can maintain factual consistency and language fluency in multi-turn dialogues.

[0171] For example, when a user uploads a photo of a red truck as the target image and enters the question text "What color is this truck?", the system determines the large model based on the training method for the large model provided in this embodiment. Before outputting the reply text "red", it automatically calculates the uncertainty of the text label and calls a noise reduction distribution for robust correction when it detects an increase in risk, ensuring that the answer is accurate and consistent with visual reality. This mechanism enables the large model to have the characteristic of "consciously avoiding illusions", which can significantly improve the credibility and controllability of the multimodal interaction system.

[0172] In scenarios such as automatic image annotation and video summarization, the method for training a large model based on the embodiments of this disclosure can significantly improve the consistency between the generated content and visual facts, and enhance the semantic interpretation capability of complex images. Similarly, in satellite imagery and autonomous driving perception scenarios, the method for training a large model based on the embodiments of this disclosure can enhance the model's robust recognition capability for image data with partial occlusion and blurred objects, and reduce the risk of misidentification of "false targets" or "false events".

[0173] Figure 5 A block diagram of an apparatus for training a large model according to an embodiment of the present disclosure is shown schematically.

[0174] like Figure 5 As shown, the apparatus 500 for training a large model includes: a first receiving module 510, a first task execution module 520, a first determining module 530, and a training module 540.

[0175] The first receiving module 510 is used to receive training samples and labeled response text. The training samples represent the demand intentions of the sample objects. The training samples include initial training samples and perturbation training samples determined by perturbing the initial training samples. The labeled response text is matched with the demand intentions.

[0176] The first task execution module 520 is used to perform the target task using the large model based on the initial training samples and perturbation training samples, and to obtain the sample label distribution and perturbation label distribution. The sample label distribution and perturbation label distribution represent the selection probability for multiple candidate text labels.

[0177] The first determining module 530 is used to determine the uncertainty intensity based on the difference between the sample label distribution and the perturbation label distribution. The uncertainty intensity characterizes the degree of illusion generated by the candidate text labels during the execution of the target task by the large model.

[0178] Training module 540 is used to train a large model by fusing uncertainty intensity and the difference between labeled response text and sample response text, resulting in a trained large model. The sample response text is determined based on the sample label distribution.

[0179] According to embodiments of this disclosure, a large model processes multiple initial training samples based on the current model strategy to obtain multiple sample response texts, with multiple uncertainty intensities corresponding to each of the multiple initial training samples; the training module includes:

[0180] The first acquisition unit is used to process the difference between the label response text and the sample response text based on the reinforcement learning mechanism, and obtain the initial advantage weight corresponding to the initial training sample. The initial advantage weight represents the degree of illusion generated during the execution of the target task by the current model policy.

[0181] The second acquisition unit is used to update the initial advantage weights according to the uncertainty intensity corresponding to the initial training samples, so as to obtain the target advantage weights corresponding to the initial training samples.

[0182] The first training unit is used to process the sample label distribution based on the target advantage weights and the loss function to obtain the target loss information, and to train the large model based on the target loss information.

[0183] According to embodiments of this disclosure, the uncertainty intensity characterizes the degree of illusion of the current model strategy for the target sample word at the target position in the sample response text, and multiple target positions correspond to multiple uncertainty intensities; the second obtaining unit includes a target advantage weight obtaining subunit.

[0184] The target advantage weight acquisition sub-unit is used to update the initial advantage weight corresponding to the target sample word according to the uncertainty intensity corresponding to the target position, and obtain the target advantage weight corresponding to the target sample word. Target loss information is determined based on the multiple target advantage weights corresponding to each of the multiple target sample words.

[0185] According to embodiments of this disclosure, the first training unit includes: a sub-loss information acquisition sub-unit and a target loss information acquisition sub-unit.

[0186] The sub-loss information acquisition sub-unit is used to process the sample label distribution corresponding to the target sample word using the loss function based on the target advantage weight corresponding to the target sample word to obtain the sub-loss information.

[0187] The target loss information acquisition sub-unit is used to fuse the sub-loss information corresponding to multiple target sample words to obtain the target loss information.

[0188] According to embodiments of this disclosure, the first training unit includes: a first loss information acquisition subunit and a second loss information acquisition subunit.

[0189] The first loss information acquisition sub-unit is used to process the sample label distribution based on the target advantage weight and the first loss function to obtain the first loss information.

[0190] The second loss information acquisition subunit is used to process the sample label distribution and the reference label distribution based on the second loss function to obtain the second loss information. The reference label distribution is determined by the large model based on the reference model strategy to process the initial training samples.

[0191] According to embodiments of this disclosure, the first task execution module includes: a first processing unit and a sample denoising label distribution acquisition unit.

[0192] The first processing unit is used to process the initial training samples and perturbed training samples according to the current model strategy using the large model to obtain the initial label distribution and perturbed label distribution of the samples.

[0193] The sample denoising label distribution acquisition unit is used to fuse the initial sample label distribution and the perturbation label distribution to obtain the sample denoising label distribution, wherein the sample label distribution includes at least one of the initial sample label distribution and the sample denoising label distribution.

[0194] According to embodiments of this disclosure, the sample label distribution includes an initial sample label distribution and a sample noise reduction label distribution; the training module further includes a second training unit.

[0195] The second training unit is used to train a large model based on multiple training stages. In the sequentially arranged training stages, the proportion of samples corresponding to the sample denoising label distribution decreases in order. The sample proportion represents the proportional relationship between the amount of data in the sample denoising label distribution and the amount of data in the sample label distribution.

[0196] According to embodiments of this disclosure, the sample denoising label distribution acquisition unit includes a sample denoising label distribution acquisition subunit.

[0197] The sample denoising label distribution acquisition sub-unit is used to fuse the initial sample label distribution and the perturbation label distribution based on the preset denoising weights to obtain the sample denoising label distribution. The preset denoising weights are directly proportional to the degree of denoising of the perturbation label distribution.

[0198] According to embodiments of this disclosure, both the initial sample label distribution and the perturbation label distribution correspond to a specified sample character in the sample response text. The sample denoising label distribution acquisition subunit is configured as follows: for the initial sample label distribution and the perturbation label distribution corresponding to the sample character: update the initial sample label distribution corresponding to the sample character according to a specified weight determined based on a preset denoising weight to obtain a first specified distribution; update the perturbation label distribution corresponding to the sample character based on a preset denoising weight to obtain a second specified distribution; and determine the sample denoising label distribution corresponding to the sample character based on the difference between the first specified distribution and the second specified distribution.

[0199] According to embodiments of this disclosure, the training module includes a third training unit and a fourth training unit.

[0200] The third training unit is used to train the first large model by fusing the uncertainty intensity and the difference between the labeled response text and the sample response text, thus obtaining the trained first large model.

[0201] The fourth training unit is used to train the second model based on the first trained model as the teacher model and the knowledge distillation mechanism, resulting in the second trained model. The first model has more model parameters than the second model.

[0202] According to embodiments of this disclosure, the initial training sample includes an initial sample image, the perturbation training sample includes a perturbation image determined by perturbing the initial sample image, and the training sample also includes sample demand information, which characterizes the sample object's demand intention for the initial sample image or the perturbation image.

[0203] According to embodiments of this disclosure, the initial training samples include initial sample images, and the perturbation training samples include perturbation sample images. The perturbation sample images are determined by performing at least one of the following operations on the initial sample images: occluding an image region in the initial sample image that represents a specified object; adjusting the texture properties of the initial sample image; and reducing the image resolution of at least one image region in the initial sample image.

[0204] Figure 6 A block diagram of an interactive device for a large model is shown schematically according to an embodiment of the present disclosure.

[0205] like Figure 6 As shown, the interactive device 600 based on a large model includes: a second receiving module 610, a second task execution module 620, and a push module 630.

[0206] The second receiving module 610 is used to receive the target object's demand information and target image, wherein the demand information represents the target object's intention to demand the target image.

[0207] The second task execution module 620 is used to perform a target task based on the demand information and the target image using a large model, and obtain a response text that matches the demand intent. The large model is determined according to the method for training a large model provided in the embodiments of this disclosure.

[0208] The push module 630 is used to push reply text to the target object.

[0209] According to embodiments of this disclosure, the target image includes a medical examination image related to the object to be detected, and the response text represents examination recommendation text for the object to be detected; or the target image includes an image to be reviewed, and the response text is a review conclusion text related to the image content of the image to be reviewed.

[0210] Figure 7 A schematic block diagram of an artificial intelligence agent according to an embodiment of the present disclosure is shown.

[0211] In embodiments of this disclosure, such as Figure 7 As shown, the AI ​​agent 700 may include an input module 710, a processing module 720, and an output module 730.

[0212] Input module 710 is used to receive input information;

[0213] The processing module 720 is used to determine the target task based on the input information received by the input module, determine the large model based on the target task, and obtain output information by calling the large model to execute the method for training the large model according to the embodiments of this disclosure, or by calling the large model to execute the interaction method based on the large model according to the embodiments of this disclosure.

[0214] Output module 730 is used to output the output information obtained by the processing module.

[0215] According to embodiments of this disclosure, the input module 710 is responsible for receiving or sensing information such as queries, requests, instructions, signals, or data from the outside world (e.g., users or the external environment), and converting it into a format that the AI ​​agent 700 can understand and process. The input module 710 is the primary link for the AI ​​agent 700 to interact with the outside world, enabling the AI ​​agent 700 to efficiently and accurately obtain necessary "sensory" information from the outside world and respond to this information.

[0216] In the example, the input module 710 can input the training samples, requirement information, target images, etc., as described above.

[0217] In the example, the processing module 720 is the core support for the AI ​​agent 700's ability to handle complex tasks. The processing module 720 can execute the methods for training large models and the interaction methods based on large models described above.

[0218] In the example, the performance of the processing module 720 is closely related to the large model on which the AI ​​agent 700 is based. To fully leverage the capabilities of the large model, the internal structure of the processing module 720 can be designed to be highly configurable and scalable to handle various types of tasks and requirements in real-world scenarios.

[0219] In the example, after the AI ​​agent 700 acquires the request voice, the processing module 720 can use a large model to process the request information and target image to obtain the response text, and then pass the response text to the output module 730.

[0220] Understandably, while large language models possess excellent language understanding and generation capabilities, like humans, their ability to solve tasks is limited without the aid of any tools. Once the AI ​​agent 700 is given the ability to invoke tools, it can perform tasks such as using a calculator to complete mathematical calculations, using Python to perform data analysis, and using a search engine to create weather forecasts.

[0221] In the example, output module 730 can output the response text described above or a trained large model.

[0222] The AI ​​agent 700 according to the embodiments of this disclosure can simply and effectively improve the level of intelligence, as well as enhance flexibility and versatility.

[0223] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0224] According to an embodiment of the present disclosure, an electronic device 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, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described above.

[0225] According to embodiments of the present disclosure, a non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions are used to cause a computer to perform the method described above.

[0226] According to an embodiment of this disclosure, a computer program product includes a computer program that, when executed by a processor, implements the method described above.

[0227] Figure 8 A schematic block diagram of an example electronic device 800 is shown, illustrating a method for training a large model and an interaction method based on the large model that can be used to implement embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0228] like Figure 8As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.

[0229] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0230] The computing unit 801 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as methods for training large models and interactive methods based on large models. For example, in some embodiments, methods for training large models and interactive methods based on large models can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the methods for training large models and interactive methods based on large models described above can be performed. Alternatively, in other embodiments, computing unit 801 may be configured by any other suitable means (e.g., by means of firmware) to perform methods for training large models or interactive methods based on large models.

[0231] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0232] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0233] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on 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 of the foregoing.

[0234] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0235] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0236] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, distributed system servers, or servers incorporating blockchain technology.

[0237] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0238] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for training a large model, comprising: receiving training samples and label reply texts, the training samples representing demand intents of sample objects, the training samples comprising initial training samples and perturbed training samples determined by perturbing the initial training samples, the label reply texts matching the demand intents; performing a target task by a large model according to the initial training samples and the perturbed training samples to obtain sample label distributions and perturbed label distributions, the sample label distributions and the perturbed label distributions representing selection probabilities of a plurality of candidate text labels; determining uncertainty strengths based on differences between the sample label distributions and the perturbed label distributions, the uncertainty strengths representing degrees of hallucinations of the candidate text labels generated by the large model in performing the target task; training the large model by fusing the uncertainty strengths and differences between the label reply texts and sample reply texts to obtain a trained large model, the sample reply texts being determined based on the sample label distributions.

2. The method of claim 1, wherein, The large model processes a plurality of the initial training samples based on the current model strategy to obtain a plurality of the sample reply texts, a plurality of the uncertainty strengths each corresponding to a plurality of the initial training samples; The training of the large model comprises: processing the differences between the label reply texts and the sample reply texts based on a reinforcement learning mechanism to obtain initial advantage weights corresponding to the initial training samples, the initial advantage weights representing degrees of hallucinations generated by the current model strategy in performing the target task; updating the initial advantage weights according to the uncertainty strengths corresponding to the initial training samples to obtain target advantage weights corresponding to the initial training samples; processing the sample label distributions based on the target advantage weights by using a loss function to obtain target loss information, and training the large model according to the target loss information.

3. The method of claim 2, wherein, The uncertainty strengths represent degrees of hallucinations of target sample words in target positions of the sample reply texts, a plurality of the target positions corresponding to a plurality of the uncertainty strengths; The updating of the initial advantage weights according to the uncertainty strengths corresponding to the initial training samples comprises: updating the initial advantage weights corresponding to the target sample words according to the uncertainty strengths corresponding to the target positions to obtain target advantage weights corresponding to the target sample words, wherein the target loss information is determined according to a plurality of the target advantage weights corresponding to a plurality of the target sample words.

4. The method of claim 3, wherein, The processing of the sample label distributions based on the target advantage weights by using the loss function to obtain the target loss information comprises: processing the sample label distributions corresponding to the target sample words by using the loss function according to the target advantage weights corresponding to the target sample words to obtain sub-loss information; and fusing a plurality of the sub-loss information corresponding to a plurality of the target sample words to obtain the target loss information.

5. The method of claim 2, wherein, The processing of the sample label distributions based on the target advantage weights by using the loss function to obtain the target loss information comprises: The first loss information is obtained by processing the sample label distribution using a first loss function based on the target advantage weight. The second loss information is obtained by processing the sample label distribution and a reference label distribution based on a second loss function, the reference label distribution being determined by the large model based on a reference model strategy processing the initial training sample.

6. The method of claim 1 or 2, wherein, The large model performs a target task according to the initial training sample and the perturbed training sample, including: The large model processes the initial training sample and the perturbed training sample according to the current model strategy to obtain a sample initial label distribution and the perturbed label distribution. The sample initial label distribution and the perturbed label distribution are fused to obtain a sample denoising label distribution, wherein the sample label distribution includes at least one of the sample initial label distribution and the sample denoising label distribution.

7. The method of claim 6, wherein, The sample label distribution includes the sample initial label distribution and the sample denoising label distribution; and the large model is trained, including: The large model is trained based on multiple training stages, wherein the sample proportion corresponding to the sample denoising label distribution in sequentially arranged multiple training stages decreases sequentially, and the sample proportion represents a proportional relationship between a data amount of the sample denoising label distribution and a data amount of the sample label distribution.

8. The method of claim 6, wherein, The sample initial label distribution and the perturbed label distribution are fused, including: The sample initial label distribution and the perturbed label distribution are fused based on a preset denoising weight to obtain the sample denoising label distribution, wherein the preset denoising weight is in a positive proportional relationship with a denoising degree of the perturbed label distribution.

9. The method of claim 8, wherein, The sample initial label distribution and the perturbed label distribution both correspond to a specified sample word in the sample reply text; and the sample initial label distribution and the perturbed label distribution corresponding to the sample word are updated based on a specified weight determined based on the preset denoising weight to obtain a first specified distribution and a second specified distribution, and the sample denoising label distribution corresponding to the sample word is determined based on a difference between the first specified distribution and the second specified distribution. The large model is trained by fusing the uncertainty strength and the difference between the label reply text and the sample reply text to obtain a trained large model, including: A first large model is trained by fusing the uncertainty strength and the difference between the label reply text and the sample reply text to obtain a trained first large model; A second large model is trained based on a knowledge distillation mechanism based on the trained first large model as a teacher model to obtain a trained second large model, wherein a model parameter amount of the first large model is greater than a model parameter amount of the second large model. ​ 10. The method of claim 1, wherein, ​ ​ ​ 11. The method of claim 1, wherein, The initial training sample includes a sample initial image, and the perturbed training sample includes a sample perturbed image determined by performing at least one of the following operations on the sample initial image:

12. The method of claim 1 or 11, wherein, occluding an image region in the sample initial image representing a specified object; adjusting a texture attribute of the sample initial image; reducing image resolution of at least one image region in the sample initial image.

13. A large model-based interaction method, comprising: receiving demand information of a target object and a target image, the demand information representing a demand intention of the target object for the target image; performing a target task according to the demand information and the target image by using a large model to obtain a reply text matched with the demand intention, wherein the large model is determined according to the method of any one of claims 1 to 12; and pushing the reply text to the target object.

14. The method of claim 13, wherein: the target image includes a medical examination image related to a to-be-detected object, and the reply text represents an examination suggestion text for the to-be-detected object; or the target image includes a to-be-reviewed image, and the reply text is a review conclusion text related to image content of the to-be-reviewed image.

15. An apparatus for training a large model, comprising: a first receiving module configured to receive a training sample and a label reply text, the training sample representing a demand intention of a sample object, the training sample including an initial training sample and a perturbed training sample determined by perturbing the initial training sample, and the label reply text being matched with the demand intention; a first task performing module configured to perform a target task according to the initial training sample and the perturbed training sample by using a large model to obtain a sample label distribution and a perturbed label distribution, the sample label distribution and the perturbed label distribution representing selection probabilities of a plurality of candidate text labels; a first determining module configured to determine an uncertainty strength based on a difference between the sample label distribution and the perturbed label distribution, the uncertainty strength representing a degree of hallucination of the candidate text labels generated by the large model during performance of the target task; a training module configured to train the large model by fusing the uncertainty strength and a difference between the label reply text and a sample reply text, the sample reply text being determined based on the sample label distribution, to obtain a trained large model.

16. A large model-based interaction apparatus, comprising: a second receiving module configured to receive demand information of a target object and a target image, the demand information representing a demand intention of the target object for the target image; ​ a second task execution module configured to execute a target task according to the demand information and the target image by using a large model to obtain reply text matched with the demand intention, wherein the large model is determined according to the method in any one of claims 1 to 12; a pushing module configured to push the reply text to the target object.

17. An artificial intelligence intelligent agent, comprising: an input module configured to receive input information; a processing module configured to determine a target task based on the input information received by the input module, determine a large model based on the target task, execute the method in any one of claims 1 to 14 by calling the large model, and obtain output information; an output module configured to output the output information obtained by the processing module.

18. An electronic device, comprising: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method in any one of claims 1 to 14.

19. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to execute the method in any one of claims 1 to 14.

20. A computer program product comprising a computer program which, when executed by a processor, implements the method in any one of claims 1 to 14.