Headset adaptive filter design method based on neural network structure search

By optimizing the headphone adaptive filter through neural network architecture search and evolutionary algorithms, the problems of fixed structure and poor adaptability in traditional methods are solved, realizing automated design and efficient adaptation, and providing a solution with high-quality audio experience and low computational complexity.

CN121031269APending Publication Date: 2025-11-28COSONIC INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510917360.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2025-11-28

AI Technical Summary

Technical Problem

Traditional headphone adaptive filter design methods suffer from fixed structures, poor adaptability, slow adaptation speed, and poor adaptability to complex audio environments. Furthermore, deep learning methods rely on large amounts of data and human experience, making them difficult to automate and scale up.

Method used

A neural network-based structure search method is adopted. By defining a flexible search space and an efficient search algorithm, the filter structure and parameters most suitable for the current audio environment are automatically discovered. Combined with an evolutionary algorithm, structure search is performed to achieve automatic filter optimization.

Benefits of technology

It improves the adaptability and performance of filters, enabling them to provide a high-quality audio experience in complex audio environments. It automates filter design, reduces development costs and time, and maintains low computational complexity, making it suitable for running on portable devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121031269A_ABST
    Figure CN121031269A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of earphone adaptive filter design methods, in particular to an earphone adaptive filter design method based on neural network structure search, which comprises the following steps: defining a filter search space, and reducing the structure search from a large space to a subspace only containing five operations; a training agent is trained, an operation sequence required by an optimal result is found, and the search space is continuously reduced; an optimal operation sequence is found through a training agent, and a required filter is searched on the user-defined data set according to the operation sequence; and verifying the searched filter on the test set, if the precision requirement is not met, adding the data on the test set into the training set, expanding the search space, repeating the search process, combining a neural network structure search technology with adaptive filtering, and determining the accuracy of the filter by defining a flexible search space and an efficient search algorithm. And the filter structure and parameters most suitable for the current audio environment are automatically found.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of headphone adaptive filter design methods, and in particular to a headphone adaptive filter design method based on neural network structure search. Background Technology

[0002] In recent years, with the rapid development of audio technology, headphone adaptive filters have played an increasingly important role in improving sound quality, noise reduction, and personalized audio experiences. Traditional headphone adaptive filter design methods mainly rely on fixed-structure digital filters, such as FIR (Finite Impulse Response) filters or IIR (Infinite Impulse Response) filters. While these methods perform well in specific scenarios, they often struggle to achieve rapid adaptation and optimal performance in complex and ever-changing audio environments.

[0003] Currently, the closest existing technology mainly employs adaptive filters based on the LMS (Least Mean Square Error) algorithm or its variants. These methods minimize output error by continuously adjusting the filter coefficients, exhibiting a certain degree of environmental adaptability. However, this approach suffers from several significant technical problems: First, the filter structure is pre-fixed, making it difficult to flexibly adjust according to different audio environments and requirements; second, traditional methods have slow adaptive speeds and perform poorly in rapidly changing audio environments; third, these methods often can only search for optimal solutions within a limited parameter space, making it difficult to handle complex nonlinear audio processing needs.

[0004] Furthermore, with the rise of deep learning technology, some researchers have attempted to apply neural networks to audio signal processing. However, these methods typically require large amounts of labeled data for training, and the design of the network architecture still heavily relies on expert experience, making it difficult to automate and scale their application to different audio processing scenarios. Summary of the Invention

[0005] To address these challenges, this invention proposes a headphone adaptive filter design method based on neural network architecture search. This method aims to solve the problems of poor adaptability of traditional fixed-structure filters and the reliance of deep learning methods on large amounts of data and human experience, achieving automatic optimization of filter structure and parameters.

[0006] This invention proposes a headphone adaptive filter design method based on neural network architecture search, comprising the following steps: defining a filter search space, narrowing the architecture search from a large space to a subspace containing only 5 operations; training a training agent to find the operation sequence required for the optimal result, further narrowing the search space; finding the optimal operation sequence through the training agent, and searching for the required filter on a custom dataset based on this operation sequence; validating the searched filter on a test set, and if the accuracy requirement is not met, adding the data from the test set to the training set and expanding the search space, repeating the search process; wherein, the objective function of the filter search process is defined as:

[0007]

[0008] F represents the filter to be optimized, N represents the number of data points in the samples, and M represents the number of frequency bands of the filter. i,j R represents the filter response value of the i-th sample in the j-th frequency band. i,j W represents the expected response value of the i-th sample in the j-th frequency band. i ,j represents the weight of the i-th sample in the j-th frequency band, N represents the interference signal, h represents the linear coefficient of signal x, and λ and μ are regularization parameters.

