Sample leakage detection method and device, electronic equipment and computer program product

By constructing similar test samples and comparing the prediction accuracy differences of multimodal models, the problem of relying on publicly available training data in the detection of data leakage in multimodal large language models is solved, thereby improving the accuracy of detection and reducing the complexity of data processing.

CN121350461APending Publication Date: 2026-01-16LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511429559.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2026-01-16

AI Technical Summary

Technical Problem

In existing technologies, data leakage detection for multimodal large language models relies on the public availability of training data, which leads to high data processing difficulty and low detection accuracy.

Method used

By determining the sample construction method and data leakage detection method based on the preset data leakage method of the multimodal model, similar test samples are constructed, and the data leakage situation is judged by detecting the difference in prediction accuracy of the multimodal model for the original test samples and similar test samples, thus avoiding direct dependence on training data.

Benefits of technology

This approach reduces data processing complexity and improves the accuracy and reliability of data leak detection without relying on publicly available training data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121350461A_ABST
    Figure CN121350461A_ABST
Patent Text Reader

Abstract

The invention discloses a sample leakage detection method and device, electronic equipment and a computer program product, and relates to the technical field of artificial intelligence, and the method comprises the steps: determining a corresponding sample construction mode and a data leakage detection mode according to a preset data leakage mode of a multi-modal model; a foundation is laid for data leakage detection of the multi-modal large language model, and then the similar to-be-detected samples of the original to-be-detected samples of the multi-modal model are constructed according to the sample construction mode, so that the situation that the test process depends on disclosure of training corpora is avoided; and detecting first prediction accuracy and second prediction accuracy of the multi-modal model on the original to-be-detected sample and the similar to-be-detected sample according to the data leakage detection mode, and determining the leakage condition of the original to-be-detected sample in the preset data leakage mode according to the first prediction accuracy and the second prediction accuracy. The technical problems of dependence on disclosure of training data, high data processing difficulty and high detection accuracy during data leakage detection can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular to a sample leakage detection method and device, electronic equipment and computer program product. BACKGROUND

[0002] A multi-modal large language model is a large language model that integrates data of various modalities such as text, image, and audio, and exhibits strong performance. With the wide application of multi-modal large language models, the quality of training data is increasingly important, and the risk of data leakage is also increasing.

[0003] Data leakage refers to the inclusion of content in the training data that is in the evaluation set, resulting in a score on the evaluation set that exceeds the model's original capabilities. The purpose of model evaluation is to objectively and accurately assess the model's generalization ability. However, when evaluation data is mixed into the training set, the model's performance on these data will be overestimated, making the evaluation results unable to truly reflect the model's actual ability on unknown data, unable to accurately measure the model's performance in actual application, and difficult to obtain a truly effective model.

[0004] In the field of large language models, various data leakage detection methods have appeared in related technologies. However, the methods in related technologies rely on the disclosure of training corpus on the one hand, and many large language models are not publicly disclosed. On the other hand, for multi-modal large language models, data leakage detection needs to handle multiple data types, making data processing difficult and reducing the accuracy and reliability of detection. SUMMARY

[0005] The present application provides a sample leakage detection method, device, electronic equipment and computer program product to at least solve the technical problems of related technologies, such as dependence on the disclosure of training data, difficulty in data processing, and low detection accuracy when detecting data leakage for multi-modal large language models.

[0006] The present application provides a sample leakage detection method, comprising: determining a corresponding sample construction method and a data leakage detection method according to a preset data leakage method of a multi-modal model, wherein the input data of the multi-modal model is multi-modal data, and the output data is text data; constructing a similar test sample of an original test sample of the multi-modal model according to the sample construction method; detecting a first prediction accuracy of the multi-modal model for the original test sample and a second prediction accuracy of the multi-modal model for the similar test sample according to the data leakage detection method; and determining the leakage of the original test sample under the preset data leakage method according to the first prediction accuracy and the second prediction accuracy.

[0007] The application further provides a sample leakage detection device, comprising: a first determination unit configured to determine a corresponding sample construction manner and a data leakage detection manner according to a preset data leakage manner of a multi-modal model, wherein input data of the multi-modal model is multi-modal data, and output data is text data; a construction unit configured to construct a similar test sample of an original test sample of the multi-modal model according to the sample construction manner; a second determination unit configured to detect a first prediction accuracy of the multi-modal model on the original test sample and a second prediction accuracy of the multi-modal model on the similar test sample according to the data leakage detection manner; and a third determination unit configured to determine a leakage situation of the original test sample under the preset data leakage manner according to the first prediction accuracy and the second prediction accuracy.

[0008] The application further provides an electronic device, comprising: a memory configured to store a computer program; and a processor configured to execute the computer program to implement the steps of any of the sample leakage detection methods.

[0009] The application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of any of the sample leakage detection methods.

[0010] The application further provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the steps of any of the sample leakage detection methods.

[0011] According to the application, the corresponding sample construction manner and the data leakage detection manner are first determined according to the preset data leakage manner of the multi-modal model, which lays a foundation for data leakage detection of the multi-modal large language model, then the similar test sample of the original test sample of the multi-modal model is constructed according to the sample construction manner, so that the process of testing is avoided to depend on the disclosure of the training corpus, and then the first prediction accuracy of the multi-modal model on the original test sample and the second prediction accuracy of the multi-modal model on the similar test sample are detected according to the data leakage detection manner, since the similar test sample is constructed based on the original test sample, the difference between the first prediction accuracy and the second prediction accuracy can reflect the data leakage situation, and therefore, the leakage situation of the original test sample under the preset data leakage manner can be accurately determined according to the first prediction accuracy and the second prediction accuracy, which can solve the technical problems of dependence on disclosure of training data, great difficulty in data processing, and low detection accuracy in data leakage detection of the multi-modal large language model in the related art, and the technical effects of not needing to depend on disclosure of training data, reducing the data processing complexity in the process of detecting data leakage, and improving the accuracy of the detection result are achieved by introducing a small perturbation to observe the performance difference of the multi-modal model and then judging the existence and degree of data leakage. BRIEF DESCRIPTION OF DRAWINGS

[0012] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a hardware structure block diagram of an embodiment of the present application for implementing a sample leakage detection method;

[0014] Figure 2 This is a flowchart of a sample leakage detection method according to an embodiment of this application;

[0015] Figure 3 This is a flowchart of an optional sample leakage detection method according to an embodiment of this application;

[0016] Figure 4 This is a schematic diagram of a sample leakage detection device according to an embodiment of this application;

[0017] Figure 5 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0019] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0020] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0021] The specific application environment architecture or specific hardware architecture on which the sample leakage detection method depends is described here.

[0022] The methods and embodiments provided in this application can be executed on a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure block diagram of an embodiment of the present application for implementing a sample leakage detection method. For example... Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a central processing unit (CPU), microprocessor (MCU), or programmable logic device (FPGA), etc.) and a memory 104 for storing data are also shown. The server device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the server equipment described above. For example, the server equipment may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0023] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the sample leakage detection method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to server devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0024] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the server device. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0025] It should be noted that various data breach detection methods have emerged in related technologies.

[0026] Retrieval-based methods detect contamination by searching large-scale corpora used for model training. They search the known training dataset for content similar to the test sample; the presence of similar content suggests potential data leakage. However, when applied to data leakage detection in multimodal models, retrieval methods face several challenges. First, they require searching multimodal data, involving the fusion of multiple data types, significantly increasing the difficulty and making accurate retrieval challenging. Second, retrieval methods rely on the public availability of training corpora, which are often not publicly available for large language models. This makes it difficult to accurately calculate the similarity between the test sample and the training data, hindering the evaluation of all models.

[0027] One approach, based on overlap rate, compares the sample to be detected with known training data, statistically analyzing the frequency and overlap of N consecutive words or symbols in the sample within the training data. If the overlap rate exceeds a certain threshold, the sample is considered potentially compromised. However, when applied to data leakage detection in multimodal models, this approach faces several challenges. First, it deals with highly diverse multimodal data, where texts and images from different domains and styles vary significantly in usage and structure. Overlap rate-based methods struggle to adapt to this diversity and change, failing to adjust detection criteria promptly and thus reducing accuracy and reliability. Second, it relies on the public availability of training corpora. Many large language models do not publicly share their training corpora, making it difficult to accurately calculate the overlap rate between the sample and the training data, hindering the evaluation of all models.

[0028] To address the aforementioned issues, embodiments of this application provide a sample leakage detection method, and the method is described in detail below, in conjunction with its execution flow.

[0029] The following explains the technical terms used in this application:

[0030] Large Language Model (LLM): refers to a "large parameter" model trained using large-scale data and powerful computing capabilities. These models typically have high versatility and generalization ability and can be applied to fields such as natural language processing, image recognition, and speech recognition. They can be divided into large language models, visual large models, multimodal large models, and basic large models.

[0031] Multi-Modal Large Language Model (MLLM): refers to a large model that can simultaneously understand and generate multiple types of data (such as text, images, audio, video, etc.) and achieve more complex tasks through the association between different modal data.

[0032] This embodiment provides a sample leakage detection method. Figure 2 This is a flowchart of a sample leakage detection method according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:

[0033] Step S202: Determine the corresponding sample construction method and data leakage detection method according to the preset data leakage method of the multimodal model. The input data of the multimodal model is multimodal data, and the output data is text data.

[0034] Multimodal models primarily need to generate relevant text data (text descriptions or answers) based on input multimodal data (text, images, audio, video, and other modalities). Data leakage detection focuses on the multimodal model's ability to generate text data after receiving input multimodal data. That is, given a given multimodal model M and a set of original samples to be detected (s), assuming the training samples of multimodal model M are D, the data leakage detection objective is to confirm whether the original sample to be detected (s) has ever appeared in the training samples D of multimodal model M.

