Metadata classification model construction method and system based on neural network

By constructing a reverse error enhancement mechanism, dream learning and neural noise adaptation mechanism, dynamic resource allocation and multi-classifier attack and defense game, the classification accuracy and robustness problems of the existing model in complex scenarios are solved, and efficient and secure metadata classification is achieved.

CN120744589AInactive Publication Date: 2025-10-03XIAMEN NEUSOFT HANHE INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511205149.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2025-10-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When facing noisy data and adversarial attacks in complex real-world scenarios, existing technologies suffer from reduced classification accuracy, limited model generalization, unbalanced resource efficiency, and weak anti-attack capabilities, making it difficult to ensure the reliability and security of classification results.

Method used

A neural network-based metadata classification model is constructed, and adversarial error training data is generated through the reverse error enhancement mechanism. The robustness is improved by combining dream learning and neural noise adaptation mechanisms. Dynamic resource allocation and multi-classifier attack and defense game mechanisms are used to optimize the model's anti-misleading ability, and a non-traditional rule mechanism is used to initialize hyperparameters.

Benefits of technology

It significantly improves the classification accuracy and robustness of the model in noisy and complex environments, reduces deployment costs, enhances the ability to resist misleading and attacks, and ensures the reliability and security of classification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744589A_ABST
    Figure CN120744589A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of metadata classification, and provides a metadata classification model construction method and system based on a neural network, and the method is characterized by comprising the following steps: S1, defining a neural network level, the number of neurons and a connection rule, constructing a model basic topological structure, and constructing a neural network level; an initial framework is provided for subsequent parameter optimization; s2, metadata samples are collected, format unification, abnormal value filtering and standardization are completed, a training set, a verification set and a test set are divided, and output serves as input data of reverse error enhancement; and S3, introducing controllable noise based on the preprocessed metadata, and dynamically adjusting the weight of an error sample. A multi-dimensional anti-noise system is constructed through a neural noise adaptation mechanism, Poisson noise, Ttower matrix non-traditional signals and composite trigonometric function regulation are fused, noise intensity dynamic balance is achieved, and the classification accuracy and robustness of the model in a high-noise and fuzzy classification scene are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of metadata classification technology, and in particular to a method and system for constructing a metadata classification model based on a neural network. Background Art

[0002] In the field of metadata classification, existing technologies have formed a technical system centered around deep neural networks. Mainstream approaches define multi-layer neural network topologies, optimize parameters using backpropagation algorithms, and enhance model performance through a combination of data preprocessing and traditional data augmentation. Common models include convolutional neural networks (CNNs) for extracting structured metadata features, recurrent neural networks (RNNs) for processing time series metadata, and the Transformer architecture for capturing long-range feature correlations through self-attention mechanisms. Regularization, early stopping strategies, and cross-validation are often introduced to address overfitting, while hyperparameter optimization relies on traditional methods such as grid search, random search, or Bayesian optimization. The overall process focuses on improving the model's classification accuracy on clean data and is widely used in classification scenarios such as text metadata, image metadata, and sensor metadata.

[0003] However, existing technologies have significant limitations in complex practical scenarios. When faced with noisy data, adversarial lagging or difficult-to-classify samples, the classification accuracy drops significantly. Traditional noise-resistant methods mostly use simple noise injection, without considering the heavy-tail characteristics and dynamic adaptability of real noise. They are seriously data-dependent. Error samples in real scenarios are scarce and have a single distribution. Traditional data enhancement is difficult to cover rare error patterns, resulting in limited model generalization ability and unbalanced resource efficiency. Fixed-architecture models waste computing power for simple samples and are prone to underfitting complex samples due to insufficient capacity. There is a lack of dynamic resource scheduling mechanism, and hyperparameter optimization is highly blind. Manual parameter adjustment or traditional search methods are difficult to adapt to the dynamic state of the model, resulting in slow convergence, high risk of overfitting, and weak anti-attack ability. Without a systematic adversarial training system, the model is susceptible to label contamination and malicious misleading interference, making it difficult to ensure the reliability and security of the classification results. These defects restrict the practical value of metadata classification models in complex environments with high noise and high interference. Summary of the Invention

[0004] In view of the problems existing in the prior art, the purpose of the present invention is to provide a method and system for constructing a metadata classification model based on a neural network to solve the problems raised by the above background technology.

[0005] To achieve the above object, the present invention provides a method for constructing a metadata classification model based on a neural network, which is characterized by comprising the following steps:

[0006] S1. Define the neural network layer, number of neurons and connection rules, build the basic topology of the model, and provide an initial framework for subsequent parameter optimization;

[0007] S2. Collect metadata samples, complete format unification, outlier filtering and standardization, divide them into training set, validation set and test set, and use the output as input data for reverse error enhancement;

[0008] S3, based on the pre-processed metadata, introduces controllable noise, dynamically adjusts the weight of error samples, and generates training data containing adversarial errors through the reverse error enhancement mechanism, providing an error sample library for the neural werewolf killing game;

[0009] S4. Use the error samples generated by reverse error enhancement to train the GAN-dream generator, and synthesize virtual metadata in the non-training stage through the dream learning mechanism to supplement the diversity of the training set;

[0010] S5. Fusing the virtual metadata generated by dream learning with the random noise channel to construct a non-traditional signal input strategy for the neural noise adaptation mechanism, and improving the model's robustness to noisy data through lazy learning;

[0011] S6. Based on the noise robustness results, a gating mechanism and model cascade architecture are constructed to dynamically match computing resources with classification difficulty.

[0012] S7. Combined with the resource consumption data of lazy learning, a non-traditional rule mechanism is used to initialize weights and hyperparameters to reduce the model convergence cost;