[0009] Preferably, the five operations include: a convolutional layer with a kernel_size of 3 and a stride of 1; batch normalization; ReLU activation function; SE block; and bilinear interpolation upsampling; these operations constitute the basic structural units of the filter, and different filter structures are formed by different combinations.

[0010] Preferably, the process of training the agent includes the following steps: First, determine the loss function and the operation sequence selection strategy, where the loss function is defined as loss = 1 - acc, and acc is the error between the output filter and the target filter of the search model; then train the search model; finally, find the optimal operation sequence; wherein, the operation sequence selection strategy adopts a binary encoding method, encoding the operations into a matrix A = [a1, a2, ..., a5], a i ∈{0,1},i=1,2,…,5,a i =1 indicates that the i-th operation is selected, a i =0 means that the i-th operation is not selected.

[0011] Preferably, the process of finding the optimal operation sequence employs an evolutionary algorithm, with the following specific steps: First, initialize the population; then calculate the fitness of each operation sequence; next, select the individual with the highest fitness to enter the next generation of the population; subsequently, perform a crossover operation C(A) on the selected individuals. i A j)=[a′1,a′2,…,a′5],

[0012] Where a′ i =a i If the random number r <p c (crossover rate), otherwise a′ i =a j ,i=1,2,…,5; then perform mutation operation M(A)=[a′1,a′2,…,a′5], where a′ i =1-a i If the random number r <p m (variance rate), otherwise a′ i =a i i = 1, 2, ..., 5; Finally, repeat the above process until the maximum number of iterations is reached or the fitness error is less than the set value.

[0013] Preferably, the process of searching for a filter on a custom dataset includes the following steps: First, the filter dataset is divided into a training set and a test set in a ratio of 7:3; then, the filter is initialized using the optimal operation sequence; next, the filter parameters are iteratively optimized on the training set, with the optimization objective being to minimize the objective function J(F); in each iteration, the filter output is calculated. Where (x) i ,y i The training samples are used; then the loss L = J(F) is calculated; finally, the filter parameters are updated using gradient descent. Where η is the learning rate; finally, the optimization process is repeated until the loss function converges or the maximum number of iterations is reached.

[0014] Preferably, the method for verifying filter accuracy includes the following steps: first, for each sample (x) in the test set... i ,y i Calculate the filter output Then calculate the average precision.

[0015]

[0016] Where N is the number of test samples, y i For the desired output, The output of the filter is then calculated. Finally, the calculated accuracy is compared with the preset threshold θ. If acc > θ, the filter is considered to have met the accuracy requirements; otherwise, the search space is expanded.

[0017] Preferably, the custom dataset is the MUSDBHUERTS dataset, and its data generation process includes the following steps: First, Gaussian noise is added to the original audio signal X to obtain N = X + σ*randn(size(X)), where N represents the noisy signal and σ represents the noise intensity; then, a reverberation kernel h is applied to N to obtain R = N*h, where R represents the reverberated signal and * represents the convolution operation; next, delay and white noise are added to obtain Y = R + d + w, where Y represents the final interference signal, d represents the delay, and w represents the white noise; finally, Y is passed through the target bandpass filter F. target Obtain the desired response R target =F target (Y).

[0018] Preferably, the headphone filter is a frequency-domain adaptive filter, and its workflow includes the following steps: First, the input signal x is subjected to a short-time Fourier transform (STFT) to obtain the frequency domain signal X(k); then, the current filter coefficients F(k) are applied to obtain Y(k) = F(k) * X(k); next, the frequency domain error signal E(k) = D(k) - Y(k) is calculated, where D(k) is the frequency domain representation of the desired response; then, the filter coefficients F(k+1) = F(k) + μ * X are updated. * (k)*E(k) / (||X(k)|| 2 +δ), where k represents the frequency index, μ represents the learning rate, δ is a small positive number used to avoid division by zero error, and ||·|| represents the Euclidean norm; finally, the inverse short-time Fourier transform (ISTFT) is performed on Y(k) to obtain the time-domain output signal y.

[0019] Preferably, the strategy for expanding the search space includes the following steps: First, calculate the current search space size N. old Then set the scaling factor α > 1 and the maximum search space size N. max Next, calculate the new search space size N. new =min(α*N) old N max If N new >N old Then, based on the original 5 operations, randomly add (N) new -N old Add a new operation; finally, update the operation sequence encoding to adapt it to the new search space size.

[0020] Preferably, the frequency domain response calculation process of the filter includes the following steps: First, perform a short-time Fourier transform on the input signal x to obtain X(f,t), where f represents frequency and t represents time; then perform a short-time Fourier transform on the filter coefficients F to obtain F(f); next, for each time frame t, calculate Y(f,t) = F(f) * X(f,t), where * represents frequency domain multiplication; finally, perform an inverse short-time Fourier transform on Y(f,t) to obtain the time domain output signal y(t).