[0035] Preset data leakage methods refer to the possible ways data can be leaked during the training of multimodal large models. These are categorized into two main types: unimodal data leakage and multimodal data leakage. Each category can include multiple leakage methods. For example, unimodal data leakage can include leakage of non-text data and leakage of text data. Multimodal data leakage refers to the leakage of both non-text and text data, which can include leakage of non-text and text data from the same original test sample and leakage of non-text and text data from different original test samples. It's important to note that the core idea of ​​each detection method is to detect the performance difference of the model before and after a certain perturbation, and to measure the degree of data leakage based on the extent of this difference, while avoiding the complexity and high cost of introducing additional models.

[0036] For each data leakage method, a corresponding sample construction method is determined to ensure the effectiveness of the detection. Considering that variables can be controlled and the detection of specific data leakage methods can be focused by changing certain aspects of the input data, the sample construction method differs when detecting different data leakage methods. For example, if the preset leakage method to be detected is discontinuous image information leakage, then the sample construction method includes changing the position of objects in the image data of the input data while keeping the text data of the input data unchanged.

[0037] For each type of data breach, a corresponding data breach detection method is determined to ensure the effectiveness of the detection. This method defines how to detect data breaches using the input and output data of a multimodal model, and establishes corresponding evaluation metrics, such as precision offset and probability distribution offset. Based on these metrics, the existence and extent of data breaches corresponding to the preset data breach method can be accurately determined. For example, the presence and degree of data breach can be determined by comparing the evaluation metrics of the multimodal model in processing the original test sample and similar test samples.

[0038] This step clarifies the preset data leakage methods, the corresponding sample construction methods, and the data leakage detection methods, providing a data foundation for solving data leakage problems at the source. This helps to take targeted measures during the training of multimodal models and reduce the occurrence of data leakage.

[0039] Step S204: Construct similar test samples of the original test samples of the multimodal model according to the sample construction method.

[0040] The construction of similar test samples involves perturbating the original test sample to generate a series of similar but not identical test samples. For text data, this can be achieved by changing the positions of words and characters within the text data. For non-text data, this can be achieved by preprocessing the non-text data. For example, when non-text data includes images, image enhancement techniques such as rotation and stretching can be used to produce subtle changes to the image.

[0041] The sample to be detected, similar samples to be tested, and samples in the training dataset are all composed of three parts: text input data, non-text input data, and text output data. For example, in the case of non-text input data (image), the sample can be represented as (input, image, output), where input represents text input data, image represents image input data, and output represents text output data.

[0042] This embodiment constructs similar test samples to the original test samples, laying a data foundation for detecting the response of the multimodal model when receiving slightly different input data. This allows for indirect determination of whether the multimodal model has a special memory or bias towards the original test samples, and whether the original test samples were leaked during the multimodal model training phase. This makes the detection process independent of the degree to which the large model discloses its training data; even for large multimodal models that have not disclosed their training data, it is possible to determine data leakage samples.

[0043] Step S206: Detect the first prediction accuracy of the multimodal model for the original test sample and the second prediction accuracy of the multimodal model for similar test samples according to the data leakage detection method.

[0044] The data breach detection method indicates the prediction tasks to be performed by the multimodal model and the evaluation quantification indicators for assessing the prediction results.

[0045] The first prediction accuracy is the accuracy of the multimodal model in predicting the original test sample. When the prediction task instructs the prediction of the output data corresponding to the sample input data in the original test sample, and the evaluation quantification index is the accuracy offset, the multimodal model will generate text output data based on the input multimodal data. The correctness of the multimodal model output is judged by the standard answer of the evaluation set, thereby calculating the prediction accuracy of the multimodal model on the original test sample.

[0046] The second prediction accuracy is the accuracy of a multimodal model in predicting similar test samples. Compared to the original test samples, similar test samples have undergone perturbation. Therefore, the second prediction accuracy of a multimodal model on similar test samples can be used as an indicator to assess whether a multimodal model over-relies on or memorizes the original test samples.

[0047] Step S208: Determine the leakage status of the original sample under the preset data leakage mode based on the first prediction accuracy and the second prediction accuracy.

[0048] By comparing the accuracy difference of the multimodal model on the original test sample and similar test samples, it can be determined whether the multimodal model "memorized" the original test sample during training, thus avoiding direct access to the training data and reducing dependence on additional models.

[0049] In a prediction task instructing the prediction of output data corresponding to the input data of the original test samples, and using accuracy offset as the evaluation metric, a significant difference between the first and second prediction accuracies (i.e., a substantial decrease in accuracy on similar test samples) indicates that the multimodal model overfitted the original test samples during training, leading to increased sensitivity to small changes and a potential for data leakage in the original test samples under a pre-defined data leakage pattern. Conversely, a small difference between the first and second prediction accuracies suggests that the multimodal model's predictive ability is relatively stable and does not overly rely on specific instances in the training data, thus reducing the likelihood of data leakage in the original test samples under a pre-defined data leakage pattern.

[0050] Through the above steps, the corresponding sample construction method and data leakage detection method are first determined according to the preset data leakage method of the multimodal model, laying the foundation for data leakage detection of the multimodal large language model. Then, similar test samples to the original test samples of the multimodal model are constructed according to the sample construction method, avoiding the testing process from relying on the public availability of training data. Finally, the first prediction accuracy of the multimodal model on the original test samples and the second prediction accuracy of the multimodal model on the similar test samples are detected according to the data leakage detection method. Since the similar test samples are constructed based on the original test samples, the first prediction accuracy and the second prediction accuracy are... The difference between the degrees can reflect the data leakage situation. Therefore, based on the first prediction accuracy and the second prediction accuracy, the leakage situation of the original test sample under the preset data leakage mode can be accurately determined. This can solve the technical problems in related technologies when detecting data leakage of multimodal large language models, which are dependent on the public availability of training data, have high data processing difficulty, and low detection accuracy. By introducing micro-perturbations to observe the performance differences of multimodal models, the existence and extent of data leakage can be judged. This achieves the technical effect of not relying on the public availability of training data, reducing the data processing complexity in the process of detecting data leakage, and improving the accuracy of detection results.

[0051] Figure 3 This is a flowchart of an optional sample leakage detection method according to an embodiment of this application. As an optional implementation, detecting the first prediction accuracy of the multimodal model for the original test sample and the second prediction accuracy of the multimodal model for similar test samples according to the data leakage detection method includes:

[0052] Step S302: Determine the prediction task based on the data leakage detection method.

[0053] Different data breach detection methods define different prediction tasks, and these tasks can be associated with corresponding evaluation metrics. When the data breach detection method indicates the detection of multimodal data breaches, the prediction task can be to predict the output data corresponding to the input data in the original test sample; the evaluation metrics can be accuracy offset and probability distribution offset. When the data breach detection method indicates the detection of unimodal data breaches, the prediction task can also be to predict the masked data in the input data based on the unmasked data and output data in the original test sample; the evaluation metric can be the accuracy of the masking task.

[0054] Step S304: Detect the prediction accuracy of the multimodal model when performing a prediction task based on the original test sample, and obtain the first prediction accuracy.

[0055] After defining the prediction task, the original test samples are input into the multimodal model to perform the prediction task. The prediction accuracy of the multimodal model is then recorded, yielding the first prediction accuracy. This process can be repeated multiple times to collect sufficient data. The first prediction accuracy represents the average accuracy of the multimodal model when performing the preset prediction task on the original test samples. Obtaining the first prediction accuracy establishes a benchmark for subsequent comparison with the performance of the multimodal model when handling perturbed samples (similar test samples).

[0056] Step S306: Detect the prediction accuracy of the multimodal model when performing a prediction task based on similar test samples to obtain the second prediction accuracy.

[0057] After determining the prediction task, similar test samples are input into the multimodal model, which then performs the prediction task. The prediction accuracy of the multimodal model is recorded, yielding the first prediction accuracy. This process can be repeated multiple times to collect sufficient data. The second prediction accuracy represents the average accuracy of the multimodal model when performing the preset prediction task on similar test samples.

[0058] Compared to the original samples, the similar samples underwent minor modifications or perturbations in some aspects, but still retained the basic requirements of the original task. The process of obtaining the second prediction accuracy is similar to that of obtaining the first prediction accuracy, but it uses perturbated samples. The purpose of obtaining the second prediction accuracy is to compare it with the first prediction accuracy, and to assess the possibility of data leakage by analyzing the model's performance on the perturbated samples.

[0059] This embodiment, by designing and executing specific prediction tasks on a multimodal model, allows observation of the performance differences of the multimodal model when facing original test samples and perturbed data (similar test samples), thereby determining the degree of data leakage. The prediction task can also provide a quantitative indicator of leakage, namely the decrease in accuracy, thus laying the foundation for estimating the true level of the model's generalization ability, avoiding biased evaluation results caused by data leakage, and ensuring the accuracy and reliability of model evaluation.

[0060] As an optional implementation, when there are multiple original test samples, determining the leakage status of the original test samples under a preset data leakage mode based on the first prediction accuracy and the second prediction accuracy includes: determining the statistical value of the first prediction accuracy of multiple original test samples to obtain the first statistical value, and determining the statistical value of the second prediction accuracy of multiple similar test samples to obtain the second statistical value; calculating the difference between the first statistical value and the second statistical value to obtain the difference between the first prediction accuracy and the second prediction accuracy; and determining whether the original test samples are leaked and the degree of leakage under the preset data leakage mode based on the difference.

[0061] When faced with multiple original test samples, the prediction accuracy is no longer limited to that of a single original test sample. Instead, the statistical value of the prediction accuracy of all original test samples is calculated, i.e., the first statistical value. This yields the typical performance of the multimodal model on the original test sample dataset without any perturbation, providing a benchmark for subsequent analysis.