[0013] S8. Call the error sample library with reverse error enhancement to train the multi-classifier game system, and interactively optimize the model's anti-misleading ability through the multi-classifier attack and defense game mechanism;

[0014] S9. Use the intermediate data output from each step to optimize the loss function, verify and fine-tune the classification robustness, and use the loss function to calculate the total loss of balanced classification and robustness.

[0015] Preferably, in step S3, the reverse error enhancement mechanism includes the following steps:

[0016] S31. Define an error sample weight function and perform nonlinear enhancement on the error sample weight so that the model pays more attention to the error samples that are difficult to classify during training;

[0017] S32. Generate adversarial noise injection original samples through Lévy stable distribution, construct training samples containing adversarial errors, and enhance the robustness of the model to noise interference;

[0018] S33. Construct a robust loss function to focus more on misclassified metadata samples during model training, enhancing the learning ability of difficult-to-classify samples;

[0019] S34. Set the fluctuation threshold of the robustness index, construct a robustness index function, integrate the accuracy of noisy samples and the sine integral of the accuracy fluctuation, and quantify the anti-interference ability of the model;

[0020] S35. By weightedly fusing the basic model parameters and the error enhancement parameters through the error function, the model can retain its original capabilities while absorbing the robustness optimization of anti-error training.

[0021] Preferably, in step S32, constructing a training sample containing adversarial errors includes the following steps:

[0022] S321. Generate noise that meets the heavy-tail characteristics through the characteristic function of Lévy distribution and inverse Fourier transform, injecting complex interference into the model;

[0023] S322: trim the noise amplitude to limit the maximum noise amplitude, avoid excessive noise from damaging metadata features, and ensure that adversarial training is controllable;

[0024] S323 uses nonlinear fusion to weight metadata, allowing noise to adaptively adjust intensity based on metadata characteristics, more closely matching real interference scenarios.

[0025] S324. Based on the gradient of the adversarial loss, iteratively update the noise so that the noise continues to approach the direction of maximizing the model error, thereby enhancing the adversarial training effect.

[0026] S325. Mark samples that are misclassified by the model after adversarial noise injection as incorrect candidates and associate them with the weight update process, so that model training can focus more on difficult-to-classify samples. Monitor the rate of change of the adversarial loss and stop noise injection when the loss no longer changes significantly, balancing training cost and adversarial strength.

[0027] Preferably, in step S4, the dream learning mechanism includes the following steps:

[0028] S41. Based on the output sample error, a sub-network based on the generative adversarial network is constructed, random noise is input, and dream metadata is output through the generator;

[0029] S42. Set a duration threshold. When the non-model training duration exceeds the set threshold, activate the dream generator and use the Wasserstein distance to construct an unsupervised learning loss. This forces the classifier to adapt to the data distribution pattern produced by the dream generator. The distribution information obtained after unsupervised learning optimization is then fed back to the reverse error enhancement mechanism for re-error training. This makes the model more stable in the face of interference and improves the diversity of error samples.

[0030] S43. Setting a difference threshold, using the ant colony optimization algorithm, and optimizing the generator parameters using the state transition probability formula, narrows the distribution difference between dream samples and true error samples, making the distribution difference between dream samples and true error samples less than the set threshold, thereby improving the model's learning adaptability to error samples;

[0031] S44. Calculate the fractal dimension difference between the dream sample and the true error sample, and select high-quality dream samples whose fractal dimension difference is less than a threshold, to provide high-quality sample parameters for the subsequent neural noise adaptation mechanism.

[0032] Preferably, the neural noise adaptation mechanism comprises the following steps:

[0033] S51. Introducing Poisson noise, fusing high-quality dream samples with noise, constructing noisy inputs through bilateral filtering, and generating pseudo-random numbers to provide a noise robustness benchmark for lazy learning.

[0034] S52. Map pseudo-random numbers into a Tarot matrix, fuse non-traditional signals through element-by-element multiplication, and use composite trigonometric functions to control noise intensity so that the noise intensity is negatively correlated with model robustness, balancing training difficulty and improving robustness.

[0035] S53. Introducing position encoding-assisted attention masks allows the model to focus on key information and ignore irrelevant noise. At the same time, the mask parameters provide a basis for the lazy gating mechanism in subsequent steps, enhancing the model's anti-interference and feature focusing capabilities.

[0036] S54. Focus on uncertain classification scenarios through triplet loss, calculate the loss and use it to adjust the subsequent model cascade threshold, and enhance the model's ability to distinguish fuzzy and difficult-to-classify samples.

[0037] Preferably, in step S6, the gating mechanism includes the following steps:

[0038] S61, based on the attention mask, constructs lazy gating through Mish activation to dynamically decide whether the deep network is activated;

[0039] S62. Build a cascade architecture of lightweight and large models, select models based on gated output and dynamic thresholds, and balance inference efficiency and accuracy;

[0040] S63, using the particle swarm optimization (PSO) algorithm to update the speed of gating related parameters, and optimize the gating with the goal of minimizing resource loss;

[0041] S64. Comprehensively calculate the time and memory loss and establish a resource loss function to achieve the goal of efficient resource utilization and balanced model performance.

[0042] Preferably, in step S7, the non-traditional rule mechanism includes the following steps:

[0043] S71, extract abstract features to construct a matrix, combine it with the gate threshold, and generate hyperparameters through quantization, weighting and noise processing;

[0044] S72. Focus on the lucky hyperparameter set, quantify the difference between the corresponding positive and negative samples through contrast loss, and strengthen the model's learning of key hyperparameters;

[0045] S73. Reset the momentum term based on periodic triggering, and update the momentum by fusing historical momentum with the current resource loss gradient.

[0046] Preferably, in step S8, the multi-classifier attack and defense game mechanism includes the following steps:

[0047] S81. Call the error sample library and generate error sample labels through the label permutation matrix to provide misleading materials for the attack classifier. Let the main classifier train and reason in the error label environment to simulate the misleading link of the attack and defense game.

[0048] S82. Build a defense classifier, fuse multiple classifier predictions through Bayesian voting, adjust voting weights based on hyperparameters, identify misleading behavior of attack classifiers, and provide feedback to optimize the weights of erroneous samples, thus strengthening the defense logic.

[0049] S83. Define the benefits of the classifier in the attack-defense game, combine accuracy with resource constraints, and simulate the game reward and punishment mechanism to balance classification performance and strategy cost;

[0050] S84. Optimize classifier parameters through crossover algorithm, simulate population evolution, and allow the attack and defense classifiers to continuously iterate in the game to improve the effectiveness of the strategy.

[0051] Preferably, in step S84, optimizing the classifier parameters includes the following steps:

[0052] S841. Calculate individual fitness based on the calculated game payoffs, sort the parent set using the contrastive learning loss of the lucky hyperparameter, randomly select parent pairs, combine the crossover probability positively correlated with the learning rate, perform a crossover operation using a random mask to generate offspring, and perform genetic optimization exploration on the model parameters.

[0053] S842. Apply Gaussian mutation to the offspring parameters generated by the crossover operation. Combined with the mutation intensity negatively correlated with the momentum term, random perturbations are introduced to the model parameters to enhance the exploration capability of genetic optimization.

[0054] S843. Retain the individuals with the highest fitness in the parent generation to enter the next generation to ensure the transmission of high-quality parameters and maintain the model optimization direction. By detecting the overall loss correlation threshold, it determines when to terminate the genetic optimization and outputs stable and high-quality parameters for end-to-end model fusion to ensure optimization efficiency and parameter quality.

[0055] The metadata classification model construction system based on a neural network is applied to the metadata classification model construction method based on a neural network described above, and is characterized by comprising:

[0056] Neural network topology building module, which is used to define the hierarchical structure, number of neurons and connection rules of the neural network, build the basic computing framework of the model, and determine the information transmission method between layers;

[0057] The metadata preprocessing module is used to collect metadata samples, complete format unification, outlier filtering, standardization, and data set division to provide standardized input for subsequent training;

[0058] The reverse error enhancement module is used to introduce controllable noise into the preprocessed metadata, dynamically adjust the weight of error samples, generate training data containing adversarial errors, and build an error sample library for the classifier's attack and defense game mechanism;

[0059] The dream learning generation module is used to train the GAN-dream generator with error samples generated by reverse error enhancement, synthesize virtual metadata during the non-training phase, and expand the diversity of the training set;

[0060] The neural noise adaptation module is used to fuse the virtual metadata generated by dreams with the random noise channel, and improve the model's robustness to noisy data through a lazy learning strategy;

[0061] Dynamic resource allocation module, which combines noise robustness results to build a gating mechanism and model cascade architecture, dynamically allocating computing resources based on classification difficulty;

[0062] The hyperparameter optimization module is used to combine the resource consumption data of lazy learning and use algorithms such as particle swarm optimization to initialize model weights and hyperparameters to reduce convergence costs;

[0063] The multi-classifier attack and defense game module is used to use the attack sample library enhanced by reverse errors to train attack classifiers to mislead the main model, identify attacks and optimize defense strategies to improve the model's anti-misleading ability;

[0064] The iterative training and verification module is used to construct an overall objective function that balances classification loss and robustness loss. It verifies and fine-tunes the model through adversarial samples to ensure accurate classification and adaptability to complex environments.

[0065] The method and system for constructing a metadata classification model based on a neural network provided by the present invention have the following beneficial effects:

[0066] 1. By constructing a reverse error enhancement mechanism, we achieve three technological breakthroughs: defining a nonlinear error sample weight function, precisely strengthening the learning of difficult-to-classify samples, leveraging the heavy-tail characteristics of the Lévy stable distribution to combat noise, and combining a noise construction strategy of cropping, adaptive fusion, and gradient iteration to preserve metadata features while enhancing interference complexity. Innovative robust loss functions and parameter fusion methods allow the model to simultaneously absorb original capabilities and error-resistant optimization, significantly improving the model's robustness to noisy and difficult-to-classify samples, and addressing the pain point of classification accuracy being easily disturbed in complex scenarios. This enables the model to stably output high-quality classification results even in real noisy environments.

[0067] 2. The dream learning mechanism breaks through the boundaries of traditional data augmentation. It trains GAN based on error samples to generate virtual metadata. The generator is activated during non-training periods and the distribution is adapted unsupervisedly through the Wasserstein distance. Backward feedback is used to optimize error training. Ant colony optimization is introduced to narrow the gap between dream and real samples. Fractal dimensions are used to screen high-quality samples. This not only expands the diversity of the training set, but also allows the model to adapt to unknown interference patterns. This solves the problem of scarcity and single distribution of error samples in real scenarios, and significantly improves the classification robustness and generalization ability of the model when faced with rare error samples.

[0068] 3. A multi-dimensional noise-resistant system is constructed through a neural noise adaptation mechanism, integrating Poisson noise, Tarot matrix non-traditional signals and compound trigonometric function regulation to achieve dynamic balance of noise intensity. Position encoding attention mask focuses on key features, and triplet loss strengthens the distinction between fuzzy samples, effectively simulating real complex noise interference, allowing the model to accurately identify core information and ignore irrelevant noise, solving the problems of feature drowning and confusion of difficult-to-classify samples in noisy environments, and significantly improving the classification accuracy and robustness of the model in high-noise and fuzzy classification scenarios.