[0021] The beneficial effects of this invention are mainly reflected in the following aspects:

[0022] The core of this invention lies in combining neural network architecture search technology with adaptive filtering. By defining a flexible search space and an efficient search algorithm, it automatically discovers the filter structure and parameters most suitable for the current audio environment. This method not only solves the problems of fixed structure and poor adaptability of traditional methods, but also overcomes the dependence of deep learning methods on large amounts of labeled data.

[0023] From an algorithmic perspective, this invention cleverly solves several seemingly contradictory technical problems. First, while maintaining high flexibility, it effectively controls computational complexity by limiting the search space to five basic operations. This balance allows the method to adapt to various audio environments and run efficiently on resource-constrained devices. Second, by introducing an evolutionary algorithm for structure search, this invention achieves a good balance between global optimization and local fine-tuning, enabling the exploration of diverse filter structures while quickly converging to the optimal solution.

[0024] More notably, this invention achieves complementary and synergistic effects in several aspects. For example, the combination of high efficiency in frequency domain processing and flexibility in structure search not only improves computational efficiency but also enhances the expressive power of the filter. Simultaneously, the combination of adaptive updating and structure optimization enables the filter to adapt to environmental changes at different time scales, exhibiting both rapid response capabilities and gradual optimization of long-term performance.

[0025] First, it significantly improves the adaptability and performance of filters, providing a superior audio experience in various complex audio environments. Second, this method automates filter design, greatly reducing reliance on manual intervention and specialized knowledge, thus lowering development costs and timelines. Furthermore, thanks to its efficient search strategy and frequency domain processing techniques, this method maintains low computational complexity while delivering excellent performance, making it suitable for implementation on various portable devices.

[0026] Furthermore, the method of this invention possesses excellent scalability and versatility. By adjusting the search space and objective function, it can easily adapt to different audio processing needs, such as noise reduction, sound quality enhancement, and sound localization. This flexibility makes the technology a potential universal framework in the field of audio signal processing, opening up vast possibilities for future innovation and applications.

[0027] In summary, this invention not only solves key problems in existing technologies but also achieves synergistic enhancement of multiple technical effects through innovative algorithm design. It provides a completely new approach to the design of headphone adaptive filters and is expected to have a profound impact on improving user audio experience and promoting the development of audio technology. Attached Figure Description

[0028] Figure 1 This is a block diagram of the overall method logic of the present invention.

[0029] Figure 2 This is a logic block diagram of the training agent model of the present invention.

[0030] Figure 3 This is a logic block diagram for finding the optimal operation sequence in this invention.

[0031] Figure 4 This is a block diagram of the logic for searching filters on a custom dataset according to the present invention.

[0032] Figure 5 This is a logic block diagram for verifying the accuracy of the filter in this invention.

[0033] Figure 6 This is a logical block diagram of the expanded search space of the present invention. Detailed Implementation

[0034] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the specific implementation methods, structures, features, and effects are described in detail below with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0036] Example 1

[0037] See Figure 1-6This invention relates to a headphone adaptive filter design method based on neural network architecture search. In the field of modern audio processing, headphone adaptive filters play a crucial role in improving sound quality, noise reduction, and personalized audio experiences. However, traditional filter design methods often rely on expert experience and are difficult to adapt to rapidly changing audio environments and personalized needs. Therefore, this invention proposes an innovative method that utilizes neural network architecture search technology to automatically design and optimize headphone adaptive filters.

[0038] The method of this invention comprises four main steps. The first step is to define the filter search space, narrowing the structure search from a large space to a subspace containing only five operations. The purpose of this step is to reduce search complexity and improve efficiency. The second step is to train a training agent to find the operation sequence required for the optimal result, further narrowing the search space. The third step is to find the optimal operation sequence through the training agent and search for the required filter on a custom dataset based on this operation sequence. The final step is to validate the searched filter on a test set. If the required accuracy is not met, the data from the test set is added to the training set, the search space is expanded, and the search process is repeated.

[0039] In this process, the objective function for filter search is defined as:

[0040]

[0041] F represents the filter to be optimized, N represents the number of data points in the samples, and M represents the number of frequency bands of the filter. i,j R represents the filter response value of the i-th sample in the j-th frequency band. i,j W represents the expected response value of the i-th sample in the j-th frequency band. i ,j represents the weight of the i-th sample in the j-th frequency band, N represents the interference signal, h represents the linear coefficient of signal x, and λ and μ are regularization parameters.

[0042] The design of this objective function takes into account the error between the filter response and the desired response, the anti-interference capability, and the system complexity, thereby achieving optimization in multiple aspects.