[0062] After perturbating each sample in the original test sample dataset to construct a series of similar test samples, the statistical value of the prediction accuracy of all similar test samples is calculated, i.e., the second statistical value, to obtain the typical performance of the multimodal model on the perturbated similar test sample dataset.

[0063] The first and second statistical values ​​are of the same type. The first and second statistical values ​​can use statistical indicators such as mean, median or standard deviation, which can more comprehensively reflect the overall performance of the model on the original test sample dataset and the test sample dataset.

[0064] For example, if there are M original samples to be tested, and the prediction accuracy of each sample is score1, score2, ..., scoreM, the first statistic can be the average of these accuracies. Assuming that N similar samples are constructed for each original sample, the second statistic can be the average of the prediction accuracy of all similar samples.

[0065] Furthermore, the severity of data leakage is quantified by comparing the difference between the first and second statistical values. If the first statistical value is significantly higher than the second statistical value, it indicates that the multimodal model's performance deteriorates when faced with similar samples. This suggests that the multimodal model may have "remembered" certain features from the original samples during training, leading to overly optimistic predictions for these samples during evaluation, i.e., data leakage exists. The magnitude of the difference can serve as an indicator of the degree of leakage. Specifically, a threshold can be set as the judgment criterion. If the difference exceeds the preset threshold, data leakage is confirmed, and the severity of the leakage is determined based on the magnitude of the difference.

[0066] This embodiment uses statistical analysis of multiple original test samples and the prediction accuracy of multiple samples to not only identify whether there is data leakage in the multimodal model, but also to quantify the degree of such leakage. It avoids direct access to the model training data, ensuring the objectivity and reliability of the detection results and preventing overestimation of model performance due to data leakage.

[0067] As an optional implementation, determining the corresponding sample construction method and data leakage detection method based on the preset data leakage method of the multimodal model includes: when the preset data leakage method is a first type of leakage, determining the sample construction method as a first type of sample construction method and determining the data leakage detection method as a first type of detection method. The first type of leakage indicates that both text data and non-text data in the original test sample appear in the training samples of the multimodal model. The first type of sample construction method indicates that the text data in the sample input data of the original test sample is ordered. The prediction task in the first type of detection method is used to predict the output data corresponding to the sample input data in the original test sample.

[0068] Among them, the preset data leakage mode refers to the predefined form of data leakage that the multimodal model may experience, such as the first type of leakage, which is that the training data of the multimodal model includes the sample input data and sample output data of the original test sample.

[0069] The text data and non-text data in the sample input data are referred to as text input data and non-text input data, respectively. The text data in the sample output data is referred to as text output data. The first type of sample construction method refers to the construction strategy of adjusting the order of text input data in the original test sample. For example, in an original test sample that includes text input data and image input data, only the order of the text input data is changed, while the image input data remains unchanged, thereby testing whether the multimodal model has an excessive dependence on or memory of the specific order of text input data.

[0070] The first type of detection method involves performing a prediction task to evaluate whether a multimodal model can correctly predict the output data corresponding to the text input data, even if the order of the data in the text input data is changed. The purpose of the prediction task is to assess the model's sensitivity to changes in the sample input data in order to identify potential data leaks.

[0071] For example, for continuous image information and text data leakage, the method of constructing a comparison accuracy by perturbing the option position is used to detect data leakage; for non-continuous image information and text data leakage, the method of constructing a comparison of the word probability distribution of the text output data by perturbing the word position exchange is used to detect data leakage.

[0072] This embodiment determines the corresponding sample construction method and detection method based on the preset data leakage method. By comparing the accuracy of the multimodal model in performing prediction tasks on the original samples and similar samples, it can quantify the model's sensitivity to changes in the data order in the text input data, and thus determine whether the model has "memorized" specific text order information during the training process, ensuring targeted testing for the first type of data leakage.

[0073] As an optional implementation, when the first type of leakage is the first leakage method, the first type of sample construction method is the first sample construction method. The first leakage method indicates that the sample output data and the sample output data in the original test sample appear as a complete sample in the training samples of the multimodal model. The first sample construction method indicates that the order of multiple options in the text data of the sample input data in the original test sample is adjusted, and the multiple options include the sample output data in the original test sample.

[0074] The first leakage method refers to the complete information of the original test sample, including both text and non-text data, existing as a complete record in the training dataset of the multimodal model. This situation can cause the multimodal model to exhibit unnaturally high accuracy on these samples during evaluation, because the model may have "remembered" the correct answer.

[0075] The text data and non-text data in the sample input data are the text input data and non-text input data, respectively. The text data in the sample output data are the text output data. For example, for the original test sample s in a certain multimodal evaluation set, the first leakage method can be that the image input data, text input data, and text output data involved in the sample have all appeared in the training sample D of model M, and appear as a complete sample in the training sample D.

[0076] The first sample construction method is used to rearrange the order of multiple options in the text input data of the original test sample. These options contain the correct text output data of the original test sample. By randomly changing the order of the options, a set of similar test samples is created. The similar test samples are the same as the original samples in terms of question description and option content, but the relative positions of the options have been changed.

[0077] This embodiment addresses the first leakage method, where the training data contains complete information about the original test sample. By simply adjusting the order of options in the text input data without changing their content, it can effectively test whether the model is overly dependent on a specific option order. This does not require building additional similar samples or complex model comparisons.

[0078] As an optional implementation method, when the sample construction method is the first sample construction method, the similar test samples of the original test samples of the multimodal model constructed according to the sample construction method include: adjusting the order of multiple options in the text data of the sample input data in the original test samples to obtain the adjusted options; concatenating the adjusted options and the data in the sample input data other than the multiple options to form the sample input data in the similar test samples, and determining the sample output data in the original test samples as the sample output data in the similar test samples.

[0079] Under the premise of the first data leakage method, this indicates that the samples in the evaluation set appeared unchanged in the model's training corpus. Since the evaluation set of multimodal models is mostly given in the form of multiple-choice questions, considering that if the model's output text data is highly sensitive to the order of the options, it indicates that leakage occurred during the model's training process, that is, the model "remembered" a certain standard order of the options. In order to directly and easily detect whether the multimodal model involves data leakage in this dimension, similar test samples are constructed using the first sample construction method.

[0080] The text data and non-text data in the sample input data are referred to as text input data and non-text input data, respectively. The text data in the sample output data is referred to as text output data. For example, the text input data consists of a set of answer options A = {A1.xxx1.A2.xxx2.…Ai.xxxi…An.xxxn}, where n is the number of options, and the correct answer is denoted as Am, 1<=m<=n. The set A = {…Ai.xxxi…} is randomly shuffled to obtain a new set A', ensuring that the index of the correct answer Am in A' is different from its original position in A, thus introducing a positional change. The unshuffled text input data (input) is combined with the image input data (image) to form the sample input data (input, image), and then combined with the sample output data to obtain the original test sample. The shuffled text input data (input') is combined with the image input data (image) to construct a new input data (input', image), and then combined with the sample output data to obtain similar test samples.

[0081] In this embodiment, when the data leakage method is the first leakage method, a similar test sample is constructed using the first sample construction method. By changing the order of the options, the memory of a specific order that the multimodal model may have is disrupted, thereby observing its performance when processing such adjusted samples. This helps determine whether the model may have become overly dependent on the original order of the options during training, laying the foundation for accurately detecting data leakage in the first leakage method.

[0082] As an optional implementation, when the prediction task instructs the prediction of the output data corresponding to the sample input data in the original test sample, detecting the prediction accuracy of the multimodal model when performing the prediction task based on the original test sample to obtain a first prediction accuracy includes: performing the step of inputting the sample input data in the original test sample into the multimodal model N times, and determining a first score based on the similarity or difference between the predicted output data of the multimodal model and the sample output data in the original test sample, obtaining N sets of first scores, and determining the first prediction accuracy based on the N sets of first scores, where N is a positive integer; detecting the prediction accuracy of the multimodal model when performing the prediction task based on similar test samples to obtain a second prediction accuracy includes: performing the step of inputting the sample input data in similar test samples into the multimodal model N times, and determining a second score based on the similarity or difference between the predicted output data of the multimodal model and the sample output data in similar test samples, obtaining N sets of second scores, and determining the second prediction accuracy based on the N sets of second scores.

[0083] Given that the evaluation set includes M original test samples, similar test samples are constructed for each of the M original test samples in the evaluation set, and the above operation is repeated N times for each original test sample (the option adjustment method is different for each group of samples) to obtain N groups of similar test samples.

[0084] The text data and non-text data in the sample input data are referred to as text input data and non-text input data, respectively. The text data in the sample output data is referred to as text output data. For example, the sample input data in the original test sample is (input, image), and the sample input data in the similar test samples is (input', image). Based on the (input, image) data from the N sets of original test samples and the (input', image) data from the N sets of similar test samples in the evaluation set, the model is called to obtain the text output data output and output' respectively. Positive and negative labels are added to the text output data output and output' according to the evaluation criteria of the evaluation set for this sample.

[0085] The average evaluation accuracy of the calculation model on the original test sample and similar test samples is used to obtain the first score and the second score, denoted as score and score'.

[0086] in, in

[0087] in, in

[0088] It's important to note that the difference between the first and second scores indicates the model's familiarity with or memorization of the evaluation set, reflecting the severity of data leakage. A difference close to 0 indicates no serious data leakage occurred during model training, while a significantly positive difference suggests a potential large amount of this type of data leakage in the training dataset, causing the trained model's performance to be highly sensitive to perturbations in the options. A threshold can be set for the difference between the first and second scores as a criterion for determining whether training data leakage exists.