[0069] 4. A gating mechanism intelligently matches computing resources with classification difficulty. Mish activation lazy gating dynamically regulates deep network activation. A lightweight-large model cascade architecture combines PSO optimization with a resource loss function to balance efficiency and accuracy. This addresses the conflict between traditional models' wasted computing power and underfitting of complex samples. During inference, simple samples invoke lightweight models for speed, while complex samples trigger large models to ensure accuracy. This enables the model to operate efficiently across tasks of varying difficulty, reducing deployment costs while improving classification quality.

[0070] 5. Reshape the hyperparameter optimization logic through non-traditional rule mechanisms, abstract feature matrices and gating thresholds to generate hyperparameters, contrast loss to enhance key hyperparameter learning, periodic momentum reset to balance historical and current gradients, break through the limitations of manual parameter adjustment, make hyperparameters adapt to the dynamic state of the model, solve the problem of blind hyperparameter optimization, and dynamically adjust hyperparameters according to model robustness and resource consumption during training, accelerate convergence and improve stability, provide better initialization and iteration direction for the model, and reduce training costs and overfitting risks.

[0071] 6. A closed-loop adversarial training system is constructed through a multi-classifier attack-defense game mechanism. The attack classifier misleads the main model by using incorrect labels. The defense classifier combines Bayesian voting with hyperparameter countermeasures. Game benefits and genetic optimization drive the iteration of attack and defense strategies, simulating real adversarial scenarios. The model continues to evolve in the attack-defense game, resolving the industry pain point that the model is susceptible to adversarial interference and significantly improving the model's ability to resist misleading and attack. The classification results remain highly reliable even in malicious interference and label pollution environments, ensuring the security and accuracy of metadata classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0073] Figure 1 A flowchart of the method and system for constructing a metadata classification model based on a neural network provided in this application;

[0074] Figure 2 Schematic diagram of the system modules of the neural network-based metadata classification model construction method and system provided in this application. DETAILED DESCRIPTION

[0075] The following embodiments of the present invention are described in further detail in conjunction with the accompanying drawings and examples. The following embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention.

[0076] like Figure 1-Figure 2 As shown, this embodiment proposes a method for constructing a metadata classification model based on a neural network, which includes the following steps:

[0077] S1. Define the neural network layer, number of neurons, and connection rules, build the basic topology of the model, and provide an initial framework for subsequent parameter optimization. The layer calculation of the neural network follows the linear transformation + activation function. The topology defines the framework of the calculation through the layer dimension and connection method. The formula is: , where is the linear net input of the current layer, is the weight matrix of the current layer, is the output of the previous layer and serves as the input of the current layer. is the bias vector of the current layer, is the activation function, is the output of the current layer and serves as the input of the next layer;

[0078] S2. Collect metadata samples, complete format unification, outlier filtering and standardization, and divide them into training sets, validation sets, and test sets. The output is used as input data for reverse error enhancement. Among them, data format conversion, outlier processing, standardization, and set partitioning are all existing technologies and will not be repeated here;

[0079] S3, based on the pre-processed metadata, introduces controllable noise, dynamically adjusts the weight of error samples, and generates training data containing adversarial errors through the reverse error enhancement mechanism, providing an error sample library for the neural werewolf killing game;

[0080] S4. Use the error samples generated by reverse error enhancement to train the GAN-dream generator, and synthesize virtual metadata in the non-training stage through the dream learning mechanism to supplement the diversity of the training set;

[0081] S5. Fusing the virtual metadata generated by dream learning with the random noise channel to construct a non-traditional signal input strategy for the neural noise adaptation mechanism, and improving the model's robustness to noisy data through lazy learning;

[0082] S6. Based on the noise robustness results, a gating mechanism and model cascade architecture are constructed to dynamically match computing resources with classification difficulty.

[0083] S7. Combined with the resource consumption data of lazy learning, a non-traditional rule mechanism is used to initialize weights and hyperparameters to reduce the model convergence cost;

[0084] S8. Call the error sample library with reverse error enhancement to train the multi-classifier game system, and interactively optimize the model's anti-misleading ability through the multi-classifier attack and defense game mechanism;

[0085] S9. Use the intermediate data output from each step to optimize the loss function, verify and fine-tune the classification robustness, and use the loss function to calculate the total loss of balanced classification and robustness. The formula is: , where Total loss value, is the basic classification loss, and , is the total number of categories, is the first one-hot encoding of the true label The value of the bit, The model predicts The probability of the class, is the robustness weight, is the robustness loss, and , For the original clean sample, is the disturbance intensity coefficient, is the basic classification loss About the original clean sample The gradient, is the true label of the sample. The robustness verification uses the adversarial sample verification method to verify the accuracy. The formula is: , where is the classification accuracy of adversarial samples, is the total number of samples used for calculation in the validation set, For the model The predicted probability vector of adversarial samples, For the validation set The true labels of samples, As the indicator function, iterative training is carried out by constructing a total loss function that balances classification and robustness, and the accuracy of adversarial samples is verified and fine-tuned to ensure that the metadata classification model can accurately classify and adapt to complex environments, supporting the effective construction and application of the model.

[0086] In this embodiment, in step S3, the reverse error enhancement mechanism includes the following steps:

[0087] S31. Define the error sample weight function and perform nonlinear enhancement on the error sample weight so that the model pays more attention to the error samples that are difficult to classify during training. The formula is: , where is the weight value of the error sample, is the basic weight value, is the Fresnel sine integral function, is the adjustment coefficient, is the number of errors in the sample;

[0088] S32. Generate adversarial noise injection original samples through Lévy stable distribution, construct training samples containing adversarial errors, and enhance the robustness of the model to noise interference;

[0089] S33. Construct a robust loss function. When training the model, focus more on the misclassified metadata samples and enhance the learning ability of difficult-to-classify samples. The formula is: , where For error-driven losses, To traverse all error samples, is the true label, is the predicted label;

