Neural network model robustness enhancement method based on frequency domain information distribution

By employing frequency domain transformation and weight redistribution, the problem of needing to modify the training process or retrain in existing technologies is solved, thereby enhancing the robustness and lightweighting of neural network models, making them suitable for practical applications.

CN120911532APending Publication Date: 2025-11-07GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites -1 Cited by

Patent Information

Application Number
CN202511078970.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-02
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing methods for improving the robustness of neural networks require modifications to the training process or retraining the model, which are computationally expensive and inflexible, making them difficult to apply in resource-constrained scenarios and potentially affecting training stability.

Method used

By performing frequency domain transformation and redistribution on the weights of the trained model, and using Fourier transform (FFT/IFFT) to adjust the weights in the frequency domain, the robustness of the model is enhanced, a cross-neuron weight sharing mechanism is constructed, high-frequency noise is suppressed, and low-frequency information is strengthened.

Benefits of technology

It achieves model optimization without modifying the training framework or retraining, reduces computational costs, improves model robustness, is suitable for lightweight deployment, and is applicable to practical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120911532A_ABST
    Figure CN120911532A_ABST
Patent Text Reader

Abstract

The invention provides a neural network model robustness enhancement method based on frequency domain information distribution. The method is characterized by comprising the following steps: firstly, carrying out fast Fourier transform (FFT) on an input weight matrix; then, carrying out Gaussian-like coefficient redistribution on the weight in a frequency domain; thirdly, the processed weight is converted back to a time domain through inverse Fourier transform (IFFT); and finally, outputting the enhanced new model. According to the process, redistribution of the neural network weight in the frequency domain is realized, and essentially, a special weight sharing mechanism is constructed, so that parameter information of each neuron can be diffused to adjacent neurons according to a specific mode, and the robustness of the model is enhanced. According to the robustness enhancement scheme of the neural network model, an original training framework does not need to be modified, retraining is avoided, calculation is efficient, and deployment is easy. The method can be used for robustness optimization of the convolutional neural network and light weight of a machine learning model in practical application, can be widely applied to the field of artificial intelligence machine learning, and has a good application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a neural network model robustness enhancement method based on frequency domain information distribution, which can be used for robustness optimization of convolutional neural networks in practical applications and lightweight of machine learning models, and belongs to the technical field of artificial intelligence and machine learning. BACKGROUND

[0002] In recent years, deep learning models (especially convolutional neural networks, CNN) have achieved remarkable success in computer vision, natural language processing and other fields. However, the robustness of neural networks has always been one of the key challenges in practical applications. Insufficient robustness can lead to a sharp decline in model performance when facing input noise, adversarial attacks or data distribution shifts. To improve the robustness of neural networks, researchers have proposed various methods, including typical methods such as L1 / L2 regularization, Dropout, etc.

[0003] L1 and L2 regularization are the most common regularization methods, which are used to prevent model overfitting and improve generalization ability. L1 regularization adds a weight absolute value penalty term (λ∑∣w i ∣) to the loss function, which can cause some weights to be zero, thereby achieving sparsity. L2 regularization adds a weight sum of squares penalty term (λ∑w i 2 ) to the loss function, which encourages the weight value to tend to a smaller number, avoiding overfitting caused by extreme weights. Dropout is a random inactivation technique that discards some neurons with a certain probability during training to prevent the network from relying too much on certain features, thereby improving generalization ability.

[0004] However, the existing techniques for improving the robustness of neural networks still have the following problems:

[0005] 1. The core limitation of these methods is that they are strongly coupled with the model training process and must be implemented by modifying the optimization objective (such as the regularization term of the loss function) or adjusting the network structure (such as inserting a Dropout layer). This characteristic results in the need for invasive modifications to the original training code, which risks disrupting the original training logic.

[0006] 2. Most existing methods require backpropagation optimization and cannot directly optimize pre-trained models that have already been trained, which has low flexibility. For already trained models, if you want to improve their robustness, you must adjust the network and retrain, which is computationally expensive, time-consuming and labor-intensive, making it difficult to apply in resource-constrained scenarios.