[0089] In addition, it should be noted that, besides the difference between the first and second scores, the following values ​​can also be calculated to determine the severity of data leakage during model training:

[0090]

[0091] Here, X represents the number of correct solutions obtained by the multimodal large model in a certain evaluation calculation, but which did not obtain correct solutions in the evaluation set after randomly shuffling the options in the text data. The larger the value of β, the greater the possibility of data leakage during model training. A threshold for β can be set as a basis for judging whether training data leakage exists.

[0092] This embodiment compares the prediction accuracies of two sets of multimodal models when performing prediction tasks based on the original test samples and similar test samples. It can effectively identify the performance differences of the model when faced with small changes in text input data, and thus determine the impact of data leakage on model performance. It can still accurately evaluate the generalization ability of the model without directly accessing the training data.

[0093] As an optional implementation, when the first type of leakage is the second type of leakage method, the first type of sample construction method is the second type of sample construction method. The second type of leakage method indicates that the text data and non-text data in the original test sample appear in different training samples of the multimodal model, and the second type of sample construction method indicates that the word order in the text data of the sample input data in the original test sample is adjusted.

[0094] The second type of leakage refers to a situation where the model's training dataset contains both textual and non-textual data (e.g., image data) from the original test samples, but these data do not appear in the same training sample. In other words, the model may learn the textual and non-textual parts of the test samples separately in different training instances, but it does not train them as a whole.

[0095] The text data and non-text data in the sample input data are the text input data and non-text input data, respectively. The text data in the sample output data are the text output data. For example, for the original test sample s of a certain evaluation set, the second leakage method can be that the image input data, text input data, and text output data involved in the sample have all appeared in the training sample D of model M, but the image data and text data (i.e., text input and text output) appear in two separate training samples.

[0096] The second sample construction method is used to manipulate the text input data in the original test samples. By randomly swapping the order of words, a new set of samples is constructed, thereby disrupting the original structure and order of the text input data, so as to observe the model's performance when processing these samples with changed structures.

[0097] This embodiment addresses the second type of leakage, where the training data contains both text and non-text data of the original test sample, but these are not presented as complete samples. By simply changing the word order of the text input data, the model's dependence on the text input data can be independently assessed, effectively detecting whether a multimodal large model has encountered data leakage due to the "second type of leakage," without affecting the non-text data portion.

[0098] As an optional implementation, when the sample construction method is the second sample construction method, the similar test samples of the original test samples of the multimodal model constructed according to the sample construction method include: adjusting the order of adjacent words in the first text data of the sample input data in the original test samples to obtain the adjusted first text data; concatenating the adjusted first text data and the data other than the first text data in the sample input data to form the sample input data in the similar test samples, and determining the sample output data in the original test samples as the sample output data in the similar test samples.

[0099] When the preset data leakage method is the second leakage method, it indicates that the non-text data and text data in the evaluation set are not continuously leaked into the training data D of model M. Therefore, data leakage cannot be detected simply by swapping the order of text input data options, and the severity of the data leakage exceeds the impact of simply leaking non-text data or simply leaking text data. In order to directly and easily detect whether the multimodal model involves data leakage in this dimension, this embodiment uses the second sample construction method to construct similar test samples.

[0100] The text data and non-text data in the sample input data are referred to as text input data and non-text input data, respectively. The text data in the sample output data is referred to as text output data. For example, for a piece of original text input data 's' to be detected, the shuffled text input data is generated by randomly swapping two adjacent tokens and repeating this process x times. For example, for the text input data "Deep learning is an important technology in the field of artificial intelligence", the shuffled text input data "Learning artificial intelligence is an important technology in the deep learning field" is obtained after multiple random swaps.