[0043] Next, we will explain the five operations in detail. These operations include convolutional layers (kernel size of 3, stride of 1), batch normalization, ReLU activation function, SE block, and bilinear interpolation upsampling. These operations constitute the basic structural units of the filter, and different combinations form different filter structures. For example, convolutional layers can extract local features, batch normalization can accelerate the training process, the ReLU activation function introduces non-linearity, SE block can adaptively adjust the importance of feature channels, and bilinear interpolation upsampling can increase the output resolution.

[0044] In one embodiment of the invention, these five operations can be combined into a basic filter module: first, feature extraction is performed using a 3x3 convolution; then, data normalization is performed using a batch normalization layer; next, nonlinearity is introduced using the ReLU activation function; then, channel attention is adjusted using an SE block; and finally, output resolution is increased through bilinear interpolation upsampling. This combination can effectively process audio signals, improving the filter's performance and adaptability.

[0045] In one embodiment of the present invention, the process of training the agent includes the following steps: determining a loss function and an operation sequence selection strategy, training a search model, and finding the optimal operation sequence. The loss function is defined as loss = 1 - acc, where acc represents the error between the output filter and the target filter of the search model. This loss function design allows us to directly optimize the accuracy of the filter.

[0046] The operation sequence selection strategy uses binary encoding, encoding the operations as a matrix A = [a1, a2, ..., a5], where A = [a1, a2, ..., a5], a i ∈{0,1},i=1,2,…,5,a i =1 indicates that the i-th operation is selected, a i =0 indicates that the i-th operation is not selected. This encoding method allows us to easily represent and manipulate different filter structures.

[0047] For example, if we have an operation sequence encoded as [1,1,1,0,1], this means we have selected convolutional layers, batch normalization, ReLU activation function, and bilinear interpolation upsampling, but not SE blocks. This flexible encoding allows us to explore various combinations of different filter structures.

[0048] Next, let's explain in detail the process of finding the optimal sequence of operations. This process employs the ideas of evolutionary algorithms, including steps such as initializing the population, calculating fitness, selection, crossover, and mutation.

[0049] First, we initialize a population of operation sequences. In one embodiment of the invention, we can set the population size to 100, where each individual is a 5-bit binary code representing a possible filter structure.

[0050] Next, we calculate the fitness of each operation sequence. The fitness function can be defined as 1 minus the loss function value, i.e., f(A) = 1 - loss(A). Thus, the higher the fitness of an individual, the better the corresponding filter performance.

[0051] Next, we select the individual with the highest fitness to enter the next generation of the population. In this invention, we can use a tournament selection strategy, randomly selecting 5 individuals each time, and then selecting the one with the highest fitness to enter the next generation.

[0052] Next, we perform a crossover operation on the selected individuals. The formula for the crossover operation is C(A... i A j )=[a′1,a′2,…,a′5], where a′ i =a i If the random number r <p c (crossover rate), otherwise a′ i =a j , i = 1, 2, ..., 5. In one embodiment of the invention, we can set the crossover rate pc to 0.8, which means there is an 80% probability of a crossover operation.

[0053] Finally, we perform the mutation operation. The formula for the mutation operation is M(A)=[a′1,a′2,…,a′5], where a′ i =1-a i If the random number r <p m (variance rate), otherwise a′ i =a i Let i = 1, 2, ..., 5. In this invention, we can set the mutation rate pm to 0.1, which means that each bit has a 10% probability of mutation.

[0054] This process is repeated until the maximum number of iterations (e.g., 1000) is reached or the fitness error is less than a set value (e.g., 0.001). In this way, we can gradually optimize the filter structure and find the filter that is best suited for the current audio environment.

[0055] Now, let's delve into the process of searching for filters on a custom dataset. This process begins by splitting the filter dataset into a training set and a test set in a 7:3 ratio. This partitioning ensures that we have enough data to train the filters while reserving some data for validation.

[0056] Next, we initialize the filter using the optimal sequence of operations. This optimal sequence of operations is found using the evolutionary algorithm described earlier. After initialization, we iteratively optimize the filter parameters on the training set, with the optimization objective being to minimize the objective function J(F).

[0057] In each iteration, we first calculate the filter output. Where (x) i ,y iLet F be the training samples. Then, calculate the loss L = J(F). Next, update the filter parameters using gradient descent: Where η is the learning rate. In one embodiment of the present invention, we can set the initial learning rate to 0.01 and use a learning rate decay strategy to halve the learning rate every 100 iterations.

[0058] This optimization process will repeat until the loss function converges or the maximum number of iterations is reached. In practice, we can set the maximum number of iterations to 10,000 and set a convergence threshold, for example, when the change in the loss function is less than 0.0001 after 10 consecutive iterations, we consider the optimization to have converged.