[0007] 3. It may affect the convergence speed of some deep networks, or even cause unstable training.

[0008] The application discloses a neural network model robustness enhancement method based on frequency domain information distribution. The core innovation point is to directly optimize the weight of the trained model in the frequency domain, without retraining, and the main advantages are as follows:

[0009] 1. Decoupled from the model training process, without modifying the model structure or training process. This method can be independently run or directly integrated into the existing inference framework, avoiding the risk of destroying the original training logic.

[0010] 2. Free from retraining, directly optimizing the pre-trained model. The application only needs to perform frequency domain transformation and re-distribution on the weight, without involving the network training process, without back propagation or gradient update, greatly reducing the calculation cost.

[0011] 3. Efficient calculation, easy to deploy. The frequency domain transformation (FFT / IFFT) involved in the application is highly optimized on modern hardware, fast processing speed, efficient calculation, suitable for real-time optimization.

[0012] 4. Frequency domain weight re-distribution enhances robustness. The application maps the weight to the frequency domain through Fourier transform (FFT), adjusts the contribution of different frequency components using Gaussian-like coefficients, strengthens low-frequency information (robust features), and suppresses high-frequency noise. Compared with traditional frequency domain methods (such as input data filtering), the application directly optimizes the model weight, fundamentally improving the robustness.

[0013] 5. Compatible with model lightening. The application can be combined with pruning, quantization and other technologies to compress the model while maintaining robustness, providing a new idea for model lightening deployment in practical applications. SUMMARY

[0014] In view of the deficiencies of the prior art, the application provides a neural network model robustness enhancement method based on frequency domain information distribution. The purpose of the application is to provide a neural network model robustness enhancement scheme without modifying the original training framework and without retraining: by regulating the distribution of information in the network in the momentum space, the model can maintain stable performance when facing large-scale pruning or disturbance.

[0015] The purpose of the application is achieved as follows:

[0016] The neural network model robustness enhancement method has the characteristics that the core idea of the application is to enhance the robustness of the model by frequency domain transformation and re-distribution of the neural network weight. As shown in the figure, the method mainly includes the following steps: Figure 1

[0017] S1: input the complex neural network model to be optimized;

[0018] ​S2: Fast Fourier Transform (FFT) is performed on the input weight matrix to convert the spatial domain weight to frequency domain representation;

[0019] S3: re-distribution of Gaussian-like coefficients is performed on the weight in frequency domain;

[0020] S4: Inverse Fast Fourier Transform (IFFT) is performed on the processed frequency domain matrix w_scatter to restore the spatial domain weight;

[0021] S5: the new model after optimization is outputted.

[0022] Through the chain operation of frequency domain transformation-weight frequency domain information distribution-inverse transformation, a weight sharing mechanism across neurons is constructed, so that the parameter information of each neuron can be diffused to the adjacent neurons in a specific mode, the high-frequency noise component is suppressed, and the low-frequency robust feature is enhanced, thereby improving the robustness of the model.

[0023] Preferably, the requirements for performing Fast Fourier Transform (FFT) on the weight matrix include: using two-dimensional FFT to process the full connection layer weight matrix, or using three-dimensional FFT to process the convolution layer weight tensor; the dimension of the frequency domain transformation strictly corresponds to the neural network layer structure, ensuring the consistency of the space-frequency domain mapping.

[0024] Preferably, the process of re-distributing Gaussian-like coefficients on the weight in frequency domain includes: Figure 2 as shown in the following table:

[0025] S1: a zero matrix w_scatter with the same shape as the frequency domain weight matrix is initialized;

[0026] S2: the weight matrix is traversed by column in the frequency domain, for each column, K(d) times of weight values with a distance of d columns are collected (where K(d) is a self-defined coefficient related to d and conforming to Gaussian distribution), that is, the value of the ((i±d) mod N)th column of the model weight *= K(d) (where *= means that the result of multiplying the left and right sides is assigned to the left side, mod means to take the remainder, and N means the total number of columns of the weight of the current layer of the model);

[0027] S3: all columns after Gaussian-like information distribution are accumulated to the ith column of w_scatter;