[0101] The unscrambled text input data (input) is combined with the image input data (image) to form sample input data (input, image). This sample input data is then combined with the sample output data to obtain the original test sample (s). The scrambled text input data (input') is combined with the image input data (image) to construct a new input data (input', image). This new input data is then combined with the sample output data to obtain similar test samples (s').

[0102] In this embodiment, when the data leakage method is the second leakage method, a similar test sample is constructed using the first sample construction method. By changing the word order in the text input data, the multimodal model may have a memory of a specific order, thereby observing its performance when processing such adjusted samples. This helps determine whether the model may have become overly dependent on the word order in the text input data during training, laying the foundation for accurately detecting data leakage in the second leakage method.

[0103] As an optional implementation, when the prediction task instructs the prediction of the output data corresponding to the sample input data in the original test sample, detecting the prediction accuracy of the multimodal model when performing the prediction task based on the original test sample to obtain a first prediction accuracy includes: performing N steps of inputting the sample input data in the original test sample into the multimodal model and obtaining N sets of first scores based on the first probability distribution data in the inference process of the multimodal model, and determining the first prediction accuracy based on the N sets of first scores, where N is a positive integer; detecting the prediction accuracy of the multimodal model when performing the prediction task based on similar test samples to obtain a second prediction accuracy includes: performing N steps of inputting the sample input data in similar test samples into the multimodal model and obtaining N sets of second scores based on the second probability distribution data in the inference process of the multimodal model, and determining the second prediction accuracy based on the N sets of second scores.

[0104] With the preset data leakage method set to the second leakage method, considering that the model's fit to the training data will affect its performance on the test data, when the model has overfitted to a certain sample (regardless of whether the sample is a text data leakage or a non-text data leakage), when the content of the sample changes slightly, the model's prediction probability before and after the change will change significantly. This embodiment identifies the difference in the model's performance when faced with minor changes in text input data by comparing the two sets of probability distribution data in the inference process of the multimodal model performing prediction tasks based on the original test sample and similar test samples.

[0105] For example, the original test sample is s, and the similar test sample is s'. The distance between the probability distributions of s and s' in the inference process of model M is used as the quantitative evaluation index of the model.

[0106] The computational model calculates the probability distribution data of the original test sample and similar test samples during the inference process, and obtains the first score and the second score, denoted as score and score'.

[0107] `score` represents the probability distribution feature `score(s, M)` of sample `s`, and `score'` represents the probability distribution feature `score(s', M)` of sample `s'`. It should be noted that since the output data of the multimodal large model is text data, this embodiment considers the predicted probability distribution of text data. Based on the values ​​of `score(s, M)` and `score(s', M)`, the average distance between the probability distributions of the original test sample `s` and N similar test samples `s'` can be calculated as follows:

[0108]

[0109] It should be noted that the average distance mentioned above reflects the severity of data leakage during the training of a multimodal large model. An average distance close to 0 indicates that there is less data leakage during training, while a larger absolute value of the average distance indicates more severe data leakage during training. Furthermore, a threshold value for this distance difference can be set as a basis for judging whether training data leakage exists.

[0110] This embodiment takes into account that the predicted probability distribution during inference, determined by the weights of the large model itself, will exhibit different characteristics when using trained data and untrained data. By observing the magnitude of the change in the predicted probability distribution before and after the change, it can be determined whether the training corpus of the model has contained the sample or a part of the sample. Without having to directly access the training data, the generalization ability of the model can still be accurately evaluated.

[0111] As an optional implementation, the first probability distribution data in the inference process of the multimodal model is obtained by: determining the predicted log probability of the word units of the sample input data in the original test samples by the multimodal model, obtaining a first predicted log probability set, and sampling a preset number of first predicted log probabilities from the first predicted log probability set; determining the first probability distribution data based on the preset number of first predicted log probabilities. The second probability distribution data in the inference process of the multimodal model is obtained by: determining the predicted log probability of the word units of the sample input data in similar test samples by the multimodal model, obtaining a second predicted log probability set, and sampling a preset number of second predicted log probabilities from the second predicted log probability set; determining the second probability distribution data based on the preset number of second predicted log probabilities.

[0112] The first probability distribution data can be determined based on the model's predicted log probability of words in the original test sample, and the second probability distribution data can be determined based on the model's predicted log probability of words in similar test samples.

[0113] For example, given the token sequence of the original test sample s, s = {t} j} j∈[1,len(s)] Model M for t j The predicted log probability of this token can be expressed as: logf θ (t j |t1,…,t j-1 When there are many tokens, in order to improve computational efficiency, the first probability distribution data can be determined by sampling the log probabilities of some tokens from the log probabilities of multiple tokens.

[0114] For example, the log probabilities of multiple tokens can be sorted, and the mean of the middle k0% can be selected as the first probability distribution data. Alternatively, the largest k1% and the smallest k2% of tokens can be selected to form sets (for example, if k1 = 5 and k2 = 30, for a sample containing 100 tokens, the 5 tokens with the highest probability and the 30 tokens with the lowest probability are selected), denoted as MAX(s,k1) and MIN(s,k2). The probability distribution characteristics of model M on sample s are characterized by the following index: score(s,M), and a similar test sample s' = {t}. j} j∈[1,len(s')] The probability distribution feature is score(s', M):

[0115]

[0116] As an optional implementation, determining the corresponding sample construction method and data leakage detection method based on the preset data leakage method of the multimodal model includes: when the preset data leakage method is the second type of leakage, determining the sample construction method as the second type of sample construction method and determining the data leakage detection method as the second type of detection method. The second type of leakage indicates that the text data or non-text data in the original test sample appears in the training samples of the multimodal model. The second type of sample construction method indicates that the non-text data in the sample input data of the original test sample is perturbed. The prediction task in the second type of detection method indicates that the sample output data is predicted based on the text data and the perturbed non-text data in the sample input data of the original test sample.

[0117] Among them, the preset data leakage method refers to the predefined form of data leakage that the multimodal model may experience, such as the second type of leakage, which is that the training data of the multimodal model contains text data or non-text data of the original test sample.

[0118] The text data and non-text data in the sample input data are referred to as text input data and non-text input data, respectively. The text data in the sample output data is referred to as text output data. The second type of sample construction method refers to the construction strategy of perturbing the non-text input data in the original test samples. For example, while keeping the content of the text input data unchanged, the non-text input data (e.g., images, audio clips, etc.) is perturbed to generate similar test samples, in order to check whether the model's prediction results depend on the non-text input data in the training data.

[0119] The second type of detection method refers to predicting the sample output data based on the original text input data and the perturbed non-text input data in the test sample. That is, the model is required to handle the masking task, inferring the features or content in the text output data based on the preserved text input data and the perturbed non-text input data.

[0120] For example, for image information leakage, the method of comparing the accuracy of image enhancement perturbation construction under the premise of reverse translation of text data is used to detect data leakage; for text data leakage, the method of comparing the accuracy of blank image information perturbation construction is used to detect leaked data.

[0121] This embodiment can independently assess the model's dependence on non-text input data by perturbing it. If the model can accurately recover or infer the text output data in the sample output data in the prediction task, it indicates that the model has encountered non-text input data similar to or the same as the test sample during the training phase, indicating data leakage. If the model's prediction accuracy drops significantly when faced with perturbed non-text input data, it indicates that the model has not over-relyed on this data and has not suffered such leakage in the training data, thus enabling a better assessment of the model's generalization ability and its ability to process unknown information.

[0122] As an optional implementation, when the second type of leakage is the third type of leakage method, the second type of sample construction method is the third type of sample construction method. The third type of leakage method indicates that the non-text data in the original test sample appears in the training samples of the multimodal model, and the text data in the original test sample does not appear in the training samples of the multimodal model. The third type of sample construction method indicates that the non-text data in the original test sample is perturbed, and the key points in the text data in the sample output data are masked.

[0123] The third leakage method refers to a model's training data containing only non-textual data from the original test samples, such as images, audio, or video, while textual data (problem descriptions, input text, etc.) is absent from the training data. This suggests that the model may gain an advantage in processing tasks associated with this non-textual data through the repetition of non-textual data.

[0124] The text data and non-text data in the sample input data are the text input data and non-text input data, respectively. The text data in the sample output data are the text output data. For example, for the original test sample s of a certain evaluation set, the image input data involved in the sample has appeared in the training sample D of model M, while the text data involved in the sample (i.e., text input and text output) has not appeared in the training sample D of model M.

[0125] The third sample construction method is used to perturb the non-text input data in the original test samples and to mask the key information of the key points in the text output data of the sample output data. Key information refers to the most identifiable elements in the text output data or those that have a decisive impact on task solving. By constructing similar test samples using text input data, perturbed non-text input data, and key points, the model is tested to see if it can correctly perform the masking task and correctly predict the key information of the key points when faced with perturbed non-text input data.

[0126] This embodiment addresses the third leakage method, where the training data includes non-text input data of the original test samples. By perturbing the non-text input data, it is possible to test whether the model truly possesses generalization ability, rather than relying solely on repeated non-text instances in the training data.

[0127] As an optional implementation, when the sample construction method is the third sample construction method, the similar test samples of the original test samples used to construct the multimodal model according to the sample construction method include: adjusting the text data in the sample input data of the original test samples to obtain adjusted first text data, wherein the adjusted first text data and the text data in the sample input data have the same data content but different expression forms; adjusting the non-text data in the sample input data of the original test samples to obtain adjusted non-text data, wherein the adjusted non-text data and the non-text data before adjustment have the same data content but different expression forms, and the non-text data is an image. In this context, adjustments to non-text data include image enhancement; adjustments are made to the text data in the sample output data of the original test sample to obtain adjusted second text data; key information is extracted from multiple key points in the adjusted first text data to obtain multiple key information, wherein the adjusted second text data and the text data in the sample output data have the same data content but different expression forms; the adjusted first text data, the adjusted non-text data, and the multiple key points are determined as the sample input data in similar test samples, and the multiple key information is combined into the sample output data in similar test samples, wherein the multimodal model is used to complete the prediction task of multiple key information.

[0128] The text data and non-text data in the sample input data are referred to as text input data and non-text input data, respectively. The text data in the sample output data is referred to as text output data. Under the preset data leakage method of the third leakage method, this indicates that non-text input data from the samples in the evaluation set appeared in the model's training corpus. For example, if the non-text input data is an image, and only the image input data from the original test samples is leaked during the training of a multimodal large model, it will also lead to the accuracy of the evaluation task being higher than the model's actual capability. This data leakage can be addressed by constructing detailed text descriptions of the images in the original test samples, allowing the model to memorize the image descriptions during the training phase, thereby improving accuracy during the evaluation process.

[0129] For example, when the non-text input data is an image, if the model can predict important missing information such as objects, colors, and locations in a sentence, but cannot correctly predict them after the image is perturbed (image enhancement), it may indicate that the model encountered the original image during training.

[0130] Given that the original test samples include image input data, text input data, and text output data, similar test samples are constructed in the following way:

[0131] First, in order to eliminate the interference of text data leakage in the process of detecting image leakage, the expression of the text input data (input) and text output data (output) in the original test sample is adjusted to form (input', output').

[0132] Then, the key information points in the text output data "output" are identified. The perturbed text output data is labeled, and the key points are extracted to form "output". The information of the key points, i.e., the key information, includes the key objects, key colors, and key locations actually contained in the image information. The key information can be extracted using a text data extraction model.

[0133] Furthermore, the original image information in the original test sample is transformed, specifically by enhancement transformations such as stretching, rotation, affine transformation, projection transformation, sharpening, and other operations, to obtain image'.

[0134] Finally, using (image, input', output") as the input data for the masking task corresponding to the original test sample, the extracted key information is used as the output data to be predicted by the masking task. Similarly, using (image', input', output") as the input data for the masking task corresponding to the similar test sample, the extracted key information is used as the output data to be predicted by the masking task, thus laying the foundation for the execution of the masking task.

[0135] In this embodiment, when the data leakage method is the third leakage method, a similar test sample is constructed using the third sample construction method. The text input data, non-text input data, and text output data are perturbed. The key points of the perturbed non-text input data, text input data, and perturbed text output data are used as the input data for the masking task. The key information of the perturbed text output data is used as the target of the masking task. The masking task is used to test whether the model records the description of the image, thereby determining whether the model truly has generalization ability.

[0136] As an optional implementation, when the prediction task instructs the prediction of mask data in the sample output data based on text data and perturbed non-text data in the original test sample input data, detecting the prediction accuracy of the multimodal model when performing the prediction task based on the original test sample to obtain the first prediction accuracy includes: performing N steps of inputting the mask points of the text data, perturbed non-text data, and sample output data in the original test sample into the multimodal model, and determining the first score based on the similarities and differences between the mask data predicted by the multimodal model and the mask data in the sample output data of the original test sample. The process involves obtaining N sets of first scores and determining the first prediction accuracy based on these N sets of first scores, where N is a positive integer. The second prediction accuracy is obtained by detecting the prediction accuracy of the multimodal model when performing a prediction task based on similar test samples. This includes performing N steps of inputting the text data, perturbed non-text data, and masked points of the sample output data from similar test samples into the multimodal model, and determining the second score based on the differences between the masked data predicted by the multimodal model and the masked data in the sample output data from similar test samples. This process yields N sets of second scores, and the second prediction accuracy is determined based on these N sets of second scores.

[0137] The text data and non-text data in the sample input data are referred to as text input data and non-text input data, respectively. The text data in the sample output data is referred to as text output data. For example, the input data of the masking task corresponding to the original test sample is (image, input', output"), and the input data of the masking task corresponding to the similar test sample is (image', input', output"), where image is the image input data before perturbation, image' is the image input data after perturbation, input' is the text input data after perturbation, and output" is the key point in the text output data after perturbation. Using (image, input', output") and (image', input', output") as input data, a multimodal large model is called to complete the masking task at the key point. The accuracy of the masking task is statistically analyzed under the two sets of input data.

[0138] For example, after obtaining the text output data output' after perturbing the original file output data output in the test sample, key content is extracted, such as the extracted keywords "sycamore tree" and "blue". After transforming the original image information image into image', if the multimodal model can accurately complete the mask output task based on the original image input data, that is, correctly output "sycamore tree" and "blue", but cannot complete the mask output task based on the transformed image input data, that is, cannot correctly output "sycamore tree" and "blue", it indicates that the model has a data leakage phenomenon in the instance.

[0139] For the M original test samples and similar test samples in the evaluation set, repeat the above operation N times, calculate the average precision under the original image input data as score, and denote the average precision under the transformed image input data as score'.

[0140] in, in

[0141] in, in

[0142] It should be noted that the difference between the first and second scores indicates the model's familiarity or memorization of the samples in the evaluation set, reflecting the severity of data leakage. A difference close to 0 indicates that no serious data leakage occurred during model training. A significantly positive difference indicates that there may be a large amount of this type of data leakage in the training dataset, causing the trained model's performance to be highly sensitive to perturbations. A threshold can be set for the difference between the first and second scores as a basis for determining whether training data leakage exists.

[0143] This embodiment employs a multimodal model to perform a masking task based on the original test sample and similar test samples to determine whether non-textual data in the training data has been leaked, thereby improving the accuracy of identifying data leakage issues.

[0144] This embodiment compares the accuracy of multimodal models performing masking tasks based on original test samples and similar test samples. It can effectively identify the differences in model performance when facing the presence or absence of images, and thus determine the impact of data leakage on model performance. It can still accurately evaluate the generalization ability of the model without directly accessing the training data.

[0145] As an optional implementation, adjusting the text data in the sample input data of the original test sample to obtain adjusted first text data includes: converting the text data in the sample input data from a first original language to a first original language through at least one language to obtain adjusted first text data; adjusting the text data in the sample output data of the original test sample to obtain adjusted second text data includes: converting the text data in the sample output data from a second original language to a second original language through at least one language to obtain adjusted second text data.

[0146] The text data and non-text data in the sample input data are referred to as text input data and non-text input data, respectively. The text data in the sample output data is referred to as text output data. Here, the first original language and the second original language refer to the initial languages ​​of the text input data and text output data in the original test sample, respectively. For example, the text input data can be Chinese, and the text output data can also be Chinese.

[0147] Language conversion refers to the process of converting text data from its original language to at least one intermediate language, and then converting it back to its original language. This process preserves the semantic core of the text data while changing its form of expression to facilitate further analysis.

[0148] For example, for text data in the original test sample or text data in similar test samples, a reverse translation operation can be performed on the text data (text input data and text output data) to eliminate the interference of text data leakage. For example, first translate Chinese into Japanese, and then translate Japanese back into Chinese.

[0149] This embodiment converts the text input and output data by language, which not only preserves the semantics of the original information but also changes its form, thereby enabling the verification of whether the model has memorized the specific text data before conversion.

[0150] As an optional implementation, when the second type of leakage is the fourth type of leakage method, the second type of sample construction method is the fourth type of sample construction method. The fourth type of leakage method indicates that the text data in the original test sample appears in the training samples of the multimodal model, and the non-text data in the original test sample does not appear in the training samples of the multimodal model. The fourth type of sample construction method indicates that the non-text data in the sample input data of the original test sample is masked as a whole.

[0151] The fourth leakage method refers to the fact that the training data of the model only contains the text data of the original test sample, while non-text data, such as images, audio or video, does not appear in the training data.

[0152] The text data and non-text data in the sample input data are the text input data and non-text input data, respectively. The text data in the sample output data are the text output data. For example, for the original test sample s of a certain evaluation set, the text data involved in the sample (i.e., the text input data and the text output data) has appeared in the training sample D of model M, while the image input data image involved in the sample has not appeared in the training sample D of model M.

[0153] The fourth sample construction method is used to mask the non-text data in the original test samples. That is, while retaining the original text data, it completely masks or replaces the non-text data in the original test samples, thereby generating similar test samples. By ensuring that the integrity of the non-text data is destroyed while the text data remains unchanged, the test examines whether the model can still correctly perform the prediction task when important non-text data is missing.

[0154] This embodiment addresses the fourth leakage method, where the training data includes the text data of the original test sample. By masking the non-text data as a whole, it is possible to test whether the model truly possesses generalization ability, rather than relying solely on repeated text instances in the training data.

[0155] As an optional implementation, when the sample construction method is the fourth sample construction method, the similar test samples of the original test samples of the multimodal model constructed according to the sample construction method include: performing an overall masking operation on the non-text data in the original test samples to obtain blank data; concatenating the blank data and the data other than non-text data in the sample input data to form the sample input data in the similar test samples, and determining the sample output data in the original test samples as the sample output data in the similar test samples.

[0156] The text data and non-text data in the sample input data are referred to as text input data and non-text input data, respectively. The text data in the sample output data is referred to as text output data. Under the preset data leakage method of the fourth leakage method, it means that the text data in the original test samples in the evaluation set appeared in the training corpus of the model. For example, if the non-text input data is an image, even if the image input data in the original test samples is not leaked into the training process of the multimodal large model, it has "memorized" the text input data and text output data of the evaluation samples during its training process. Therefore, there is still a greater possibility that the "memorized" content will be output during the evaluation process.

[0157] For example, when the non-text input data is an image, considering that a large multimodal model can correctly answer questions that require images even without them, this might indicate a data leak in the instance. When the original test sample includes image input data, non-text input data, and text output data, similar test samples are constructed as follows:

[0158] For each of the M original test samples, the following operations are performed: combine the image input data image and the text input data input to form (image, input), and then combine the sample output data to obtain the original test sample s; combine the blank image image_empty and the text input data input to form (image_empty, input), and then combine the sample output data to obtain the similar test sample s'.

[0159] In this embodiment, when the data leakage method is the fourth leakage method, a similar test sample is constructed using the fourth sample construction method. By masking the non-text input data as a whole, the performance of the model in processing such adjusted samples is observed, and it is determined whether the model may have become overly dependent on text input data during the training process. This lays the foundation for accurately detecting data leakage of the fourth leakage method.

[0160] In one optional implementation, when the prediction task instructs the prediction of the output data corresponding to the sample input data in the original test sample, detecting the prediction accuracy of the multimodal model when performing the prediction task based on the original test sample to obtain a first prediction accuracy includes: performing the step of inputting the sample input data in the original test sample into the multimodal model N times, and determining a first score based on the similarity or difference between the predicted output data of the multimodal model and the sample output data in the original test sample, obtaining N sets of first scores, and determining the first prediction accuracy based on the N sets of first scores, where N is a positive integer; detecting the prediction accuracy of the multimodal model when performing the prediction task based on similar test samples to obtain a second prediction accuracy includes: performing the step of inputting the sample input data in the similar test samples into the multimodal model N times, and determining a second score based on the similarity or difference between the predicted output data of the multimodal model and the sample output data in the similar test samples, obtaining N sets of second scores, and determining the second prediction accuracy based on the N sets of second scores.

[0161] The text data and non-text data in the sample input data are referred to as text input data and non-text input data, respectively. The text data in the sample output data are referred to as text output data. For example, the input data of the original test sample is (image, input), and the input data of similar test samples is (image_empty, input). The model is called to obtain the text output data output and output' respectively, and positive and negative labels are added to the text output data output and output' according to the evaluation criteria of the sample. The above operation is repeated N times. The average evaluation accuracy of the model on the original test sample and similar test samples is calculated to obtain the first score and the second score, denoted as score and score'.

[0162] in, in in

[0163] It should be noted that the difference between the first and second scores reflects the severity of data leakage. A significantly positive difference indicates that the model did not memorize the content of the text input data in the evaluation set; the closer the difference is to 0, the more severe the data leakage that occurred during model training. A threshold can be set for the difference between the first and second scores as a criterion for determining whether training data leakage exists.

[0164] Furthermore, it's important to note that the smaller the second score, or the closer its value is to the accuracy of random guessing, the less likely data leakage has occurred during the training of the multimodal large model. A threshold for the second score can be set as a criterion for determining whether training data leakage exists. It's also worth noting that, to more accurately assess the severity of data leakage, for multimodal large models with strong instruction following, when inferring from evaluation samples in situations without input image data, a prompt can be added: "If you feel you cannot draw a conclusion with the current information, output 'Condition Missing'." For multimodal large models without data leakage, this avoids comparison errors caused by random guessing.

[0165] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0166] Embodiments of this application also provide a sample leakage detection device. Figure 4 This is a schematic diagram of a sample leakage detection device according to an embodiment of this application, such as... Figure 4 As shown, the device includes:

[0167] The first determining unit 402 is used to determine the corresponding sample construction method and data leakage detection method according to the preset data leakage method of the multimodal model, wherein the input data of the multimodal model is multimodal data and the output data is text data;

[0168] Construction unit 404 is used to construct similar test samples of the original test samples of the multimodal model according to the sample construction method;

[0169] The second determining unit 406 is used to detect the first prediction accuracy of the multimodal model for the original test sample and the second prediction accuracy of the multimodal model for similar test samples according to the data leakage detection method.

[0170] The third determining unit 408 is used to determine the leakage status of the original test sample under the preset data leakage mode based on the first prediction accuracy and the second prediction accuracy.

[0171] Using the above device, the corresponding sample construction method and data leakage detection method are first determined according to the preset data leakage method of the multimodal model, laying the foundation for data leakage detection of the multimodal large language model. Then, similar test samples to the original test samples of the multimodal model are constructed according to the sample construction method, avoiding the testing process from relying on the public release of training data. Next, the first prediction accuracy of the multimodal model for the original test samples and the second prediction accuracy of the multimodal model for the similar test samples are detected according to the data leakage detection method. Since the similar test samples are constructed based on the original test samples, the first prediction accuracy and the second prediction accuracy are... The difference between the degrees can reflect the data leakage situation. Therefore, based on the first prediction accuracy and the second prediction accuracy, the leakage situation of the original test sample under the preset data leakage method can be accurately determined. This can solve the technical problems in related technologies when detecting data leakage of multimodal large language models, which involve dependence on the public availability of training data, high data processing difficulty, and low detection accuracy. By introducing micro-perturbations to observe the performance differences of multimodal models, the existence and extent of data leakage can be judged. This achieves the technical effect of not relying on the public availability of training data, reducing the data processing complexity in the process of detecting data leakage, and improving the accuracy of detection results. Optionally, the second determining unit 406 includes: a first determining module, used to determine the prediction task according to the data leakage detection method; a first detection module, used to detect the prediction accuracy of the multimodal model when performing the prediction task based on the original test sample, to obtain the first prediction accuracy; and a second detection module, used to detect the prediction accuracy of the multimodal model when performing the prediction task based on similar test samples, to obtain the second prediction accuracy.

[0172] Optionally, when the prediction task instructs the prediction of the output data corresponding to the sample input data in the original test sample, the first detection module is used to: perform N steps of inputting the sample input data in the original test sample into the multimodal model, and determining a first score based on the similarity or difference between the predicted output data of the multimodal model and the sample output data in the original test sample, to obtain N sets of first scores, and determine a first prediction accuracy based on the N sets of first scores, where N is a positive integer; the second detection module is used to: perform N steps of inputting the sample input data in similar test samples into the multimodal model, and determining a second score based on the similarity or difference between the predicted output data of the multimodal model and the sample output data in similar test samples, to obtain N sets of second scores, and determine a second prediction accuracy based on the N sets of second scores.

[0173] Optionally, when the prediction task instructs the prediction of mask data in sample output data based on text data and perturbed non-text data in the original test sample input data, the first detection module is configured to: perform N steps of inputting the mask points of text data, perturbed non-text data, and sample output data in the original test sample into a multimodal model, and determining a first score based on the similarity or difference between the mask data predicted by the multimodal model and the mask data in the sample output data in the original test sample, thereby obtaining N sets of first scores, and determining a first prediction accuracy based on the N sets of first scores, where N is a positive integer; the second detection module is configured to: perform N steps of inputting the mask points of text data, perturbed non-text data, and sample output data in similar test samples into a multimodal model, and determining a second score based on the similarity or difference between the mask data predicted by the multimodal model and the mask data in the sample output data in similar test samples, thereby obtaining N sets of second scores, and determining a second prediction accuracy based on the N sets of second scores.

[0174] Optionally, when the prediction task instructs the prediction of the output data corresponding to the sample input data in the original test sample, the first detection module is used to: perform N steps of inputting the sample input data in the original test sample into the multimodal model and obtaining N sets of first scores based on the first probability distribution data in the inference process of the multimodal model, and determine the first prediction accuracy based on the N sets of first scores, where N is a positive integer; the second detection module is used to: perform N steps of inputting the sample input data in similar test samples into the multimodal model and obtaining N sets of second scores based on the second probability distribution data in the inference process of the multimodal model, and determine the second prediction accuracy based on the N sets of second scores.

[0175] Optionally, when the original test samples include multiple samples, the third determining unit 408 includes: a second determining module, used to determine the first prediction accuracy statistical value of the multiple original test samples to obtain the first statistical value, and to determine the second prediction accuracy statistical value of the multiple similar test samples to obtain the second statistical value; a calculation module, used to calculate the difference between the first statistical value and the second statistical value to obtain the difference between the first prediction accuracy and the second prediction accuracy; and a third determining module, used to determine whether the original test samples are leaked and the degree of leakage under a preset data leakage mode based on the difference.

[0176] Optionally, the first determining unit 402 is used to: determine the sample construction method as the first type of sample construction method and determine the data leakage detection method as the first type of detection method when the preset data leakage method is the first type of leakage type. The first type of leakage type indicates that both text data and non-text data in the original test sample appear in the training samples of the multimodal model. The first type of sample construction method indicates that the text data in the sample input data of the original test sample is ordered. The prediction task in the first type of detection method is used to predict the output data corresponding to the sample input data in the original test sample.

[0177] Optionally, when the first type of leakage is the first leakage method, the first type of sample construction method is the first sample construction method, wherein the first leakage method indicates that the sample output data and the sample output data in the original test sample appear as a complete sample in the training samples of the multimodal model, and the first sample construction method indicates that the order of multiple options in the text data in the sample input data of the original test sample is adjusted, and the multiple options include the sample output data in the original test sample.

[0178] Optionally, when the second type of leakage is the first type of leakage, the construction unit 404 includes: a first adjustment module, used to adjust the order of multiple options in the text data of the sample input data in the original test sample to obtain the adjusted options; and a first sample determination module, used to concatenate the adjusted options and the data in the sample input data other than the multiple options into the sample input data of the similar test sample, and determine the sample output data in the original test sample as the sample output data of the similar test sample.

[0179] Optionally, when the first type of leakage is the second type of leakage, the first type of sample construction method is the second type of sample construction method, wherein the second type of leakage indicates that the text data and non-text data in the original test sample appear in different training samples of the multimodal model, and the second type of sample construction method indicates that the word order in the text data of the sample input data in the original test sample is adjusted.

[0180] Optionally, when the second type of leakage is the second leakage method, the construction unit 404 includes: a second adjustment module, used to adjust the order of adjacent words in the first text data in the sample input data of the original test sample to obtain the adjusted first text data; and a second sample determination module, used to concatenate the adjusted first text data and the data other than the first text data in the sample input data to form the sample input data in the similar test sample, and determine the sample output data in the original test sample as the sample output data in the similar test sample.

[0181] Optionally, the first determining unit 402 is used to: determine the sample construction method as the second type of sample construction method and determine the data leakage detection method as the second type of detection method when the preset data leakage method is the second type of leakage. The second type of leakage indicates that the text data or non-text data in the original test sample appears in the training samples of the multimodal model. The second type of sample construction method indicates that the non-text data in the sample input data of the original test sample is perturbed. The prediction task in the second type of detection method indicates that the sample output data is predicted based on the text data and the perturbed non-text data in the original test sample.

[0182] Optionally, when the second type of leakage is the third type of leakage method, the second type of sample construction method is the third type of sample construction method. The third type of leakage method indicates that the non-text data in the original test sample appears in the training sample of the multimodal model, and the text data in the original test sample does not appear in the training sample of the multimodal model. The third type of sample construction method indicates that the non-text data in the original test sample is perturbed, and the key points in the text data in the sample output data are masked.

[0183] Optionally, when the sample construction method is the third sample construction method, the construction unit 404 includes: a third adjustment module, used to adjust the text data in the sample input data of the original test sample to obtain adjusted first text data, wherein the adjusted first text data and the text data in the sample input data have the same data content but different expression forms; a fourth adjustment module, used to adjust the non-text data in the sample input data of the original test sample to obtain adjusted non-text data, wherein the adjusted non-text data and the non-text data before adjustment have the same data content but different expression forms. If the non-text data is an image, the adjustment of the non-text data includes image... The first module is used for enhancement; the fifth adjustment module is used to adjust the text data in the sample output data of the original test sample to obtain the adjusted second text data, and extract key information from multiple key points in the adjusted first text data to obtain multiple key information. The adjusted second text data and the text data in the sample output data have the same data content but different expression forms; the third sample determination module is used to determine the adjusted first text data, the adjusted non-text data and multiple key points as the sample input data in similar test samples, and combine multiple key information into the sample output data in similar test samples. The multimodal model is used to complete the prediction task of multiple key information.

[0184] Optionally, the third adjustment module is used to: convert the text data in the sample input data from the first original language to the first original language through at least one language to obtain the adjusted first text data; the fifth adjustment module is used to: convert the text data in the sample output data from the second original language to the second original language through at least one language to obtain the adjusted second text data.

[0185] Optionally, when the second type of leakage is the fourth type of leakage method, the second type of sample construction method is the fourth type of sample construction method, wherein the fourth type of leakage method indicates that the text data in the original test sample appears in the training sample of the multimodal model, and the non-text data in the original test sample does not appear in the training sample of the multimodal model, and the fourth type of sample construction method indicates that the non-text data in the sample input data of the original test sample is masked as a whole.

[0186] Optionally, when the sample construction method is the fourth sample construction method, the construction unit 404 includes: a fourth adjustment module, used to perform an overall masking operation on the non-text data in the original test sample to obtain blank data; and a fourth sample determination module, used to concatenate the blank data and the data other than non-text data in the sample input data to form the sample input data in the similar test sample, and determine the sample output data in the original test sample as the sample output data in the similar test sample.

[0187] For a description of the features in the embodiment corresponding to the sample leakage detection device, please refer to the relevant description of the embodiment corresponding to the sample leakage detection method, which will not be repeated here.

[0188] Embodiments of this application also provide an electronic device. Figure 5 This is a schematic diagram of an electronic device according to an embodiment of this application, such as... Figure 5 As shown, the electronic device includes a memory and a processor, the memory storing a computer program, and the processor being configured to run the computer program to perform the steps in any of the above-described embodiments of the sample leakage detection method.

[0189] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described sample leakage detection method embodiments when running.

[0190] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0191] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described sample leakage detection method embodiments.

