A retrieval-driven multi-modal training data generation method and system
By generating training queries based on a cross-modal retrieval system and performing progressive quality verification and sample ratio optimization of virtual samples, the problems of disconnection from real-world scenarios and sample quality in multimodal training data generation are solved, achieving more efficient data generation and quality control.
Patent Information
- Application Number
- CN202611066457.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-17
- Publication Date
- 2026-11-27
AI Technical Summary
Existing methods for generating multimodal training data are disconnected from real-world retrieval scenarios. Virtual sample quality lacks effective verification, multi-source sample matching relies on human experience, and low-quality samples are difficult to trace and roll back.
The system generates training search terms based on the search behavior of a cross-modal retrieval system, recalls and matches multimodal real samples, generates virtual samples through progressive quality verification, performs evolutionary optimization of the sample mixing ratio, and establishes end-to-end traceability information to locate and track low-quality samples.
It improves the authenticity and reliability of training data, enhances the usability of virtual samples, optimizes the performance balance between different tasks, and has the ability to trace quality and recover from anomalies.
Smart Images

Figure CN123178955A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of artificial intelligence data engineering and cross-modal retrieval technology, specifically to a retrieval-driven method and system for generating multimodal training data. Background Technology
[0002] With the development of multimodal large models and cross-modal retrieval technologies, semantic correspondences need to be established for different modalities of data such as text, images, videos, and audio to support applications such as text-to-image search, image-to-text search, and voice-to-video retrieval. To improve the model's cross-modal understanding, retrieval ranking, and multimodal reasoning capabilities, a large amount of high-quality cross-modal pairing training data is usually required.
[0003] Existing methods for constructing training data mainly include manual cleaning and labeling, templated data synthesis, generative model synthesis, and knowledge base-based data augmentation. While these methods can expand the scale of training data, they typically rely on manual templates, prompts, or fixed rules. The generation process has a weak correlation with real queries, retrieval results, and user feedback in cross-modal retrieval systems, which can easily lead to deviations between the training data and real retrieval scenarios.
[0004] Furthermore, existing solutions for assessing the quality of virtual samples often focus on text similarity, language fluency, or visual similarity, lacking verification of whether virtual samples can be correctly indexed and recalled by the retrieval system, as well as progressive verification of knowledge coverage and the risk of generated artifacts. Additionally, the ratio of samples from different sources typically relies on manual experience, making it difficult to pinpoint the source and generation stage of low-quality samples when training issues arise.
[0005] In view of this, the present invention is hereby proposed. Summary of the Invention
[0006] This application provides a retrieval-driven method and system for generating multimodal training data to address the problems of existing multimodal training data generation processes being disconnected from real retrieval scenarios, lack of effective verification of virtual sample quality, reliance on manual experience for multi-source sample matching, and difficulty in tracing and rolling back low-quality samples.
[0007] In a first aspect, this invention proposes a retrieval-driven method for generating multimodal training data, which includes the following steps: S1. Based on the retrieval behavior of the cross-modal retrieval system, a training retrieval formula is generated, and the training retrieval formula is used to recall and match multimodal real samples to obtain a real sample pairing set. S2, generate virtual samples based on the real sample pairing set, and perform progressive quality verification on the virtual samples to obtain a set of virtual samples that pass the verification; S3. Based on the model training objectives and sample quality evaluation results, the mixing ratio of real samples, virtual samples, adversarial samples and knowledge-injected samples is optimized through evolution to obtain the training dataset allocation scheme. S4. Establish full-link traceability information for training samples, and locate, track, and roll back low-quality samples based on the full-link traceability information.
[0008] Further, in step S2, the generation of virtual samples based on the real sample pairing set and the progressive quality verification of the virtual samples specifically include the following sub-steps: S21. Generate virtual samples based on the retrieval formula, sample content, and cross-modal pairing relationship in the real sample pairing set, and establish the association relationship between the virtual samples and the corresponding retrieval formula; S22. Add the virtual sample to the test index library of the cross-modal retrieval system, and perform a reverse retrieval using the retrieval expression corresponding to the virtual sample. Determine the reverse consistency evaluation result of the virtual sample based on the recall position of the virtual sample in the reverse retrieval results. S23. Based on the target entities, target attributes, and target relationships related to the training topic in the knowledge graph, perform knowledge coverage verification on the virtual samples to obtain knowledge coverage evaluation results; S24. Perform artifact detection on the virtual sample to obtain artifact detection evaluation results; S25. Based on the reverse consistency evaluation results, knowledge coverage evaluation results, and artifact detection evaluation results, the virtual samples are retained, corrected, regenerated, or discarded to obtain a set of virtual samples that have passed the verification.
[0009] Furthermore, the reverse consistency evaluation result is determined by the reverse consistency score (RCS), which is calculated according to the following formula:
[0010] Where N represents the number of virtual samples, v i Let q represent the i-th virtual sample. i R(q) represents the retrieval formula corresponding to the i-th virtual sample. i ) represents the search query q i The corresponding reverse search results, TopM(R(q) i )) represents the first M results in the reverse retrieval results, I represents the indicator function, rank_score(v i ) represents virtual sample v iThe ranking weight in the reverse retrieval results; based on the comparison result of the reverse consistency score (RCS) and the preset reverse consistency threshold, determine whether the virtual sample meets the retrieval recall condition.
[0011] Furthermore, the knowledge coverage evaluation result is determined by the knowledge coverage index (KCI), which is calculated according to the following formula:
[0012] Wherein, Cov_entity represents entity coverage, Cov_attribute represents attribute coverage, Cov_relation represents relation coverage, and α, β, and γ represent the weighting coefficients of entity coverage, attribute coverage, and relation coverage, respectively; the generated artifact detection evaluation result is determined by the artifact evaluation score (AFS), which is calculated according to the following formula:
[0013] Among them, P artifact This indicates the probability that the virtual sample generates artifacts; based on the Knowledge Coverage Index (KCI) and the Artifact Evaluation Score (AFS), the virtual sample is subjected to knowledge enhancement, post-processing, regeneration, or discarding.
[0014] Further, in step S3, the evolutionary optimization of the mixing ratio of real samples, virtual samples, adversarial samples, and knowledge-injected samples based on the model training objective and sample quality evaluation results specifically includes the following sub-steps: S31. The candidate mixing ratios of real samples, virtual samples, adversarial samples, and knowledge-injected samples are encoded into a ratio vector, and the ratio vector is normalized to obtain the candidate mixing ratios of each type of sample in the training dataset. S32. Obtain the fine-grained performance index of the model based on the validation set, and calculate the fitness value corresponding to the matching vector based on the difference between the fine-grained performance index and the corresponding target value. S33. Determine the sample type to be enhanced based on the weak indicators in the fine-grained performance indicators, and adjust the generation ratio of at least one of real samples, virtual samples, adversarial samples and knowledge-injected samples. S34. Based on the fitness value, perform selection, crossover and mutation operations on the matching vector, iteratively update the matching vector until a preset termination condition is met, and obtain the matching scheme of the training dataset.
[0015] Further, the matching vector is X = (x1, x2, x3, x4), where x1 represents the proportion of real samples, x2 represents the proportion of virtual samples, x3 represents the proportion of adversarial samples, and x4 represents the proportion of knowledge-injected samples; normalizing the matching vector includes calculating the candidate mixture proportions of each type of sample according to the following formula:
[0016] Where p1 represents the candidate mixture ratio of real samples, p2 represents the candidate mixture ratio of virtual samples, p3 represents the candidate mixture ratio of adversarial samples, p4 represents the candidate mixture ratio of knowledge-injected samples, and p1+p2+p3+p4=1.
[0017] Furthermore, the fitness value is determined based on the performance gap and the sample proportion variance, wherein the performance gap d i Calculate according to the following formula:
[0018] Among them, Perf i Represents the actual value of the i-th fine-grained performance metric, Target i This represents the target value of the i-th fine-grained performance index; the fitness value F(X) is calculated according to the following formula:
[0019] Among them, w i λ represents the weight of the i-th fine-grained performance metric, λ represents the regularization coefficient, and Var(p) represents the variance of the proportions of real samples, virtual samples, adversarial samples, and knowledge-injected samples.
[0020] Secondly, the present invention also provides a retrieval-driven multimodal training data generation system, comprising: The retrieval expression generation and real sample pairing module is used to generate training retrieval expressions based on the retrieval behavior of the cross-modal retrieval system, and to recall multimodal real samples using the training retrieval expressions, and to automatically pair the multimodal real samples across modalities to obtain a real sample pairing set. The virtual sample generation and quality verification module is used to generate virtual samples based on the real sample pairing set and perform progressive quality verification on the virtual samples. The progressive quality verification includes reverse consistency verification, knowledge coverage verification and generation artifact verification to obtain a set of virtual samples that pass the verification. The sample allocation evolution optimization module is used to evolve and optimize the mixing ratio of real samples, virtual samples, adversarial samples and knowledge-injected samples based on the model training objectives and sample quality evaluation results, so as to obtain the training dataset allocation scheme. The traceability and rollback management module is used to establish full-link traceability information for training samples, and to locate, track, and roll back low-quality samples based on the full-link traceability information.
[0021] Thirdly, the present invention proposes an electronic device, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the steps of any of the above-described retrieval-driven multimodal training data generation methods.
[0022] Fourthly, the present invention proposes a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of any of the above-described retrieval-driven multimodal training data generation methods.
[0023] Compared with the prior art, this application has at least the following advantages: (1) This application generates training search terms based on the real search behavior of cross-modal retrieval system, and recalls and matches multimodal real samples accordingly, so that the training data is closer to the real search scenario and reduces the distribution deviation caused by manually generated templates or fixed prompt words.
[0024] (2) This application performs progressive quality verification on virtual samples, verifying the retrieval recall, knowledge coverage integrity and generation artifact risk of virtual samples in turn, thereby improving the availability and reliability of virtual samples before they enter the training dataset.
[0025] (3) This application uses an evolutionary algorithm to dynamically optimize the mixing ratio of real samples, virtual samples, adversarial samples and knowledge-injected samples, and adjusts the sample generation ratio in reverse according to the weak indicators of the validation set, which is conducive to improving the performance balance between different training sub-tasks.
[0026] (4) This application establishes full-link traceability information for training samples and combines a version management mechanism to locate, track and roll back low-quality samples, so that the training data generation process has the ability to trace quality and recover from anomalies. Attached Figure Description
[0027] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a flowchart of the retrieval-driven multimodal training data generation method of the present invention.
[0028] Figure 2 This is a flowchart of the virtual sample three-layer verification mechanism of the present invention. Figure 3 This is a flowchart of the evolutionary algorithm for ratio optimization of the present invention. Figure 4 This is a schematic diagram of the retrieval-driven multimodal training data generation system of the present invention. Detailed Implementation
[0029] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings and specific embodiments. However, those skilled in the art will understand that the embodiments described below are some embodiments of the present invention, but not all embodiments, and are only used to illustrate the present invention, and should not be regarded as limiting the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Where specific conditions are not specified in the embodiments, conventional conditions or conditions recommended by the manufacturer shall be followed. Where the manufacturers of reagents or instruments are not specified, they are all conventional products that can be purchased commercially.
[0030] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0031] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installed," "connected," and "connected" should be interpreted broadly. For example, they can refer to fixed connection, detachable connection, or integral connection; they can refer to mechanical connection or electrical connection; they can refer to direct connection or indirect connection through an intermediate medium; and they can refer to the connection within two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0032] To more clearly illustrate the technical solutions in this invention, specific embodiments are described below.
[0033] This invention proposes a retrieval-driven method for generating multimodal training data. Figure 1 A flowchart of the retrieval-driven multimodal training data generation method of the present invention is presented, as follows: Figure 1 As shown, the method includes the following steps: S1. Based on the retrieval behavior of the cross-modal retrieval system, a training retrieval formula is generated, and the training retrieval formula is used to recall and match multimodal real samples to obtain a real sample pairing set. In this embodiment, the system obtains retrieval behavior data from the query logs of the cross-modal retrieval system. This retrieval behavior data includes at least one of the following: the user-inputted original search query, retrieval modality, retrieval time, retrieval results, result ranking, relevance score, click feedback, dwell time, and query rewrite records. The system cleans and deduplicates the query logs, deleting empty queries, queries with abnormal characters, duplicate queries, and invalid session records. It then normalizes the remaining queries according to the query content and query modality to obtain a candidate search query set.
[0034] Specifically, the system extracts three types of search queries from the candidate search query set. The first type is the user's original search query, which is the text query, image search query, or sound search query actually entered by the user. In one implementation, the system counts the frequency of each user's original search query and retains high-frequency search queries with a query frequency greater than a preset frequency threshold, such as retaining user original search queries with a query frequency greater than 10. The second type is the search log expansion type, where the system performs semantic expansion on the high-frequency search queries. This semantic expansion includes at least one of synonym replacement, hypernym / hypernym expansion, and sentence restructuring. For example, for text search queries, the system can replace action words, object words, scene words, or attribute words with semantically similar words, or supplement their hypernym / hypernym concepts, or restructure the original sentence into different expressions, thereby generating multiple variant search queries for each high-frequency search query. The third type is the search blind spot detection type, where the system counts the search failure rate corresponding to different query modes. The search failure rate can be determined based on at least one of the following: no result rate, low relevant result rate, user quick rewriting rate, and no-click rate. When the failure rate of a certain query pattern is greater than a preset failure rate threshold, such as greater than 30%, the system constructs a search blind spot detection pattern based on the combination of entities, actions, attributes and scenarios in that query pattern, in order to supplement the training data of the cross-modal retrieval system in this type of query scenario.
[0035] Subsequently, the system uses the user's original search query, the search log expansion query, and the search blind spot detection query together as training search queries, and inputs them into the cross-modal search engine to perform the search. For each training search query q, the system obtains its corresponding first K search results, forming a search result set R(q) = {r1, r2, ..., r...} k}, Where r i Let K be the i-th search result, and K be the preset recall number. Simultaneously, the system records the search relevance score s between each search query and the search result.i The search relevance score is used to characterize the search result r. i The degree of matching between the search term q used in training.
[0036] Furthermore, the system performs cross-modal automatic matching based on the search result set. For image, video, or audio results retrieved by text search queries, the system constructs text-image, text-video, or text-audio candidate pairs with the corresponding results; For search methods such as image search, image search, or audio search, the system constructs candidate pairings for image-text, image-image, audio-text, or audio-audio based on the query modality and the result modality. When the search result itself contains multiple modalities of data, such as video data containing video frames, subtitle text, and audio track data, the system constructs a text-video-audio multimodal chain pairing based on the alignment relationship between the video timestamp, subtitle timeline, and audio segment timeline.
[0037] To reduce the probability of false pairings entering the training dataset, the system further calculates the pairing confidence of candidate pairings. Specifically, the system fuses the retrieval relevance score and the cross-modal consistency score to calculate the pairing confidence Cpair:
[0038] Here, sretrieve represents the retrieval relevance score, scross_modal represents the semantic consistency score between samples of different modalities, and w1 and w2 represent the weights of the retrieval relevance score and the cross-modal consistency score, respectively. The cross-modal consistency score can be calculated using a cross-modal semantic coding model, for example, by mapping text, images, video frames, or audio transcribed into text to the same semantic space and then calculating the similarity. In one implementation, w1 is 0.6 and w2 is 0.4; when Cpair is greater than a preset pairing confidence threshold, the corresponding candidate pair is retained; when Cpair does not meet the preset pairing confidence threshold, the corresponding candidate pair is discarded. For candidate pairs in the intermediate confidence interval, the system can mark them as candidate pairs for subsequent quality verification or manual sampling.
[0039] Through the above processing, the system finally outputs a real sample pairing set, which includes at least one of the following: training retrieval query, retrieval result samples, sample modality, retrieval relevance score, cross-modal consistency score, pairing confidence, and pairing type. This real sample pairing set serves as the basis for subsequent virtual sample generation and as the source of real samples in the training dataset, enabling the training data to reflect the real query distribution, retrieval result distribution, and cross-modal matching relationships in the cross-modal retrieval system.
[0040] refer to Figure 1-2The retrieval-driven multimodal training data generation method proposed in this invention further includes the following steps: S2, generate virtual samples based on the real sample pairing set, and perform progressive quality verification on the virtual samples to obtain a set of virtual samples that pass the verification.
[0041] In this embodiment, a three-layer progressive verification is introduced after the virtual sample is generated. The three-layer progressive verification includes reverse consistency verification, entity / attribute / relationship coverage verification, and generation artifact detection. Through the progressive quality verification mechanism, the retrieval effectiveness, knowledge completeness, and generation authenticity of the virtual sample are comprehensively evaluated and screened.
[0042] ① Reverse consistency check The generated virtual sample is input into the index building module of the retrieval system and added to the test index library; the original search expression used when generating the virtual sample is used as the query condition, and the retrieval is performed in the test index library; it is determined whether the virtual sample appears in the Top-M results of the corresponding retrieval results, and the reverse consistency score (RCS) is calculated based on the determination result.
[0043] The reverse consistency score (RCS) is calculated according to the following formula:
[0044] Where N represents the number of virtual samples, v i Let q represent the i-th virtual sample. i R(q) represents the original search expression used when generating the i-th virtual sample. i ) indicates that q i The search results obtained as query conditions are TopM(R(q) i )) represents the first M results in the search results, and I[ ] represents the indicator function, when v i The value is 1 if the result appears in the Top-M search results, and 0 otherwise; rank_score(v i ) represents virtual sample v i The inverse weight of the ranking, and rank_score(v i )=1 / rank(v i ), rank(v i ) represents virtual sample v i The sorting position in the search results.
[0045] The virtual sample is processed according to the reverse consistency score (RCS): when RCS > 0.8, the virtual sample is determined to have passed the reverse consistency check; when 0.5 ≤ RCS ≤ 0.8, the virtual sample is determined to be a sample to be corrected, and the generation parameters are adjusted before re-verification; when RCS < 0.5, the virtual sample is determined to not meet the retrieval recall condition and is discarded.
[0046] ② Entity / Attribute / Relationship Coverage Validation The system extracts a set of target entities (Etarget), target attributes (Atarget), and target relations (Rtarget) related to the current training topic from the knowledge graph. Information extraction is then performed on virtual samples to obtain an extracted entity set (Eextracted), an extracted attribute set (Aextracted), and an extracted relation set (Rextracted). Specifically, text-based virtual samples are extracted using named entity recognition, image-based virtual samples are extracted using a visual localization model, and audio-based virtual samples are extracted using speech-to-text transcription.
[0047] Subsequently, entity coverage, attribute coverage, and relation coverage were calculated separately:
[0048]
[0049]
[0050] Here, Coventity represents entity coverage, Covattribute represents attribute coverage, and Covrelation represents relationship coverage.
[0051] Calculate the Comprehensive Knowledge Coverage (KCI) based on entity coverage, attribute coverage, and relationship coverage:
[0052] The virtual samples are processed according to the comprehensive knowledge coverage rate (KCI): when KCI > 0.7, the virtual sample is determined to have sufficient knowledge density; when 0.4 ≤ KCI ≤ 0.7, the virtual sample is determined to need knowledge injection enhancement, and knowledge injection sample generation is triggered; when KCI < 0.4, the virtual sample is determined to have insufficient knowledge coverage, and it is discarded and regenerated.
[0053] ③ Detection of generation artifacts The generation artifact detection is used to detect generation traces in virtual samples. The generation traces include at least one of the following: repetitive textures, unnatural boundaries, garbled text in images, unnatural pauses and spectral anomalies in audio, and unnatural repetition patterns in text.
[0054] Specifically, for image-type virtual samples, an artifact classifier based on EfficientNet is used for detection. The artifact classifier takes the generated image as input and outputs the real / generated binary classification probability corresponding to the generated image. The detection features include at least one of DCT frequency domain anomalies, local patch repetition rate, and CLIP feature outlier.
[0055] For virtual audio samples, a ResNet artifact classifier trained on Mel spectrograms is used for detection. The ResNet artifact classifier is used to detect spectral discontinuities and abnormal energy distribution in the generated audio.
[0056] For text-based virtual samples, perplexity mutation detection and n-gram repetition rate detection are used to generate unnatural patterns in the text.
[0057] Subsequently, the artifact evaluation score (AFS) is calculated based on the generation probability output by the artifact classifier:
[0058] Among them, P artifact This represents the probability that the virtual sample output by the artifact classifier belongs to the generated sample or contains generated artifacts.
[0059] The virtual sample is processed according to the Artifact Evaluation Score (AFS): when AFS > 0.85, the virtual sample is determined to pass the artifact generation detection; when 0.6 ≤ AFS ≤ 0.85, the virtual sample is determined to require post-processing, which includes at least one of image super-resolution restoration, audio noise reduction, and text rewriting; when AFS < 0.6, the virtual sample is determined to have a risk of artifact generation and is discarded.
[0060] refer to Figure 1 , 3 The retrieval-driven multimodal training data generation method proposed in this invention further includes the following steps: S3. Based on the model training objectives and sample quality evaluation results, the mixing ratio of real samples, virtual samples, adversarial samples, and knowledge-injected samples is optimized through evolution to obtain the training dataset allocation scheme.
[0061] In a specific implementation, the present invention uses an evolutionary algorithm to dynamically optimize the mixing ratio of real samples, virtual samples, adversarial samples, and knowledge-injected samples. The specific steps are as follows: ①Chromosome coding Each candidate sample matching scheme is treated as an individual in the evolutionary algorithm, and the individual is encoded as a four-dimensional real number vector: X = (x1, x2, x3, x4) Where x1 represents the proportion of real retrieval samples, x2 represents the proportion of virtual synthetic samples, x3 represents the proportion of adversarial samples, and x4 represents the proportion of knowledge-injected samples, and the values of x1, x2, x3, and x4 are all in the range of [0, 1].
[0062] To ensure that the sum of the proportions of the four classes of samples is 1, the four-dimensional real vector X is subjected to Softmax normalization to obtain the normalized sample proportion p. i :
[0063] Where i = 1, 2, 3, 4; p i p1 represents the normalization ratio of real retrieved samples, p2 represents the normalization ratio of virtual synthetic samples, p3 represents the normalization ratio of adversarial samples, p4 represents the normalization ratio of knowledge-injected samples, and p1+p2+p3+p4=1.
[0064] ② Fitness function design Obtain the fine-grained performance metric vector Perf from the validation set: Perf=(Accentity, Acrelation, Accmulti_hop, Acccross_modal, NDCG@10, MRR) Where Accentity represents entity recognition accuracy, Accrelation represents relation inference accuracy, Accmulti_hop represents multi-hop inference accuracy, Acccross_modal represents cross-modal retrieval accuracy, NDCG@10 represents the ranking evaluation index of the top 10 retrieval results, and MRR represents the average reciprocal ranking.
[0065] Furthermore, the normalized gap di of each fine-grained performance index relative to the target value is calculated:
[0066] Where Targeti represents the target value of the i-th fine-grained performance metric, Perfi represents the actual value of the i-th fine-grained performance metric, and d i This represents the normalized difference between the i-th fine-grained performance metric and the target value.
[0067] Furthermore, the fitness function F(X) corresponding to the candidate formulation is calculated based on the normalized gap of each fine-grained performance index:
[0068] Where wi represents the weight corresponding to the i-th fine-grained performance index, Var(p) represents the variance regularization term of the proportion of four types of samples: real samples, virtual samples, adversarial samples, and knowledge-injected samples, and λ represents the regularization term coefficient; in one implementation, λ=0.1.
[0069] Through the fitness function described above, the evolutionary algorithm can not only evaluate candidate matching schemes based on overall accuracy, but also select a better dataset matching scheme based on the multidimensional weakness indicators and sample ratio balance in the validation set.
[0070] ③ Adjust the generation ratio in reverse based on the weak indicators. Reverse adjustment rules: The iterative process of an evolutionary algorithm includes: Multiple individuals are randomly generated as the initial population; The training samples are mixed according to the sample ratio corresponding to the current individual, and the mixed training samples are used to train the model. Evaluate the model performance on the validation set and calculate the fitness of the corresponding individuals; select a subset of individuals from the current population based on their fitness. Perform crossover and mutation operations on the selected individuals to generate a new generation of population; Repeat the evaluation, selection, crossover, and mutation process until the optimal fitness improvement is less than the preset improvement threshold for multiple consecutive generations, or the number of iterations reaches the preset maximum number of generations, to obtain the optimized training dataset allocation scheme.
[0071] In one specific implementation, the initial population consists of 50 randomly generated individuals. The selection operation uses a roulette wheel to select the top 30 individuals with the highest fitness. The crossover operation uses two-point crossover with a crossover rate of 0.8. The mutation operation uses Gaussian mutation with a standard deviation of 0.1 and a mutation rate of 0.2. The iteration terminates when the optimal fitness increases by less than 0.1% for 10 consecutive generations or reaches 100 generations.
[0072] refer to Figure 1 The retrieval-driven multimodal training data generation method proposed in this invention further includes the following steps: S4. Establish full-link traceability information for training samples, and locate, track, and roll back low-quality samples based on the full-link traceability information.
[0073] In its implementation, this invention designs a full-link data traceability system. Each training sample records a complete generation traceability chain, and with version management, it achieves accurate location of low-quality samples and snapshot rollback of training configurations. Specifically, it includes the following steps: ① Sample-level traceability chain The following source information is recorded for each training sample: SampleID → {source_type: "real" | "virtual" | "adversarial" | "knowledge_injected", retrieval_query: {text: "...", modality: "text", timestamp: "2024-01-15T10:23:00"}, retrieval_result: {doc_id: "doc_12345", rank: 3, relevance_score:0.82}, cross_modal_pair: {paired_with: "img_67890", pairing_confidence:0.75}, generation_params: {model: "StableDiffusion-XL", prompt: "...",seed: 42}, verification_results: {RCS: 0.85, KCI: 0.72, AFS: 0.91}, evolution_generation: 23, dataset_version: "v2.3.1" } ②Version Management In one implementation, the system manages the training dataset using version numbers according to the SemVer specification, which identifies different training dataset versions through a major version number, minor version number, and revision number. Each training dataset version records a data snapshot, evolutionary algorithm status, training configuration, and performance baseline. The data snapshot includes the complete hash of the sample set. The evolutionary algorithm state includes the current best individual, the population state, and the number of iterations; the training configuration includes the learning rate, batch size, and number of training steps; and the performance baseline includes the values of each metric on the validation set.
[0074] ③Location and rollback of low-quality samples When performance degradation or low-quality samples are detected during training, the system performs low-quality sample localization, root cause analysis, and version rollback, specifically including the following steps: Low-quality sample localization: Identify suspected low-quality samples through training loss anomaly detection; In one implementation, samples with a loss value greater than 3σ are identified as suspected low-quality samples. Then, the sample-level source chain corresponding to the suspected low-quality samples is queried to locate the source type, generation parameters, and verification results of the suspected low-quality samples. Common characteristics of the low-quality samples are then statistically analyzed, including at least one of evolutionary generation, sample source type, and verification score range.
[0075] Root cause analysis: If low-quality samples are concentrated in a certain generation batch, it is determined that the generation parameters corresponding to that generation batch are abnormal; if low-quality samples are concentrated in a certain source type, it is determined that the sample generation strategy or verification strategy corresponding to that source type needs to be adjusted; if low-quality samples are randomly distributed in multiple generation batches and multiple source types, it is determined that the evolutionary algorithm may be trapped in a local optimum.
[0076] Version rollback: Select the target version to roll back based on the root cause analysis results, roll back the data snapshot to the stable version, and restore the evolutionary algorithm state corresponding to the stable version, which includes the population and the best individual; after the rollback is completed, adjust the sample generation strategy and re-execute the evolutionary optimization; perform A / B testing on the new version after re-evolution and the version before rollback, and determine whether the new version is better than the version before rollback based on the validation set performance indicators.
[0077] As can be seen from the above method embodiments, the present invention generates training search terms based on the real retrieval behavior of a cross-modal retrieval system, and sequentially completes real sample pairing, virtual sample generation and quality verification, sample ratio evolution optimization, and training sample traceability and rollback management, thereby forming a closed-loop processing flow from training data generation, quality control, ratio optimization to anomaly recovery. It should be noted that each step in the above method embodiments can be implemented by software programs, hardware circuits, or a combination of both. To facilitate the explanation of the system structure of the present invention, the multimodal training data generation system implementing the above method is described below by dividing it into functional modules. The specific processing procedures of each functional module can be referred to the corresponding steps in the above method embodiments.
[0078] Further reference Figure 4 This invention provides an embodiment of a retrieval-driven multimodal training data generation system 100, which can be applied to various electronic devices. The large model training data synthesis system 100 includes the following modules: The retrieval expression generation and real sample pairing module 110 is used to generate training retrieval expressions based on the retrieval behavior of the cross-modal retrieval system, and to recall multimodal real samples using the training retrieval expressions, and to automatically pair the multimodal real samples across modalities to obtain a real sample pairing set. The virtual sample generation and quality verification module 120 is used to generate virtual samples based on the real sample pairing set and perform progressive quality verification on the virtual samples. The progressive quality verification includes reverse consistency verification, knowledge coverage verification and artifact generation verification to obtain a set of virtual samples that pass the verification. The sample allocation evolution optimization module 130 is used to perform evolution optimization on the mixing ratio of real samples, virtual samples, adversarial samples and knowledge-injected samples based on the model training objectives and sample quality evaluation results, so as to obtain the training dataset allocation scheme. The traceability and rollback management module 140 is used to establish full-link traceability information for training samples, and to locate, track and roll back low-quality samples based on the full-link traceability information.
[0079] In one embodiment, the present invention also provides an electronic device including a processor and a memory, wherein the memory stores a computer program. When the computer program is executed by the processor, the processor performs the retrieval-driven multimodal training data generation method described in the above method embodiments.
[0080] Specifically, when the processor executes the computer program, it can implement the following processing steps: generating training search terms based on the retrieval behavior of the cross-modal retrieval system, and using the training search terms to recall and pair multimodal real samples to obtain a real sample pairing set; generating virtual samples based on the real sample pairing set, and performing progressive quality verification on the virtual samples to obtain a set of virtual samples that pass the verification; performing evolutionary optimization on the mixing ratio of real samples, virtual samples, adversarial samples, and knowledge-injected samples according to the model training objective and sample quality evaluation results to obtain a training dataset allocation scheme; establishing full-link traceability information for the training samples, and locating, performing root cause analysis, and rolling back versions of low-quality samples based on the full-link traceability information. The specific implementation methods of the above processing steps can be referred to the corresponding content in the foregoing method embodiments, and will not be repeated here.
[0081] In one embodiment, the electronic device may be a server, a cloud computing node, a training platform device, a data processing device, or other computer device with data processing capabilities. The processor may be a central processing unit, a graphics processing unit, an application-specific integrated circuit, a field-programmable gate array, or other processing unit capable of executing computer programs; the memory may be a read-only memory, a random access memory, a disk, a solid-state drive, or other storage medium capable of storing computer programs and data.
[0082] In one embodiment, the present invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the retrieval-driven multimodal training data generation method according to any one of claims 1 to 7. The computer-readable storage medium may be a magnetic storage medium, an optical storage medium, a semiconductor storage medium, or other non-transitory computer-readable storage medium.
[0083] Using the aforementioned electronic devices and computer-readable storage media, the method flow of the present invention can be deployed as a computer program on a data generation platform, model training platform, or cross-modal retrieval system, thereby realizing the automatic generation, quality verification, matching optimization, and traceability rollback of multimodal training data.
[0084] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. This application is not limited to the exact structures described above and illustrated in the accompanying drawings, and it should not be considered that the specific implementation of this application is limited to these descriptions. For those skilled in the art, various changes and modifications made without departing from the concept of this application should be considered to fall within the protection scope of this application.
Claims
1. A retrieval-driven method for generating multimodal training data, characterized in that, Includes the following steps: S1. Based on the retrieval behavior of the cross-modal retrieval system, a training retrieval formula is generated, and the training retrieval formula is used to recall and match multimodal real samples to obtain a real sample pairing set. S2, generate virtual samples based on the real sample pairing set, and perform progressive quality verification on the virtual samples to obtain a set of virtual samples that pass the verification; S3. Based on the model training objectives and sample quality evaluation results, the mixing ratio of real samples, virtual samples, adversarial samples and knowledge-injected samples is optimized through evolution to obtain the training dataset allocation scheme. S4. Establish full-link traceability information for training samples, and locate, track, and roll back low-quality samples based on the full-link traceability information.
2. The method according to claim 1, characterized in that, In step S2, generating virtual samples based on the real sample pairing set and performing progressive quality verification on the virtual samples specifically includes the following sub-steps: S21. Generate virtual samples based on the retrieval formula, sample content, and cross-modal pairing relationship in the real sample pairing set, and establish the association relationship between the virtual samples and the corresponding retrieval formula; S22. Add the virtual sample to the test index library of the cross-modal retrieval system, and perform a reverse retrieval using the retrieval expression corresponding to the virtual sample. Determine the reverse consistency evaluation result of the virtual sample based on the recall position of the virtual sample in the reverse retrieval results. S23. Based on the target entities, target attributes, and target relationships related to the training topic in the knowledge graph, perform knowledge coverage verification on the virtual samples to obtain knowledge coverage evaluation results; S24. Perform artifact detection on the virtual sample to obtain artifact detection evaluation results; S25. Based on the reverse consistency evaluation results, knowledge coverage evaluation results, and artifact detection evaluation results, the virtual samples are retained, corrected, regenerated, or discarded to obtain a set of virtual samples that have passed the verification.
3. The method according to claim 2, characterized in that, The reverse consistency evaluation result is determined by the reverse consistency score (RCS), which is calculated according to the following formula: Where N represents the number of virtual samples, v i Let q represent the i-th virtual sample. i R(q) represents the retrieval formula corresponding to the i-th virtual sample. i ) represents the search query q i The corresponding reverse search results, TopM(R(q) i )) represents the first M results in the reverse retrieval results, I represents the indicator function, rank_score(v i ) represents virtual sample v i The ranking weight in the reverse retrieval results; based on the comparison result of the reverse consistency score (RCS) and the preset reverse consistency threshold, determine whether the virtual sample meets the retrieval recall condition.
4. The method according to claim 2, characterized in that, The knowledge coverage evaluation result is determined by the knowledge coverage index (KCI), which is calculated according to the following formula: Wherein, Cov_entity represents entity coverage, Cov_attribute represents attribute coverage, Cov_relation represents relation coverage, and α, β, and γ represent the weighting coefficients of entity coverage, attribute coverage, and relation coverage, respectively; the generated artifact detection evaluation result is determined by the artifact evaluation score (AFS), which is calculated according to the following formula: Among them, P artifact This indicates the probability that the virtual sample generates artifacts; based on the Knowledge Coverage Index (KCI) and the Artifact Evaluation Score (AFS), the virtual sample is subjected to knowledge enhancement, post-processing, regeneration, or discarding.
5. The method according to claim 1, characterized in that, In step S3, the process of evolutionarily optimizing the mixing ratio of real samples, virtual samples, adversarial samples, and knowledge-injected samples based on the model training objective and sample quality evaluation results specifically includes the following sub-steps: S31. The candidate mixing ratios of real samples, virtual samples, adversarial samples, and knowledge-injected samples are encoded into a ratio vector, and the ratio vector is normalized to obtain the candidate mixing ratios of each type of sample in the training dataset. S32. Obtain the fine-grained performance index of the model based on the validation set, and calculate the fitness value corresponding to the matching vector based on the difference between the fine-grained performance index and the corresponding target value. S33. Determine the sample type to be enhanced based on the weak indicators in the fine-grained performance indicators, and adjust the generation ratio of at least one of real samples, virtual samples, adversarial samples and knowledge-injected samples. S34. Based on the fitness value, perform selection, crossover and mutation operations on the matching vector, iteratively update the matching vector until a preset termination condition is met, and obtain the matching scheme of the training dataset.
6. The method according to claim 5, characterized in that, The matching vector is X = (x1, x2, x3, x4), where x1 represents the proportion of real samples, x2 represents the proportion of virtual samples, x3 represents the proportion of adversarial samples, and x4 represents the proportion of knowledge-injected samples. Normalizing the proportion vector includes calculating the candidate mix proportions for each type of sample according to the following formula: Where p1 represents the candidate mixture ratio of real samples, p2 represents the candidate mixture ratio of virtual samples, p3 represents the candidate mixture ratio of adversarial samples, p4 represents the candidate mixture ratio of knowledge-injected samples, and p1+p2+p3+p4=1.
7. The method according to claim 5, characterized in that, The fitness value is determined based on the performance gap and the sample proportion variance, wherein the performance gap dᵢ is calculated according to the following formula: Among them, Perf i Represents the actual value of the i-th fine-grained performance metric, Target i This represents the target value of the i-th fine-grained performance index; the fitness value F(X) is calculated according to the following formula: Among them, w i λ represents the weight of the i-th fine-grained performance metric, λ represents the regularization coefficient, and Var(p) represents the variance of the proportions of real samples, virtual samples, adversarial samples, and knowledge-injected samples.
8. A retrieval-driven multimodal training data generation system, characterized in that, include: The retrieval expression generation and real sample pairing module is used to generate training retrieval expressions based on the retrieval behavior of the cross-modal retrieval system, and to recall multimodal real samples using the training retrieval expressions, and to automatically pair the multimodal real samples across modalities to obtain a real sample pairing set. The virtual sample generation and quality verification module is used to generate virtual samples based on the real sample pairing set and perform progressive quality verification on the virtual samples. The progressive quality verification includes reverse consistency verification, knowledge coverage verification and generation artifact verification to obtain a set of virtual samples that pass the verification. The sample allocation evolution optimization module is used to evolve and optimize the mixing ratio of real samples, virtual samples, adversarial samples and knowledge-injected samples based on the model training objectives and sample quality evaluation results, so as to obtain the training dataset allocation scheme. The traceability and rollback management module is used to establish full-link traceability information for training samples, and to locate, track, and roll back low-quality samples based on the full-link traceability information.
9. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a computer program thereon, which, when executed by a processor, implements the method described in any one of claims 1 to 7.