[0028] S4: the column index i takes an integer value in the range of 0 to N-1, and the column distance d takes an integer value in the range of 0 to (N-1) / / 2 (where N is the total number of columns; / / represents floor division, that is, integer division down), covering all effective frequency bands;

[0029] S5: It is particularly emphasized that the Gaussian-like coefficient K(d) conforms to the Gaussian distribution, and the sum is 1 to ensure the conservation of frequency domain energy, for example, K(0) = 0.6, K(1) = 0.12, K(2) = 0.06, K(3) = 0.02, and K(d>3) = 0.

[0030] Preferably, the process of converting the processed weight back to the time domain by inverse fast Fourier transform (IFFT) includes: performing IFFT with the same dimension as fast Fourier transform (FFT) to ensure spatial structure consistency; the output weight is automatically aligned with the original model structure, without adjusting the network architecture or hyperparameters.

[0031] The entire process of the method does not involve model training process, and directly acts on the pre-trained model without back propagation or retraining.

[0032] The beneficial effects of the application are: a special weight sharing mechanism is constructed, so that the parameter information of each neuron can be diffused to the adjacent neurons in a specific mode to enhance the robustness of the model. The application provides a robustness enhancement scheme for neural network model without modifying the original training framework, without retraining, high computing efficiency and easy deployment. The application can be used for robustness optimization of convolutional neural network and lightweight of machine learning model in practical application, and can be widely used in artificial intelligence and machine learning field, and has good application prospect. BRIEF DESCRIPTION OF DRAWINGS

[0033] Figure 1 is a brief flowchart of the method for enhancing the robustness of neural network based on frequency domain information distribution proposed by us. It mainly consists of three parts: fast Fourier transform of weight information in the original model, information distribution in the frequency domain, and inverse Fourier transform.

[0034] Figure 2 is a flowchart of an embodiment of the method for enhancing the robustness of neural network based on frequency domain information distribution in the full connection layer of complex convolutional neural network.

[0035] Figure 3 is a flowchart of a new model with stronger robustness obtained by the method for enhancing the robustness of neural network based on frequency domain information distribution. First, an initial model (a complex model) is trained in the corresponding neural network on the training set of mnist, cifar10 and other data sets, that is, the original model; then the robustness enhancement scheme proposed by us is executed in the full connection layer or the convolutional layer of the original model (for details, see Figure 2 ); and finally, a new model optimized in the frequency domain is generated.

[0036] Figure 4The schematic diagram of two important control data, original accuracy and new accuracy, for obtaining the effectiveness of the method for evaluating the robustness enhancement of the neural network model based on frequency domain information distribution. First, the same pruning rule is performed on the original model and the new model; then, the original accuracy and the new accuracy of the two pruned models are obtained by evaluating them on the same test set; finally, the difference between the original accuracy and the new accuracy is compared to verify the robustness enhancement effect of the frequency domain information distribution method on the model. DETAILED DESCRIPTION

[0037] The application will be further described in conjunction with specific examples.

[0038] Figure 2 The embodiment of the method for enhancing the robustness of a neural network based on frequency domain information distribution in the full connection layer of a complex convolutional neural network is given. The main steps include:

[0039] S1: input the complex neural network model to be optimized (original model);

[0040] S2: perform fast Fourier transform (FFT) on the input weight matrix to convert the spatial domain weight to the frequency domain representation;

[0041] S3: initialize a zero matrix w_scatter with the same shape as the frequency domain weight matrix;

[0042] S4: traverse the weight matrix column by column in the frequency domain, and for each column, collect K(d) times of weight values with an interval of d columns (where K(d) is a self-defined coefficient related to d that conforms to Gaussian distribution), that is, the value of the ((i±d) mod N)th column of the model weight *= K(d) (where *= means that the result of multiplying the left and right sides is assigned to the left side, mod means to take the remainder, and N means the total number of columns of the current layer weight of the model);

[0043] S5: add all the columns that have undergone Gaussian-like information distribution to the ith column of w_scatter;