[0192] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described sample leakage detection method embodiments.

[0193] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0194] The foregoing has provided a detailed description of a sample leakage detection method, apparatus, electronic device, and computer program product provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to aid in understanding the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A method of sample leak detection, the method comprising: The method comprises the following steps: According to the preset data leakage mode of the multi-modal model, determine the corresponding sample construction method and data leakage detection method, wherein the input data of the multi-modal model is multi-modal data, and the output data is text data; According to the sample construction method, construct similar test samples of the original test samples of the multi-modal model; According to the data leakage detection method, detect the first prediction accuracy of the multi-modal model on the original test samples, and the second prediction accuracy of the multi-modal model on the similar test samples; According to the first prediction accuracy and the second prediction accuracy, determine the leakage situation of the original test samples under the preset data leakage mode.

2. The sample leakage detection method according to claim 1, characterized by, According to the data leakage detection method, detect the first prediction accuracy of the multi-modal model on the original test samples, and the second prediction accuracy of the multi-modal model on the similar test samples, which comprises: According to the data leakage detection method, determine the prediction task; Detect the prediction accuracy of the multi-modal model based on the original test samples when performing the prediction task, and obtain the first prediction accuracy; Detect the prediction accuracy of the multi-modal model based on the similar test samples when performing the prediction task, and obtain the second prediction accuracy.