[0059] Next, let's describe in detail the method for verifying the filter's accuracy. This method first verifies the accuracy of each sample (x) in the test set. i ,y i Calculate the filter output Then, we calculate the average precision:

[0060]

[0061] Where N is the number of test samples, y i For the desired output, The filter output is calculated; finally, the calculated accuracy is compared with a preset threshold θ. If acc > θ, the filter is considered to have met the accuracy requirement; otherwise, the search space is expanded. This formula calculates the normalized mean square error between the filter output and the desired output, and then subtracts this error from 1 to obtain the accuracy.

[0062] Finally, we compare the calculated accuracy with a preset threshold θ. In one embodiment of the invention, we can set θ = 0.95, requiring the filter accuracy to be at least 95%. If acc > θ, we consider the filter to have met the accuracy requirement; otherwise, we need to perform a search space expansion operation.

[0063] Now, let's delve into the generation process of the MUSDBHUERTS dataset. This process simulates a real audio environment, including adding effects such as noise, reverb, and delay.

[0064] First, we add Gaussian noise to the original audio signal X, obtaining N = X + σ*randn(size(X)), where N represents the noisy signal, σ represents the noise intensity, and the randn() function generates random numbers from a standard normal distribution. In one embodiment of the invention, we can set σ = 0.1, which means that the added noise intensity is 10% of the original signal amplitude.

[0065] Then, we apply a reverberation kernel h to N, obtaining R = N*h, where * denotes a convolution operation. The reverberation kernel h can simulate different indoor acoustic environments; for example, we can use an exponentially decaying function to simulate a simple reverberation effect.

[0066] Next, we add a delay and white noise, resulting in Y = R + d + w. Here, d represents the delayed signal, and w represents the white noise. In practical applications, we can set the delay time to 20ms (corresponding to a sound wave propagation distance of approximately 7 meters), and the intensity of the white noise can be set to 1% of the original signal amplitude.

[0067] Finally, we pass Y through the target bandpass filter F target Obtain the desired response R target =F target (Y). This target bandpass filter can be designed based on different headphone characteristics and audio requirements. For example, for a typical headphone, we might want to preserve the frequency range of 20Hz to 20kHz, while having a slight boost in the range of 1kHz to 4kHz to improve the clarity of vocals.

[0068] Next, let's explain the workflow of the frequency domain adaptive filter in detail. This workflow fully utilizes the advantages of frequency domain processing to perform filtering operations efficiently.

[0069] First, we perform a short-time Fourier transform (STFT) on the input signal x to obtain the frequency domain signal X(k). In one embodiment of the invention, we can use a 512-point FFT with a frame length of 256 and a frame shift of 128, which achieves a good balance between time resolution and frequency resolution.

[0070] Then, we apply the current filter coefficients F(k) to obtain Y(k) = F(k) * X(k). The multiplication here is an element-wise complex multiplication, which realizes the filtering operation in the frequency domain.

[0071] Next, we calculate the frequency domain error signal E(k) = D(k) - Y(k), where D(k) is the frequency domain representation of the desired response. This error signal will be used to update the filter coefficients.

[0072] Then, we update the filter coefficients using the following formula:

[0073] F(k+1)=F(k)+μ*X * (k)*E(k) / (||X(k)|| 2 +δ)

[0074] Here, k represents the frequency index, μ is the learning rate, X*(k) represents the conjugate of X(k), δ is a small positive number used to avoid division by zero error, and ||·|| represents the Euclidean norm. In one embodiment of the invention, we can set μ = 0.1 and δ = 1e-6. This update formula is based on the Least Mean Square Error (LMS) algorithm, which can effectively and adaptively adjust the filter coefficients to minimize the error between the output and the desired response.

[0075] Finally, we perform an inverse short-time Fourier transform (ISTFT) on Y(k) to obtain the time-domain output signal y. This completes one full adaptive filtering process.

[0076] In practical applications, this process is repeated continuously, allowing the filter to constantly adapt to changing audio environments. For example, when a user moves from a quiet indoor environment to a noisy street, the filter automatically adjusts its parameters to maintain optimal audio quality.

[0077] Now, let's delve into strategies for expanding the search space. This strategy aims to increase the scope and diversity of the search when the initial search fails to find a filter that meets the requirements.

[0078] First, we calculate the size N of the current search space. old In the initial embodiment of the invention, this value is 5, corresponding to the 5 basic operations we initially defined.

[0079] Then, we set the scaling factor α and the maximum search space size N. max In one embodiment of the present invention, we can set α = 1.5, N max =10. This means that each time we expand the search space, we will try to increase the space size by 50%, but no more than 10 operations.