[0090] S34. Set the fluctuation threshold of the robustness index, construct a robustness index function, integrate the accuracy of noisy samples and the sine integral of the accuracy fluctuation, and quantify the anti-interference ability of the model. The formula is: , where is the robustness index, and are the classification accuracy of noisy samples and clean samples respectively, To characterize the poor accuracy and attenuation coefficient The positive rotation integral of , when multiple rounds of training;

[0091] S35. By weightedly fusing the basic model parameters and the error enhancement parameters through the error function, the model can retain its original capabilities while absorbing the robustness optimization of anti-error training.

[0092] In this embodiment, in step S32, constructing a training sample containing adversarial errors includes the following steps:

[0093] S321. Generate noise that meets the heavy-tail characteristics through the characteristic function of Lévy distribution and inverse Fourier transform, injecting complex interference into the model. The formula is: , where is the characteristic function that describes the frequency domain characteristics of the Lévy distribution, To construct the exponential function of the core form of the characteristic function, 、 are stability and skewness parameters, respectively. is the imaginary unit, is the stability index, To control frequency domain variables The symbolic function of is the tangent function term that shapes the characteristic function;

[0094] S322. Clip the noise amplitude to limit the maximum noise amplitude, avoid excessive noise from destroying metadata features, and ensure that adversarial training is controllable. The formula is: , where is the generated Lévy noise, is a clipping function that limits the input to a specified interval. The maximum amplitude threshold for defining the allowed range of noise;

[0095] S323. Metadata are weighted using nonlinear fusion to allow noise to adaptively adjust its intensity according to metadata characteristics, which is more in line with the actual interference scenario. The formula is: , where and are the fused and original metadata samples respectively, is the activation function;

[0096] S324. Based on the gradient of the adversarial loss, iteratively update the noise so that the noise continues to approach the direction of maximizing the model error and enhance the adversarial training effect. The formula is: , where and They are respectively and The noise of the round iteration, To control the learning rate of the noise update amplitude, is the adversarial loss function that indicates the direction of noise update For metadata gradients, is the true label;

[0097] S325. Mark samples that are misclassified by the model after adversarial noise injection as incorrect candidates and associate them with the weight update process, so that model training can focus more on difficult-to-classify samples. Monitor the rate of change of the adversarial loss and stop noise injection when the loss no longer changes significantly, balancing training cost and adversarial strength.

[0098] In this embodiment, in step S4, the dream learning mechanism includes the following steps:

[0099] S41. Based on the output sample error, a sub-network based on the generative adversarial network is constructed, random noise is input, and dream metadata is output through the generator;

[0100] S42. Set a duration threshold. When the non-model training duration exceeds the set threshold, activate the dream generator and use the Wasserstein distance to construct an unsupervised learning loss. This forces the classifier to adapt to the data distribution pattern produced by the dream generator. The distribution information obtained after unsupervised learning optimization is then fed back to the reverse error enhancement mechanism for re-error training. This makes the model more stable in the face of interference and improves the diversity of error samples.

[0101] S43. Set a difference threshold, use the ant colony optimization algorithm, and optimize the generator parameters through the state transition probability formula to reduce the distribution difference between dream samples and real error samples. Make the distribution difference between dream samples and real error samples less than the set threshold, and improve the model's learning adaptability to error samples. The formula is: , where The state transition probability that guides the optimization direction of the generator parameters, is the pheromone that affects the transfer probability, To determine the heuristic factor for optimizing the update transfer direction, and is the corresponding weight coefficient;

[0102] S44. Calculate the fractal dimension difference between the dream sample and the true error sample, and select high-quality dream samples whose fractal dimension difference is less than a threshold, to provide high-quality sample parameters for the subsequent neural noise adaptation mechanism.

[0103] In this embodiment, the neural noise adaptation mechanism includes the following steps:

[0104] S51. Introducing Poisson noise, fusing high-quality dream samples with noise, constructing noisy inputs through bilateral filtering, and generating pseudo-random numbers to provide a noise robustness benchmark for lazy learning.

[0105] S52. Map the pseudo-random numbers into a Tarot matrix, fuse the non-traditional signals through element-by-element multiplication, and use a composite trigonometric function to control the noise intensity so that the noise intensity is negatively correlated with the model robustness, balancing the training difficulty and improving the robustness. The formula is: , where for Always control the strength of the anti-noise injection, and is the noise intensity base, is the fundamental frequency of the noise variation, and They are the phase parameters for changing the starting point and rhythm of noise intensity variation;

[0106] S53. Introducing position encoding-assisted attention masks allows the model to focus on key information and ignore irrelevant noise. At the same time, the mask parameters provide a basis for the lazy gating mechanism in subsequent steps, enhancing the model's anti-interference and feature focusing capabilities.

[0107] S54. Focus on uncertain classification scenarios through triplet loss, calculate the loss and use it to adjust the subsequent model cascade threshold to enhance the model's ability to distinguish fuzzy and difficult-to-classify samples. The formula is: , where is the classification loss function that guides threshold optimization, To determine the predicted category Whether it belongs to the uncertain classification sample set The characteristic function of and are the positive and negative distances of the samples, respectively. It is the minimum interval parameter for positive and negative distances.

[0108] In this embodiment, in step S6, the gating mechanism includes the following steps:

[0109] S61. Based on the attention mask, lazy gating is constructed through Mish activation to dynamically determine whether the deep network is activated. The formula is: , where For lazy gated output, is the gate calculation logic, is the Mish activation function, is the input metadata, and are the weight and bias of the gated linear transformation respectively;