3. The sample leakage detection method according to claim 2, characterized by, In the case where the prediction task indicates predicting the output data corresponding to the sample input data in the original test samples, detecting the prediction accuracy of the multi-modal model based on the original test samples when performing the prediction task, and obtaining the first prediction accuracy comprises: Performing the step of inputting the sample input data in the original test samples into the multi-modal model N times, and determining the first score according to the difference between the prediction output data of the multi-modal model and the sample output data in the original test samples, obtaining N groups of first scores, and determining the first prediction accuracy according to N groups of first scores, wherein N is a positive integer; Detecting the prediction accuracy of the multi-modal model based on the similar test samples when performing the prediction task, and obtaining the second prediction accuracy comprises: Performing the step of inputting the sample input data in the similar test samples into the multi-modal model N times, and determining the second score according to the difference between the prediction output data of the multi-modal model and the sample output data in the similar test samples, obtaining N groups of second scores, and determining the second prediction accuracy according to N groups of second scores.

4. The sample leakage detection method according to claim 2, characterized by, In the case where the prediction task indicates predicting the mask data in the sample output data according to the text data in the sample input data in the original test samples and the perturbed non-text data, detecting the prediction accuracy of the multi-modal model based on the original test samples when performing the prediction task, and obtaining the first prediction accuracy comprises: The step of inputting the text data, the disturbed non-text data and the mask point of the sample output data in the sample input data in the original to-be-tested sample into the multi-modal model N times and determining a first score according to the difference between the mask data predicted by the multi-modal model and the mask data in the sample input data in the original to-be-tested sample, obtaining N groups of the first score, and determining the first prediction accuracy according to N groups of the first score, wherein N is a positive integer; The step of detecting the prediction accuracy of the multi-modal model based on the similar to-be-tested sample performing the prediction task, obtaining the second prediction accuracy includes: The step of inputting the text data, the disturbed non-text data and the mask point of the sample output data in the sample input data in the similar to-be-tested sample into the multi-modal model N times and determining a second score according to the difference between the mask data predicted by the multi-modal model and the mask data in the sample output data in the similar to-be-tested sample, obtaining N groups of the second score, and determining the second prediction accuracy according to N groups of the second score.