[0080] Next, we calculate the new search space size: N new =min(α*N) old N max For example, if the current search space size is 5, then the new search space size will be min(1.5*5,10) = 7.5, which is rounded down to 7.

[0081] If N new >N old We will randomly add ((N) operations to the original 5 operations. new -N old ( ) new operations. These new operations can be variations of existing operations, such as convolutional layers with different kernel sizes, or entirely new operations, such as the LeakyReLU activation function, residual connections, etc.

[0082] Finally, we update the encoding of the operation sequence to fit the new search space size. For example, if the new search space contains 7 operations, our operation sequence encoding will change from 5 bits to 7 bits.

[0083] This strategy of dynamically expanding the search space makes our method highly adaptable and scalable. It can gradually increase the complexity of the search while maintaining search efficiency to cope with more complex audio processing needs.

[0084] Finally, let's explain in detail the calculation process of the filter's frequency domain response. This process is central to the entire filter design and application, determining how the filter processes the input audio signal.

[0085] First, we perform a short-time Fourier transform on the input signal x to obtain X(f,t). Here, f represents the frequency and t represents the time. In one embodiment of the invention, we can use a 512-point FFT with a frame length of 256 and a frame shift of 128. Such parameter settings achieve a good balance between time resolution and frequency resolution, making them suitable for processing most audio signals.

[0086] Then, we perform a short-time Fourier transform on the filter coefficients F to obtain F(f). Here, F(f) represents the filter's response at different frequencies.

[0087] Next, for each time frame t, we calculate Y(f,t) = F(f) * X(f,t). The multiplication here is complex multiplication, implementing a filtering operation in the frequency domain. This frequency domain multiplication is more efficient than time domain convolution, especially for long filters.

[0088] Finally, we perform an inverse short-time Fourier transform on Y(f,t) to obtain the time-domain output signal y(t). This output signal is the audio signal processed by our designed adaptive filter.

[0089] In practical applications, this process is repeated continuously, processing a continuous audio stream. For example, when processing music, a filter might emphasize certain frequency ranges to enhance specific timbres; when processing speech, a filter might suppress background noise frequencies and highlight the range of human voice frequencies.

[0090] In summary, the headphone adaptive filter design method based on neural network structure search proposed in this invention has the following main advantages:

[0091] 1. Automated design: By searching neural network structures, we can automatically find the filter structure that is most suitable for the current audio environment, reducing the workload of manual design and the reliance on professional knowledge.

[0092] 2. Highly adaptive: The filter can adjust its parameters in real time according to the characteristics of the input signal to adapt to different audio environments and user needs.

[0093] 3. Superior performance: Thanks to the use of advanced neural network technology and evolutionary algorithms, our method can find a better filter structure than traditional methods, thus providing better audio processing results.

[0094] 4. High computational efficiency: Through frequency domain processing and a carefully designed search strategy, our method maintains high computational efficiency while ensuring performance, making it suitable for running on resource-constrained devices such as headphones.

[0095] 5. High scalability: Our method provides a flexible framework that allows for easy addition of new operations or expansion of the search space to meet more complex audio processing needs.

[0096] In summary, this invention provides a novel and promising method for designing adaptive filters for headphones, which is expected to have a significant impact on improving audio quality, noise reduction, and personalized audio processing, and promote the advancement of related technologies and the improvement of product performance.

[0097] Example 1: Adaptive Headphone Filter Based on Neural Network Architecture Search

[0098] In this embodiment, we employ the neural network architecture search-based method proposed in this invention to design an adaptive headphone filter. We used the MUSDBHUERTS dataset for training and testing, which contains various types of music and speech samples, as well as simulated environmental noise. We limited the search space to five basic operations: 3x3 convolution, batch normalization, ReLU activation function, SE block, and bilinear interpolation upsampling. We used an evolutionary algorithm to search for the optimal sequence of operations and employed a frequency-domain adaptive filter for signal processing.

[0099] Comparative Example 1: Traditional Fixed-Structure FIR Filter

[0100] In contrast, we implemented a traditional fixed-structure FIR (Finite Impulse Response) filter. This type of filter is widely used in practical applications, exhibiting linear phase characteristics and good stability. We used the Least Mean Square Error (LMS) algorithm to optimize the filter coefficients to adapt to different audio environments.

[0101] To comprehensively evaluate the performance of the two methods, we designed the following key metrics:

[0102] 1. Signal-to-noise ratio improvement (SNRI): Measures the effectiveness of a filter in suppressing noise.

[0103] 2. Frequency Response Flatness (FRF): Evaluates the uniformity of the filter across the entire frequency band.

[0104] 3. Computational complexity (CC): Measures the processing speed of the filter.

[0105] 4. Adaptive Speed ​​(AS): Evaluates how quickly the filter adapts to a new environment.

[0106] 5. Subjective Quality Score (SQS): This score assesses audio quality based on listener feedback.

[0107] The detection methods for these indicators are as follows:

[0108] 1. SNRI: Uses the standard signal-to-noise ratio calculation formula to compare the signal-to-noise ratio before and after filtering.

[0109] 2. FRF: Calculates the standard deviation of the filter's frequency response in the 20Hz-20kHz range.

[0110] 3.CC: Measures the time required to process 1 minute of audio.

[0111] 4. AS: The time required for a filter to reach a steady state after a sudden change in the environment.

[0112] 5. SQS: Invite 20 listeners to rate the processed audio, with a maximum score of 10.

[0113] Now, let's look at the test results for the two methods:

[0114] |Indicators|Example 1|Comparative Example 1|

[0115]

[0116]

[0117] From these results, we can draw the following conclusions:

[0118] First, in terms of signal-to-noise ratio improvement, our method significantly outperforms traditional methods, improving it by approximately 50%. This means our filters can more effectively suppress background noise, providing users with a clearer audio experience. This advantage is particularly noticeable in noisy environments, such as when using headphones in public places like streets or cafes.

[0119] Secondly, the frequency response flatness test results show that our method can provide a more balanced audio output. A lower standard deviation means that the various frequency components of the audio are processed more evenly across the entire frequency band, avoiding the problem of some frequencies being overemphasized or suppressed. This is especially important for music playback, enabling better reproduction of the original audio's timbre and details.

[0120] In terms of computational complexity, our method is slightly inferior to traditional methods. This is understandable, as our method involves a more complex neural network structure. However, processing one minute of audio in 0.8 seconds is still far faster than real-time requirements, so it does not affect practical use. Moreover, considering the significant performance improvement, this additional computational cost is entirely worthwhile.

[0121] Most impressively, our adaptive speed test results are remarkable. Our method adapts to new audio environments in just 0.3 seconds, compared to 1.2 seconds for traditional methods. This means that when a user rapidly transitions from one environment to another (e.g., from a quiet indoor space to a noisy street), our filters adjust almost instantaneously, providing a consistently high-quality audio experience.

[0122] Finally, subjective sound quality ratings also confirmed the superiority of our method. The average score of 8.7, a significant improvement over 7.2, indicates that listeners could clearly perceive a better sound quality. This result is particularly important because it directly reflects the user's actual experience.

[0123] In summary, our headphone adaptive filter based on neural network architecture search outperforms traditional methods on most key metrics. It offers better noise reduction, a more balanced frequency response, faster environmental adaptability, and a superior subjective listening experience. While it has a slight disadvantage in computational complexity, this is a worthwhile trade-off considering the overall performance improvement.

[0124] These results fully demonstrate the innovation and practicality of our method. By introducing neural network architecture search and evolutionary algorithms, we have successfully implemented an intelligent filtering system that can automatically adapt to different audio environments and provide a high-quality audio experience. This not only improves the user experience of headphones but also opens up new research directions in the field of audio signal processing.

[0125] It should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A headphone adaptive filter design method based on neural network architecture search, characterized in that, The process includes the following steps: defining a filter search space, narrowing the structure search from a large space to a subspace containing only 5 operations; training a training agent to find the operation sequence required for the optimal result, further narrowing the search space; finding the optimal operation sequence through the training agent, and searching for the required filter on a custom dataset based on this operation sequence; validating the searched filter on a test set, and if the accuracy requirement is not met, adding data from the test set to the training set and expanding the search space, repeating the search process; wherein, the objective function of the filter search process is defined as: F represents the filter to be optimized, N represents the number of data points in the samples, and M represents the number of frequency bands of the filter. i,j R represents the filter response value of the i-th sample in the j-th frequency band. i,j W represents the expected response value of the i-th sample in the j-th frequency band. i ,j represents the weight of the i-th sample in the j-th frequency band, N represents the interference signal, h represents the linear coefficient of signal x, and λ and μ are regularization parameters.

2. The headphone adaptive filter design method based on neural network structure search according to claim 1, characterized in that, The five operations include: a convolutional layer with a kernel size of 3 and a stride of 1; batch normalization; ReLU activation function; SE block; and bilinear interpolation upsampling. These operations constitute the basic structural units of the filter and can be combined in different ways to form different filter structures.

3. The headphone adaptive filter design method based on neural network structure search according to claim 1, characterized in that, The process of training an agent includes the following steps: First, determine the loss function and operation sequence selection strategy, where the loss function is defined as loss = 1 - acc, and acc is the error between the output filter and the target filter of the search model. Then, train the search model. Finally, find the optimal operation sequence. The operation sequence selection strategy uses binary encoding, encoding the operations into a matrix A = [a1, a2, ..., a5], a i ∈{0,1},i=1,2,…,5,a i =1 indicates that the i-th operation is selected, a i =0 means that the i-th operation is not selected.

4. The headphone adaptive filter design method based on neural network structure search according to claim 3, characterized in that, The process of finding the optimal operation sequence uses an evolutionary algorithm, with the following steps: First, initialize the population; then calculate the fitness of each operation sequence; next, select the individual with the highest fitness to enter the next generation of the population; finally, perform a crossover operation C(A) on the selected individuals. i A j )=[a′1,a′2,…,a′5], where a′ i =a i If the random number r <p c (crossover rate), otherwise a′ i =a j ,i=1,2,…,5; then perform mutation operation M(A)=[a′1,a′2,…,a′5], where a′ i =1-a i If the random number r <p m (variance rate), otherwise a′ i =a i i = 1, 2, ..., 5; Finally, repeat the above process until the maximum number of iterations is reached or the fitness error is less than the set value.