[0110] S62. Build a cascade architecture of lightweight and large models, select models based on gated output and dynamic thresholds, and balance inference efficiency and accuracy. The formula is: , where Select the result for the gate, and They are lightweight models and large models respectively. 、 is the characteristic function;

[0111] S63. Use the particle swarm optimization (PSO) algorithm to update the speed of gating-related parameters and optimize the gating with the goal of minimizing resource loss. The formula is: , where The particle velocity that determines the parameter update step size and direction, is the inertia weight, 、 is the learning factor, 、 is a random number, and 、 , and are the particle’s own historical optimal position and current position, respectively. is the global optimal position;

[0112] S64. Comprehensively calculate the time and memory loss and establish a resource loss function to achieve the goal of efficient resource utilization and balanced model performance. The formula is: , where For resource loss, and is the weight coefficient, is the model calculation time, is the model memory loss.

[0113] In this embodiment, in step S7, the non-traditional rule mechanism includes the following steps:

[0114] S71. Extract abstract features to construct a matrix, combine it with the gate threshold, and generate hyperparameters through quantization, weighting and noise processing. The formula is: , where are the generated hyperparameters, is the abstract feature matrix, is the abstract weight, is the quantization function, Galilean noise with controlled noise amplitude;

[0115] S72. Focus on the lucky hyperparameter set, quantify the difference between the corresponding positive and negative samples through contrast loss, and strengthen the model's learning of key hyperparameters. The formula is: , where is the contrastive learning loss with lucky hyperparameters, is the lucky hyperparameter set, Positive sample and negative samples Contrast loss;

[0116] S73. Based on the periodic triggering of the momentum term reset, the momentum is updated by fusing the historical momentum and the current resource loss gradient. The formula is: , where and are the momentum terms of the current step and the previous step respectively, is the momentum coefficient, is the resource loss gradient.

[0117] In this embodiment, in step S8, the multi-classifier attack and defense game mechanism includes the following steps:

[0118] S81. Call the error sample library and generate error sample labels through the label permutation matrix to provide misleading materials for the attack classifier. Let the main classifier train and reason in the error label environment to simulate the misleading link of the attack and defense game. The formula is: , where To interfere with the main classifier misleading wrong label, is the label conversion matrix, is the true label;

[0119] S82. Build a defense classifier, fuse multiple classifier predictions through Bayesian voting, adjust voting weights based on hyperparameters, identify misleading behaviors of attack classifiers, optimize error sample weights through feedback, and strengthen defense logic. The formula is: , where is the final voting result of the defense classifier, is the number of classifiers, To predict the probability of the classifier Perform logistic regression transformation operations;

[0120] S83. Define the benefits of the classifier in the attack-defense game. Combined with accuracy and resource constraints, simulate the game reward and punishment mechanism to balance classification performance and strategy cost. The formula is: , where For the The game payoff of a classifier is For the The prediction accuracy of a classifier in the metadata classification task, is the penalty coefficient, To judge the classifier Is it the attacker? The characteristic function of

[0121] S84. Optimize classifier parameters through crossover algorithm, simulate population evolution, and allow the attack and defense classifiers to continuously iterate in the game to improve the effectiveness of the strategy.

[0122] In this embodiment, in step S84, optimizing the classifier parameters includes the following steps:

[0123] S841. Calculate individual fitness based on the calculated game payoffs. Combined with the comparative learning loss of the lucky hyperparameter, sort the parent set. Generate offspring by randomly selecting parent pairs and combining the crossover probability positively correlated with the learning rate. Perform a crossover operation using a random mask. Genetic optimization is then performed on the model parameters. The formula is: , where and 、 are child parameters and two parent parameters, is the element-wise multiplication symbol, is a random mask, and , is the crossover probability Bernoulli distribution;

[0124] S842. Gaussian mutation is applied to the offspring parameters generated by the crossover operation. Combined with the mutation intensity negatively correlated with the momentum term, random perturbations are introduced into the model parameters to enhance the exploration capability of genetic optimization. The formula is: , where is the offspring parameter after mutation, is the coefficient of variation intensity, is the standard normal distribution, is a uniformly distributed random number Less than the mutation probability The indicator function of , is uniformly distributed;

[0125] S843. Retain the individuals with the highest fitness in the parent generation to enter the next generation to ensure the transmission of high-quality parameters and maintain the model optimization direction. By detecting the overall loss correlation threshold, it determines when to terminate the genetic optimization and outputs stable and high-quality parameters for end-to-end model fusion to ensure optimization efficiency and parameter quality.

[0126] The metadata classification model construction system based on a neural network is applied to the above-mentioned metadata classification model construction method based on a neural network, including:

[0127] Neural network topology building module, which is used to define the hierarchical structure, number of neurons and connection rules of the neural network, build the basic computing framework of the model, and determine the information transmission method between layers;

[0128] The metadata preprocessing module is used to collect metadata samples, complete format unification, outlier filtering, standardization, and data set division to provide standardized input for subsequent training;

[0129] The reverse error enhancement module is used to introduce controllable noise into the preprocessed metadata, dynamically adjust the weight of error samples, generate training data containing adversarial errors, and build an error sample library for the classifier's attack and defense game mechanism;

[0130] The dream learning generation module is used to train the GAN-dream generator with error samples generated by reverse error enhancement, synthesize virtual metadata during the non-training phase, and expand the diversity of the training set;

[0131] The neural noise adaptation module is used to fuse the virtual metadata generated by dreams with the random noise channel, and improve the model's robustness to noisy data through a lazy learning strategy;

[0132] Dynamic resource allocation module, which combines noise robustness results to build a gating mechanism and model cascade architecture, dynamically allocating computing resources based on classification difficulty;