5. The method of claim 2, wherein, In the case where the prediction task indicates predicting the output data corresponding to the sample input data in the original to-be-tested sample, the step of detecting the prediction accuracy of the multi-modal model based on the original to-be-tested sample performing the prediction task, obtaining the first prediction accuracy includes: The step of inputting the sample input data in the original to-be-tested sample into the multi-modal model N times and according to the first probability distribution data in the inference process of the multi-modal model, obtaining N groups of first scores, and determining the first prediction accuracy according to N groups of the first score, wherein N is a positive integer; The step of detecting the prediction accuracy of the multi-modal model based on the similar to-be-tested sample performing the prediction task, obtaining the second prediction accuracy includes: The step of inputting the sample input data in the similar to-be-tested sample into the multi-modal model N times and according to the second probability distribution data in the inference process of the multi-modal model, obtaining N groups of second scores, and determining the second prediction accuracy according to N groups of the second score.

6. The method of claim 1, wherein In the case where the original to-be-tested sample includes multiple pieces, the step of determining the leakage of the original to-be-tested sample under the preset data leakage mode according to the first prediction accuracy and the second prediction accuracy includes: Determine the statistical value of the first prediction accuracy of the original to-be-tested sample, obtain the first statistical value, and determine the statistical value of the second prediction accuracy of the similar to-be-tested sample, obtain the second statistical value; Calculate the difference between the first statistical value and the second statistical value, obtain the difference between the first prediction accuracy and the second prediction accuracy; According to the difference, determine whether the original to-be-tested sample leaks under the preset data leakage mode and the degree of leakage.

7. The method of claim 2, wherein According to the preset data leakage mode of the multi-modal model, determine the corresponding sample construction mode and the data leakage detection mode, which includes: In a case where the preset data leakage manner is a first leakage type, it is determined that the sample construction manner is a first sample construction manner, and it is determined that the data leakage detection manner is a first detection manner, wherein the first leakage type indicates that text data and non-text data in the original test sample are present in the training sample of the multi-modal model, the first sample construction manner indicates that the text data in the sample input data in the original test sample is sequentially adjusted, and a prediction task in the first detection manner is used to predict output data corresponding to the sample input data in the original test sample.

8. The sample leakage detection method according to claim 7, wherein In a case where the first leakage type is a first leakage manner, the first sample construction manner is a first sample construction manner, wherein the first leakage manner indicates that sample output data in the original test sample and the sample output data are present as a complete sample in the training sample of the multi-modal model, and the first sample construction manner indicates that a plurality of options in the text data in the sample input data in the original test sample are sequentially adjusted, and the plurality of options include the sample output data in the original test sample.

9. The sample leakage detection method according to claim 8, wherein In a case where the sample construction manner is the first sample construction manner, constructing a similar test sample of the original test sample of the multi-modal model according to the sample construction manner includes: sequentially adjusting the plurality of options in the text data in the sample input data in the original test sample to obtain adjusted options; splicing the adjusted options and data other than the plurality of options in the sample input data into sample input data in the similar test sample, and determining the sample output data in the original test sample as sample output data in the similar test sample.

10. The method of claim 8, wherein, In a case where the first leakage type is a second leakage manner, the first sample construction manner is a second sample construction manner, wherein the second leakage manner indicates that the text data and the non-text data in the original test sample are present in different training samples of the multi-modal model, and the second sample construction manner indicates that token in the text data in the sample input data in the original test sample is sequentially adjusted.

11. The sample leak detection method of claim 10, wherein, In a case where the sample construction manner is the second sample construction manner, constructing a similar test sample of the original test sample of the multi-modal model according to the sample construction manner includes: sequentially adjusting adjacent tokens in the first text data in the sample input data in the original test sample to obtain adjusted first text data; splicing the adjusted first text data and data other than the first text data in the sample input data into sample input data in the similar test sample, and determining the sample output data in the original test sample as sample output data in the similar test sample.

12. The method of claim 2, wherein, According to a preset data leakage manner of a multi-modal model, a corresponding sample construction manner and a data leakage detection manner are determined, including: In a case where the preset data leakage manner is a second type of leakage, it is determined that the sample construction manner is a second type of sample construction manner, and the data leakage detection manner is a second type of detection manner, where the second type of leakage indicates that text data or non-text data in the original test sample appears in the training sample of the multi-modal model, the second type of sample construction manner indicates that the non-text data in the sample input data in the original test sample is disturbed, and the prediction task in the second type of detection manner indicates that the sample output data is predicted according to the text data and the disturbed non-text data in the sample input data in the original test sample.

13. The method of claim 12, wherein, In a case where the second type of leakage is a third leakage manner, the second type of sample construction manner is a third sample construction manner, where the third leakage manner indicates that the non-text data in the original test sample appears in the training sample of the multi-modal model, and the text data in the original test sample does not appear in the training sample of the multi-modal model, and the third sample construction manner indicates that the non-text data in the original test sample is disturbed and the key points in the text data in the sample output data are masked.

14. The method of claim 13, wherein, In a case where the sample construction manner is a third sample construction manner, constructing a similar test sample of the original test sample of the multi-modal model according to the sample construction manner includes: adjusting the text data in the sample input data in the original test sample to obtain adjusted first text data, where the adjusted first text data and the text data in the sample input data have the same data content but different expression forms; adjusting the non-text data in the sample input data in the original test sample to obtain adjusted non-text data, where the adjusted non-text data and the non-text data before adjustment have the same data content but different expression forms, and in a case where the non-text data is an image, adjusting the non-text data includes image enhancement; adjusting the text data in the sample output data in the original test sample to obtain adjusted second text data, and extracting key information from a plurality of key points in the adjusted first text data to obtain a plurality of key information, where the adjusted second text data and the text data in the sample output data have the same data content but different expression forms; determining the sample input data in the similar test sample by using the adjusted first text data, the adjusted non-text data, and the plurality of key points, and combining the plurality of key information as the sample output data in the similar test sample, where the multi-modal model is used to complete a prediction task of the plurality of key information.

15. The method of claim 14, wherein, extracting a plurality of key information from the text data in the sample output data in the original test sample includes: adjusting the text data in the sample input data in the original test sample to obtain adjusted first text data includes: text data in the sample input data in the first original language is converted into the first original language through at least one language conversion, to obtain the adjusted first text data; adjusting text data in sample output data in the original test sample to obtain adjusted second text data includes: text data in the sample output data is converted into the second original language through at least one language conversion, to obtain the adjusted second text data.

16. The method of claim 12, wherein, In the case where the second type of leakage type is a fourth leakage mode, the second type of sample construction mode is a fourth sample construction mode, wherein the fourth leakage mode indicates that the text data in the original test sample appears in the training sample of the multi-modal model, and the non-text data in the original test sample does not appear in the training sample of the multi-modal model, and the fourth sample construction mode indicates that the non-text data in the sample input data in the original test sample is masked as a whole.

17. The method of claim 16, wherein, In the case where the sample construction mode is a fourth sample construction mode, constructing a similar test sample of the original test sample of the multi-modal model according to the sample construction mode includes: performing a whole masking operation on the non-text data in the original test sample to obtain blank data; splicing the blank data, data other than the non-text data in the sample input data into sample input data in the similar test sample, and determining sample output data in the original test sample as sample output data in the similar test sample. 18.A model training data leakage detection apparatus, characterized by comprising: comprising: a first determination unit configured to determine a corresponding sample construction mode and a data leakage detection mode according to a preset data leakage mode of a multi-modal model, wherein the input data of the multi-modal model is multi-modal data, and the output data is text data; a construction unit configured to construct a similar test sample of an original test sample of the multi-modal model according to the sample construction mode; a second determination unit configured to determine a first prediction accuracy of the multi-modal model for the original test sample and a second prediction accuracy of the multi-modal model for the similar test sample according to the data leakage detection mode; a third determination unit configured to determine a leakage situation of the original test sample under the preset data leakage mode according to the first prediction accuracy and the second prediction accuracy.

19. An electronic device, comprising: comprising: a memory configured to store a computer program; a processor configured to execute the computer program to implement the steps of the sample leakage detection method according to any one of claims 1 to 17.

20. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the sample leakage detection method according to any one of claims 1 to 17.