5. The headphone adaptive filter design method based on neural network structure search according to claim 1, characterized in that, The process of searching for filters on a custom dataset includes the following steps: First, the filter dataset is divided into a training set and a test set in a 7:3 ratio; then, the filters are initialized using the optimal operation sequence; next, the filter parameters are iteratively optimized on the training set, with the optimization objective being to minimize the objective function J(F); in each iteration, the filter output is calculated. Where (x) i ,y i The training samples are used; then the loss L = J(F) is calculated; finally, the filter parameters are updated using gradient descent. Where η is the learning rate; finally, the optimization process is repeated until the loss function converges or the maximum number of iterations is reached.

6. The headphone adaptive filter design method based on neural network structure search according to claim 1, characterized in that, The method for verifying filter accuracy includes the following steps: First, for each sample (x) in the test set... i ,y i Calculate the filter output Then calculate the average precision. Where N is the number of test samples, y i For the desired output, The output of the filter is then calculated. Finally, the calculated accuracy is compared with the preset threshold θ. If acc > θ, the filter is considered to have met the accuracy requirements; otherwise, the search space is expanded.

7. The headphone adaptive filter design method based on neural network structure search according to claim 1, characterized in that, The custom dataset is the MUSDBHUERTS dataset, and its data generation process includes the following steps: First, Gaussian noise is added to the original audio signal X to obtain N = X + σ*randn(size(X)), where N represents the noisy signal and σ represents the noise intensity; then, a reverberation kernel h is applied to N to obtain R = N*h, where R represents the reverberated signal and * represents the convolution operation; next, delay and white noise are added to obtain Y = R + d + w, where Y represents the final interference signal, d represents the delay, and w represents the white noise; finally, Y is passed through the target bandpass filter F. target Obtain the desired response R target =F target (Y).