[0044] S6: the column index i takes integer values ranging from 0 to N-1, and the column interval d takes integer values ranging from 0 to (N-1) / / 2 (where N is the total number of columns; / / represents floor division, that is, integer division that rounds down), covering all effective frequency bands;

[0045] S7: perform inverse fast Fourier transform (IFFT) on the processed frequency domain matrix w_scatter to restore the spatial domain weight;

[0046] S8: output the optimized new model.

[0047] To sum up, the neural network model robustness enhancement method based on frequency domain information distribution provided by the application realizes model optimization independent of retraining through the frequency domain transformation and weight redistribution strategy of the system. The specific implementation process is clear and definite, the parameter adjustment is flexible, the calculation efficiency is high, and it is especially suitable for rapid deployment and application in actual production environment.

[0048] It should be noted that the above embodiments are only specific implementations of the present application, which are used to illustrate the technical solutions of the present application, and are not a limitation on the protection scope of the present application. Under the technical concept of the present application, those skilled in the art can appropriately adjust the specific structure or parameters, and these adjustments should be covered in the scope of claims of the present application.

Claims

1. A neural network model robustness enhancement method based on frequency domain information distribution, characterized in that: The core idea of the present application is to enhance the robustness of the model by frequency domain transformation and redistribution of neural network weights. The method mainly includes the following steps: S1: input the complex neural network model to be optimized; S2: perform fast Fourier transform (FFT) on the input weight matrix to convert the spatial domain weight to frequency domain representation; S3: redistribute the weight in the frequency domain as a Gaussian-like coefficient; S4: inverse fast Fourier transform (IFFT) on the processed frequency domain matrix w_scatter to restore the spatial domain weight; S5: output the optimized new model. Through the chain operation of frequency domain transformation-weight frequency domain information distribution-inverse transformation, a cross-neuron weight sharing mechanism is constructed, so that the parameter information of each neuron can be diffused to the adjacent neurons in a specific mode, the high-frequency noise component is suppressed, and the low-frequency robust feature is enhanced, thereby improving the model robustness.

2. The fast Fourier transform (FFT) of a weight matrix according to claim 1, characterized in that: The two-dimensional FFT is used to process the fully connected layer weight matrix, or the three-dimensional FFT is used to process the convolution layer weight tensor; the dimension of the frequency domain transformation strictly corresponds to the neural network layer structure, ensuring the consistency of the space-frequency domain mapping.

3. According to claim 1, the weight is redistributed as a Gaussian-like coefficient in the frequency domain. Characterized in that: S1: initialize a zero matrix w_scatter with the same shape as the frequency domain weight matrix; S2: traverse the weight matrix by column in the frequency domain, for each column, collect K(d) times of weight values with a distance of d columns (where K(d) is a self-defined coefficient related to d that conforms to the Gaussian distribution), that is, the value of the ((i±d) mod N) column of the model weight *= K(d) (where *= means assigning the result of multiplying the left and right to the left, mod means taking the remainder, and N means the total number of columns of the current layer weight of the model); S3: add all the columns with Gaussian-like information distribution to the i-th column of w_scatter; S4: the value of column index i is an integer ranging from 0 to N-1, and the value of column distance d is an integer ranging from 0 to (N-1) / / 2 (where N is the total number of columns; / / represents floor division, i.e. integer division), covering all effective frequency bands; S5: It is particularly emphasized that the Gaussian-like coefficient K(d) conforms to the Gaussian distribution and the sum is 1, to ensure the conservation of frequency energy, for example, K(0)=0.6, K(1)=0.12, K(2)=0.06, K(3)=0.02, K(d>3)=0.

4. The method of claim 1, converting the processed weights back to the time domain by an inverse fast Fourier transform (IFFT). characterized in that: The IFFT is performed with the same dimension as the fast Fourier transform (FFT) described in claim 2 to ensure the consistency of the spatial structure; the output weight is automatically aligned with the original model structure, without the need to adjust the network architecture or hyperparameters.

5. The operational procedure according to any of claims 1, 2, 3, 4 characterized by: The method does not involve the model training process, and directly acts on the pre-trained model without the need for back propagation or retraining.