[0133] The hyperparameter optimization module is used to combine the resource consumption data of lazy learning and use algorithms such as particle swarm optimization to initialize model weights and hyperparameters to reduce convergence costs;

[0134] The multi-classifier attack and defense game module is used to use the attack sample library enhanced by reverse errors to train attack classifiers to mislead the main model, identify attacks and optimize defense strategies to improve the model's anti-misleading ability;

[0135] The iterative training and verification module is used to construct an overall objective function that balances classification loss and robustness loss. It verifies and fine-tunes the model through adversarial samples to ensure accurate classification and adaptability to complex environments.

[0136] The above embodiments are intended to illustrate the present invention only and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the embodiments, it should be understood by those skilled in the art that various combinations, modifications, or equivalent substitutions of the technical solutions of the present invention do not depart from the spirit and scope of the technical solutions of the present invention and should be encompassed by the scope of the claims of the present invention.

Claims

1. A method for constructing a metadata classification model based on a neural network, characterized in that: The following steps are involved: S1. Define the neural network layer, number of neurons and connection rules, build the basic topology of the model, and provide an initial framework for subsequent parameter optimization; S2. Collect metadata samples, complete format unification, outlier filtering and standardization, divide them into training set, validation set and test set, and use the output as input data for reverse error enhancement; S3, based on the pre-processed metadata, introduces controllable noise, dynamically adjusts the weight of error samples, and generates training data containing adversarial errors through the reverse error enhancement mechanism, providing an error sample library for the neural werewolf killing game; S4. Use the error samples generated by reverse error enhancement to train the GAN-dream generator, and synthesize virtual metadata in the non-training stage through the dream learning mechanism to supplement the diversity of the training set; S5. Fusing the virtual metadata generated by dream learning with the random noise channel to construct a non-traditional signal input strategy for the neural noise adaptation mechanism, and improving the model's robustness to noisy data through lazy learning; S6. Based on the noise robustness results, a gating mechanism and model cascade architecture are constructed to dynamically match computing resources with classification difficulty. S7. Combined with the resource consumption data of lazy learning, a non-traditional rule mechanism is used to initialize weights and hyperparameters to reduce the model convergence cost; S8. Call the error sample library with reverse error enhancement to train the multi-classifier game system, and interactively optimize the model's anti-misleading ability through the multi-classifier attack and defense game mechanism; S9. Verify and fine-tune the classification robustness, and use the loss function to calculate the total loss that balances classification and robustness.

2. The method for constructing a metadata classification model based on a neural network according to claim 1, characterized in that: In step S3, the reverse error enhancement mechanism includes the following steps: S31. Define an error sample weight function and perform nonlinear enhancement on the error sample weight so that the model pays more attention to the error samples that are difficult to classify during training; S32. Generate adversarial noise injection original samples through Lévy stable distribution, construct training samples containing adversarial errors, and enhance the robustness of the model to noise interference; S33. Construct a robust loss function to focus more on misclassified metadata samples during model training, enhancing the learning ability of difficult-to-classify samples; S34. Set the fluctuation threshold of the robustness index, construct a robustness index function, integrate the accuracy of noisy samples and the sine integral of the accuracy fluctuation, and quantify the anti-interference ability of the model; S35. By weightedly fusing the basic model parameters and the error enhancement parameters through the error function, the model can retain its original capabilities while absorbing the robustness optimization of anti-error training.

3. The method for constructing a metadata classification model based on a neural network according to claim 2, characterized in that: In step S32, constructing a training sample containing adversarial errors includes the following steps: S321. Generate noise that meets the heavy-tail characteristics through the characteristic function of Lévy distribution and inverse Fourier transform, injecting complex interference into the model; S322: trim the noise amplitude to limit the maximum noise amplitude, avoid excessive noise from damaging metadata features, and ensure that adversarial training is controllable; S323 uses nonlinear fusion to weight metadata, allowing noise to adaptively adjust intensity based on metadata characteristics, more closely matching real interference scenarios. S324. Based on the gradient of the adversarial loss, iteratively update the noise so that the noise continues to approach the direction of maximizing the model error, thereby enhancing the adversarial training effect. S325. Mark samples that are misclassified by the model after adversarial noise injection as incorrect candidates and associate them with the weight update process, so that model training can focus more on difficult-to-classify samples. Monitor the rate of change of the adversarial loss and stop noise injection when the loss no longer changes significantly, balancing training cost and adversarial strength.

4. The method for constructing a metadata classification model based on a neural network according to claim 3, characterized in that: In step S4, the dream learning mechanism includes the following steps: S41. Based on the output sample error, a sub-network based on the generative adversarial network is constructed, random noise is input, and dream metadata is output through the generator; S42. Set a duration threshold. When the non-model training duration exceeds the set threshold, activate the dream generator and use the Wasserstein distance to construct an unsupervised learning loss. This forces the classifier to adapt to the data distribution pattern produced by the dream generator. The distribution information obtained after unsupervised learning optimization is then fed back to the reverse error enhancement mechanism for re-error training. This makes the model more stable in the face of interference and improves the diversity of error samples. S43. Setting a difference threshold, using the ant colony optimization algorithm, and optimizing the generator parameters using the state transition probability formula, narrows the distribution difference between dream samples and true error samples, making the distribution difference between dream samples and true error samples less than the set threshold, thereby improving the model's learning adaptability to error samples; S44. Calculate the fractal dimension difference between the dream sample and the true error sample, and select high-quality dream samples whose fractal dimension difference is less than a threshold, to provide high-quality sample parameters for the subsequent neural noise adaptation mechanism.