8. The headphone adaptive filter design method based on neural network structure search according to claim 1, characterized in that, The headphone filter is a frequency-domain adaptive filter, and its workflow includes the following steps: First, the input signal x is subjected to a short-time Fourier transform (STFT) to obtain the frequency domain signal X(k); then, the current filter coefficients F(k) are applied to obtain Y(k) = F(k) * X(k); next, the frequency domain error signal E(k) = D(k) - Y(k) is calculated, where D(k) is the frequency domain representation of the desired response; then, the filter coefficients F(k+1) = F(k) + μ * X are updated. * (k)*E(k) / (||X(k)|| 2 +δ), where k represents the frequency index, μ represents the learning rate, δ is a small positive number used to avoid division by zero error, and ||·|| represents the Euclidean norm; finally, the inverse short-time Fourier transform (ISTFT) is performed on Y(k) to obtain the time-domain output signal y.

9. The headphone adaptive filter design method based on neural network structure search according to claim 1, characterized in that, The strategy for expanding the search space includes the following steps: First, calculate the current search space size N. old Then set the scaling factor α > 1 and the maximum search space size N. max Next, calculate the new search space size N. new =min(α*N) old N max If N new >N old Then, based on the original 5 operations, randomly add (N) new -N old Add a new operation; finally, update the operation sequence encoding to adapt it to the new search space size.

10. The headphone adaptive filter design method based on neural network structure search according to claim 1, characterized in that, The frequency domain response calculation process of the filter includes the following steps: First, perform a short-time Fourier transform on the input signal x to obtain X(f,t), where f represents frequency and t represents time; then perform a short-time Fourier transform on the filter coefficients F to obtain F(f); next, for each time frame t, calculate Y(f,t) = F(f) * X(f,t), where * represents frequency domain multiplication; finally, perform an inverse short-time Fourier transform on Y(f,t) to obtain the time domain output signal y(t).