5. The method for constructing a metadata classification model based on a neural network according to claim 4, characterized in that: The neural noise adaptation mechanism includes the following steps: S51. Introducing Poisson noise, fusing high-quality dream samples with noise, constructing noisy inputs through bilateral filtering, and generating pseudo-random numbers to provide a noise robustness benchmark for lazy learning. S52. Map pseudo-random numbers into a Tarot matrix, fuse non-traditional signals through element-by-element multiplication, and use composite trigonometric functions to control noise intensity so that the noise intensity is negatively correlated with model robustness, balancing training difficulty and improving robustness. S53. Introducing position encoding-assisted attention masks allows the model to focus on key information and ignore irrelevant noise. At the same time, the mask parameters provide a basis for the lazy gating mechanism in subsequent steps, enhancing the model's anti-interference and feature focusing capabilities. S54. Focus on uncertain classification scenarios through triplet loss, calculate the loss and use it to adjust the subsequent model cascade threshold, and enhance the model's ability to distinguish fuzzy and difficult-to-classify samples.

6. The method for constructing a metadata classification model based on a neural network according to claim 5, characterized in that: In step S6, the gating mechanism includes the following steps: S61, based on the attention mask, constructs lazy gating through Mish activation to dynamically decide whether the deep network is activated; S62. Build a cascade architecture of lightweight and large models, select models based on gated output and dynamic thresholds, and balance inference efficiency and accuracy; S63, using the particle swarm optimization (PSO) algorithm to update the speed of gating related parameters, and optimize the gating with the goal of minimizing resource loss; S64. Comprehensively calculate the time and memory loss and establish a resource loss function to achieve the goal of efficient resource utilization and balanced model performance.

7. The method for constructing a metadata classification model based on a neural network according to claim 6, characterized in that: In step S7, the non-traditional rule mechanism includes the following steps: S71, extract abstract features to construct a matrix, combine it with the gate threshold, and generate hyperparameters through quantization, weighting and noise processing; S72. Focus on the lucky hyperparameter set, quantify the difference between the corresponding positive and negative samples through contrast loss, and strengthen the model's learning of key hyperparameters; S73. Reset the momentum term based on periodic triggering, and update the momentum by fusing historical momentum with the current resource loss gradient.

8. The method for constructing a metadata classification model based on a neural network according to claim 7, characterized in that: In step S8, the multi-classifier attack and defense game mechanism includes the following steps: S81. Call the error sample library and generate error sample labels through the label permutation matrix to provide misleading materials for the attack classifier. Let the main classifier train and reason in the error label environment to simulate the misleading link of the attack and defense game. S82. Build a defense classifier, fuse multiple classifier predictions through Bayesian voting, adjust voting weights based on hyperparameters, identify misleading behavior of attack classifiers, and provide feedback to optimize the weights of erroneous samples, thus strengthening the defense logic. S83. Define the benefits of the classifier in the attack-defense game, combine accuracy with resource constraints, and simulate the game reward and punishment mechanism to balance classification performance and strategy cost; S84. Optimize classifier parameters through crossover algorithm, simulate population evolution, and allow the attack and defense classifiers to continuously iterate in the game to improve the effectiveness of the strategy.

9. The method for constructing a metadata classification model based on a neural network according to claim 8, characterized in that: In step S84, optimizing the classifier parameters includes the following steps: S841. Calculate individual fitness based on the calculated game payoffs, sort the parent set using the contrastive learning loss of the lucky hyperparameter, randomly select parent pairs, combine the crossover probability positively correlated with the learning rate, perform a crossover operation using a random mask to generate offspring, and perform genetic optimization exploration on the model parameters. S842. Apply Gaussian mutation to the offspring parameters generated by the crossover operation. Combined with the mutation intensity negatively correlated with the momentum term, random perturbations are introduced to the model parameters to enhance the exploration capability of genetic optimization. S843. Retain the individuals with the highest fitness in the parent generation to enter the next generation to ensure the transmission of high-quality parameters and maintain the model optimization direction. By detecting the overall loss correlation threshold, it determines when to terminate the genetic optimization and outputs stable and high-quality parameters for end-to-end model fusion to ensure optimization efficiency and parameter quality.

10. A metadata classification model construction system based on a neural network, applied to the metadata classification model construction method based on a neural network as claimed in claim 9, characterized in that: include: Neural network topology building module, which is used to define the hierarchical structure, number of neurons and connection rules of the neural network, build the basic computing framework of the model, and determine the information transmission method between layers; The metadata preprocessing module is used to collect metadata samples, complete format unification, outlier filtering, standardization, and data set division to provide standardized input for subsequent training; The reverse error enhancement module is used to introduce controllable noise into the preprocessed metadata, dynamically adjust the weight of error samples, generate training data containing adversarial errors, and build an error sample library for the classifier's attack and defense game mechanism; The dream learning generation module is used to train the GAN-dream generator with error samples generated by reverse error enhancement, synthesize virtual metadata during the non-training phase, and expand the diversity of the training set; The neural noise adaptation module is used to fuse the virtual metadata generated by dreams with the random noise channel, and improve the model's robustness to noisy data through a lazy learning strategy; Dynamic resource allocation module, which combines noise robustness results to build a gating mechanism and model cascade architecture, dynamically allocating computing resources based on classification difficulty; The hyperparameter optimization module is used to combine the resource consumption data of lazy learning and use algorithms such as particle swarm optimization to initialize model weights and hyperparameters to reduce convergence costs; The multi-classifier attack and defense game module is used to use the attack sample library enhanced by reverse errors to train attack classifiers to mislead the main model, identify attacks and optimize defense strategies to improve the model's anti-misleading ability; The iterative training and verification module is used to construct an overall objective function that balances classification loss and robustness loss. It verifies and fine-tunes the model through adversarial samples to ensure accurate classification and adaptability to complex environments.

Citation Information

Cited By

  • AIGC model robustness enhancement method and system based on adversarial sample defense

    CN122065906A