Music database retrieval system based on feature extraction
By employing a collaborative design that combines adversarial feature enhancement, multi-level temporal fusion, and cross-version comparative learning, the robustness and accuracy issues of music retrieval systems under audio quality degradation and version differences are addressed, achieving efficient and accurate music retrieval.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- QUJING NORMAL UNIV
- Filing Date
- 2026-03-05
- Publication Date
- 2026-06-12
AI Technical Summary
Existing music retrieval systems based on deep features suffer from problems such as audio quality degradation, limitations in temporal modeling, and insufficient version generalization ability, resulting in high false positive and false negative rates and making it difficult to achieve high-precision and robust retrieval in real-world environments.
An adversarial feature enhancement module is used to eliminate audio quality variations through adversarial training, a multi-level temporal fusion module extracts multi-granular temporal features, and the feature space distribution is optimized through cross-version comparative learning. Combined with a dynamic hard example mining strategy, the system performance is improved.
It significantly improves the system's robustness to sound quality degradation and version differences, reduces false positives and false negatives, improves retrieval accuracy and reliability in real-world environments, and achieves a balance between efficient computation and strong generalization capabilities.
Smart Images

Figure CN122196226A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of music information retrieval technology, and more specifically, to a music database retrieval system based on feature extraction. Background Technology
[0002] Music database retrieval technology, as an important branch of audio information processing, aims to quickly and accurately find the corresponding complete musical works from massive databases by inputting audio fragments (such as humming or recording clips). Traditional methods mainly rely on content-based audio feature matching, the core process of which includes feature extraction, feature index construction, and similarity calculation. Early technologies often used audio fingerprinting methods, extracting robust fingerprint hash values by performing time-frequency transformations (such as short-time Fourier transforms) on audio signals to achieve fast matching. With the development of deep learning, deep feature extraction methods based on convolutional neural networks (CNNs) and recurrent neural networks (RNNs) have gradually become mainstream. They can automatically learn more discriminative high-level features from the original audio or its spectrogram, significantly improving the accuracy of retrieval.
[0003] However, existing deep feature-based music retrieval systems still face several key challenges in practical deployment, limiting their further performance improvement and application scope. First, there is insufficient robustness to audio quality: the query audio received by retrieval systems in real-world scenarios often suffers from complex quality degradation, such as variations in sound quality caused by lossy compression (MP3 with different bitrates), network transmission losses, environmental background noise, or differences in recording equipment. Existing feature extraction networks are typically trained on high-quality audio datasets, making them sensitive to such sound quality variations. This significantly reduces the discriminative power of extracted features, leading to increased false positives and false negatives. Second, there are limitations in temporal modeling: music is a signal with strong temporal structure, and existing methods are insufficient in fusing long-term contextual information with local details (such as beats and melodic fragments). Simple pooling or single-scale temporal convolutions struggle to simultaneously capture both the macroscopic structure and microscopic changes of a song, resulting in poor adaptability to fragment retrieval or audio with varying speeds. Finally, the version generalization ability is weak: the same musical work often has multiple versions (such as the original version, live version, instrumental version, cover version, etc.), and different versions may differ in arrangement, orchestration, rhythm, and even tonality. Existing methods usually struggle to effectively cluster different versions of the same song in the feature space, tending to classify them as different songs, which greatly limits the practicality of the retrieval system in real-world music databases.
[0004] To address the aforementioned issues, while some studies have attempted to improve performance through data augmentation, multi-task learning, or more complex network structures, these approaches often lack systematic solutions or sacrifice other aspects of performance while improving one. For example, simply adding adversarial noise during training may weaken the discriminative power of features; complex temporal models may incur excessive computational overhead, making it difficult to meet the real-time requirements of large-scale retrieval. Therefore, there is an urgent need for an innovative and systematic music retrieval scheme that can synergistically enhance the robustness of features against sound quality degradation, their ability to represent complex temporal structures, and their generalization ability to different music versions, thereby achieving high-precision and robust music retrieval in real-world and complex application environments. Summary of the Invention
[0005] To overcome the above-mentioned deficiencies of the prior art, embodiments of the present invention provide a music database retrieval system based on feature extraction.
[0006] To achieve the above objectives, the present invention provides the following technical solution: A music database retrieval system based on feature extraction includes the following modules: The adversarial feature enhancement module is used to preprocess the input audio and extract initial features. Through an adversarial training mechanism that includes a main classifier and an adversarial classifier and a gradient reversal operation, it eliminates the variation information related to sound quality from the initial features and outputs a feature vector that is robust to changes in sound quality. A multi-level temporal fusion module is used to receive the robust feature vector, extract multi-granularity temporal features through multiple parallel convolutional branches with different time scales and temporal receptive fields, and generate a fixed-dimensional global audio feature vector after weighted fusion by an attention mechanism and modeling by a recurrent neural network. The cross-version comparison learning module is used to train the model based on triplet data consisting of anchor samples, positive samples, and negative samples, using a comparison loss function and a dynamic hard example mining strategy, and optimize the feature space distribution so that the global audio feature vector has high discriminativeness and high aggregation for different versions of the same song.
[0007] Specifically, the adversarial training mechanism is as follows: The main classifier is trained based on song identity labels, and the adversarial classifier is trained based on preset sound quality level labels. The adversarial classifier is connected via a gradient inversion layer. During backpropagation, the gradient flowing to the feature extraction network is inverted and scaled, forcing the feature extraction network to generate features that can deceive the adversarial classifier, thereby filtering out audio quality information.
[0008] Specifically, the scaling factor used in the gradient reversal operation adopts a dynamic scheduling strategy based on the training progress; Set smaller coefficient values in the early stages of training so that the model learns the song identity first; As training progresses, the scaling factor value is gradually increased to enhance the learning of sound quality invariance; the dynamic scheduling is implemented through a predetermined scheduling function.
[0009] Specifically, in the multi-level time-series fusion module: Multiple parallel convolutional branches, including three branches specifically designed for short, medium, and long time scales; Each branch employs a hierarchical dilated convolutional structure consisting of multiple convolutional layers, with the dilation rate of different layers increasing exponentially to expand the temporal receptive field of the branch.
[0010] Specifically, in the hierarchical dilated convolution structure: The outputs of each convolutional layer are fused through residual connections and batch normalization. The attention mechanism is a gated attention unit, which generates gated weights on the input feature sequence and multiplies them element by element with the original features to achieve dynamic weighted fusion.
[0011] Specifically, the dynamic hard example mining strategy includes: Maintain a dynamic memory that stores the features and labels of historical samples; For each anchor sample in training, select several negative samples with the highest feature similarity or the highest classification confusion with the anchor sample from the dynamic memory and use them as difficult negative samples. Weights are assigned to the selected difficult negative samples and used to calculate additional contrast loss terms.
[0012] Specifically, the weight of the difficult negative sample is determined based on its similarity to the anchor sample or the predicted confusion probability, and is normalized before loss calculation. The total loss during model training is obtained by weighted summation of the standard contrastive loss term and the weighted additional contrastive loss term.
[0013] The technical effects and advantages of this invention are as follows: This invention systematically solves the core challenges of music retrieval in complex real-world scenarios through a collaborative design that combines adversarial feature enhancement, multi-level temporal fusion, and cross-version comparative learning. The overall retrieval performance is significantly improved: the system exhibits strong robustness to query audio with degraded sound quality, background noise, or version differences. While maintaining high retrieval accuracy, it significantly reduces false positives and false negatives caused by variations in audio quality or version changes, effectively enhancing its practicality and reliability in real-world environments.
[0014] The modules of this invention offer clear and measurable technical advantages. The modular technology gains are evident: the adversarial feature enhancement module, through gradient inversion and dynamic scheduling training, significantly reduces the sensitivity of features to interference such as bitrate compression and noise; the multi-level temporal fusion module, through hierarchical dilated convolution and attention mechanisms, improves the retrieval recall rate of audio segments; and the cross-version comparative learning module, through a dynamic hard example mining strategy, significantly improves the feature similarity between different versions of the same song, greatly enhancing the system's inclusiveness towards musical diversity. These improvements collectively ensure an excellent balance between high-precision retrieval, efficient computation, and strong generalization capabilities. Attached Figure Description
[0015] Figure 1 This is a system block diagram of the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] like Figure 1 As shown, the modules of the music database retrieval system based on feature extraction are as follows: The adversarial feature enhancement module converts the audio into a log-Melogram sequence and extracts initial features using a CNN-BiLSTM network. Adversarial training is performed through a submodule containing a main classifier and an adversarial classifier: the main classifier learns to identify the song's identity, while the adversarial classifier attempts to determine the sound quality level. A gradient inversion layer connecting the two dynamically adjusts its coefficients during training, forcing the feature network to deceive the adversarial classifier, ultimately outputting a robust feature vector that retains the song's identity information but filters out sound quality variations. Execution steps: The input audio is converted into a log-Mel spectrogram by a preprocessor and then framed along the time axis to form a sequence input.
[0018] The feature extraction network (CNN-BiLSTM) extracts an initial feature vector from the spectrum of each frame.
[0019] The adversarial training submodule contains two parallel classifiers: the main classifier learns to identify song identities based on labeled data; the adversarial classifier attempts to determine the audio quality level of the input audio (such as high definition, compressed, or noisy).
[0020] By connecting an adversarial classifier through a gradient inversion layer, the feature extraction network learns to deceive the adversarial classifier during backpropagation, thereby eliminating sound quality-related information in the features.
[0021] The gradient reversal layer is implemented as follows: During forward propagation, this layer does not perform any transformation on the input data and outputs it directly; during backward propagation, this layer multiplies the received upstream gradient by a negative scaling factor λ (λ>0) and then passes it to the downstream network layer. This factor λ is used to balance the training intensity of the main classification task and the adversarial task.
[0022] To improve the stability and convergence efficiency of model training, the scaling factor λ adopts a dynamic scheduling strategy based on training progress, rather than a fixed value; the specific process is as follows: In the initial training phase, set a small initial value for λ (e.g., ...). =0.01), enabling the model to prioritize learning song identity features and establish a stable foundation for the main classification task; As training progresses, the λ value is gradually increased according to a predetermined strategy to enhance the learning of sound quality invariance characteristics; In the later stages of training, the λ value tends to stabilize, allowing the model to achieve an optimal balance between identity recognition and audio quality invariance; the dynamic scheduling process is implemented through the following formula: Let the current training round be The total number of training rounds is Then the first The coefficient of wheel use The calculation is as follows: ;
[0023] in, and They are respectively The minimum and maximum values (e.g., 0.01 and 0.1). For scheduling functions, These are shape control parameters; Scheduling function Use one of the following two forms: Cosine scheduling strategy: ;
[0024] Exponential scheduling strategy: ;
[0025] in The normalized training progress, i.e. Its value ranges from 0 to 1; when When = 1, the cosine tuning simplifies to the standard cosine function; when When >1, The growth curve is slow at the beginning and steep at the end; when When λ < 1, the λ growth curve is steep at the beginning and then slows down. (In exponential scheduling) Control the growth rate to 3-5.
[0026] Audio quality levels are labeled using the following methods: The original high-definition audio undergoes a series of known audio quality degradation processes, including but not limited to lossy compression at different bitrates (e.g., MP3, bitrates of 128kbps and 64kbps), the addition of simulated environmental noise (signal-to-noise ratio ranging from 10dB to 20dB), and bandwidth limiting. Each processing method corresponds to a preset audio quality level label, thus forming labeled data for training the adversarial classifier.
[0027] The final output is a feature vector trained adversarially, which retains the song's identity information but filters out interference from audio quality variations.
[0028] The multi-level temporal fusion module receives the feature sequence and extracts multi-granularity temporal features through three parallel convolutional branches with different dilation rates (short, medium, and long time scales). The features from each branch are weighted and fused by a gated attention unit and then input into a bidirectional LSTM to capture long-term dependencies. The output of the LSTM is dynamically pooled (maximum and average values are concatenated) to generate a fixed-dimensional global audio feature vector, comprehensively representing the temporal structure of the audio. Execution steps: The feature sequence output from the adversarial feature enhancement module is input into three parallel temporal convolutional layers, with kernel sizes set to short (0.5 seconds), medium (2 seconds), and long (5 seconds) to extract features at different temporal granularities. To enhance the ability of each temporal convolutional layer to capture multi-scale contextual information, a hierarchical dilated convolutional structure is adopted within each parallel temporal convolutional layer. The specific implementation process is as follows: For each convolutional branch at each time scale (short, medium, long), a sequence containing L dilated convolutional layers is constructed within it, where the th... Layer expansion rate Exponential growth, i.e. , The base for expansion is 2. .
[0029] Each dilated convolutional layer uses the same kernel size Ks, but has a different receptive field; Receptive field of layer dilated convolution The calculation is as follows: ;
[0030] This is the index of the previous layer within the branch. For the first The expansion rate of the layer, For the summation index, accumulate from level 1 to level 2. layer; Input feature sequence The output of each of the L dilated convolutional layers undergoes nonlinear activation and batch normalization.
[0031] The outputs of each layer are fused through residual connections to obtain the final feature representation of this branch: ;
[0032] in, Let X be the output feature sequence of this convolutional branch after passing through L layers of dilated convolutions and residual connections, T be the number of time steps (frames) of the feature sequence, C be the number of channels (feature dimension) of the feature sequence at each time step, and L be the total number of dilated convolutional layers within this branch. For batch normalization operations, Indicates the expansion rate Convolution operation, It is a non-linear activation function (such as ReLU). and For the first Learnable parameters of the layer.
[0033] For branches at different time scales, different expansion bases b and number of layers L are used: Short timescale branch (0.5 seconds): b=2, L=3, receptive field extends to approximately 4 seconds; Medium timescale branch (2 seconds): b=3, L=3, receptive field expands to approximately 26 seconds; Long-scale branch (5 seconds): b=4, L=3, receptive field extends to approximately 85 seconds.
[0034] Each scale feature is passed through a gated attention unit to calculate the importance weight at each time step, and then weighted and fused with the original features.
[0035] The calculation process of the gated attention unit is as follows: For the input feature sequence First, gated weights are generated using a fully connected layer and a sigmoid activation function. ,in and For learnable parameters, This is the Sigmoid function. The final weighted feature output is... ,in The output feature sequence after gated weighting. This indicates element-wise multiplication. This mechanism allows the model to dynamically focus on important information at different time steps.
[0036] The specific operation of dynamic pooling is as follows: for the entire temporal features output by the bidirectional LSTM, calculate the global maximum and global average along the time dimension to obtain two feature vectors. Then, concatenate these two vectors to form the final fixed-dimensional global audio feature vector.
[0037] The fused multi-scale features are input into a bidirectional LSTM through residual connections and layer normalization to capture long-term dependencies.
[0038] The LSTM output is dynamically pooled along the time axis (by concatenating max pooling and average pooling) to generate a fixed-dimensional global audio feature vector.
[0039] The cross-version comparison learning module organizes training data in the form of triplets (anchor, positive sample, negative sample). It utilizes a contrastive loss function to drive features (anchor and positive sample) from different versions of the same song closer together in the feature space, while features (anchor and negative sample) from different songs move further apart. A dynamic hard example mining strategy is introduced, selecting high-similarity or high-confusion hard negative samples from a continuously updated memory to participate in the calculation, thereby learning more discriminative features. This allows for accurate matching during retrieval by simply calculating the cosine similarity between feature vectors. Execution steps: Construct training triples from a music database: anchor samples (original audio), positive samples (different versions or audio quality-processed versions of the same song), and negative samples (audio of different songs).
[0040] The triples are input into the aforementioned module to extract features, and the cosine similarity loss between the anchor point and the positive sample is calculated. At the same time, a hard example mining strategy is added to select negative samples with high similarity to the anchor point to participate in the loss calculation.
[0041] A temperature-scaled contrastive loss function is used to optimize the feature space distribution, making the cross-version feature clustering of the same song more compact.
[0042] During the retrieval phase, matching is performed directly using the cosine similarity of the feature vectors, without the need for additional version alignment processing.
[0043] Model training and data preparation specifically include the following processes: Data Construction: Training samples are constructed based on publicly available music datasets (such as a subset of the MillionSongDataset) and accompanying information on different versions (such as original and live versions). For anchor samples of each song, positive samples are generated by using different publicly available versions of the same song; applying random sound effects to the anchor audio, including dynamic range compression, adding impulse noise, and simulating reverberation effects in different rooms. Negative samples are randomly selected from audio of different songs.
[0044] Model parameters: The feature extraction network uses a 4-layer one-dimensional convolutional neural network (CNN) followed by a bidirectional LSTM. The number of kernels in each CNN layer is [64, 128, 256, 512], the kernel size is 3, and the stride is 2. The BiLSTM has 256 hidden units. The final output dimension D of the feature vector is 512.
[0045] Training configuration: The Adam optimizer is used with an initial learning rate of 0.001, and cosine annealing is used for learning rate scheduling. The batch size is set to 32. The gradient reversal coefficient λ for adversarial training is set to 0.1. The contrastive loss function is the normalized temperature-scaled cross-entropy loss (NT-XentLoss), whose formula is: ;
[0046] in, This is the normalized temperature-scaled cross-entropy loss, i.e., the contrast loss value. , , These are the feature vectors of the anchor point, positive sample, and negative sample, respectively. The cosine similarity function is used. The temperature parameter is set to 0.07. The number of negative samples used to calculate the loss (usually the batch size minus 1). The summation index for negative samples.
[0047] Difficult example mining strategy: In each training batch, for each anchor point, in addition to using random negative samples within the batch, the top M negative samples (M=10) with the highest cosine similarity to the anchor point features are selected from the feature cache queue to participate in the contrastive loss calculation, so as to improve the discriminativeness of the feature space.
[0048] To make the hard example mining process more adaptable to training dynamics and cover a more comprehensive hard example space, a dynamic hard example mining mechanism based on memory and online similarity calculation is introduced, as follows: Maintaining the dynamic memory: Initializing an updatable memory. This is used to store the feature vectors and their song tags for all recent training samples, where U is the memory capacity and D is the feature dimension. The memory is updated in a first-in, first-out queue manner.
[0049] Online hard sample screening: For an anchor feature in the current batch It not only calculates its similarity to negative samples within the batch, but also its similarity to the memory. Cosine similarity of features of all different song samples.
[0050] Dual difficulty criterion: defining two types of difficult negative samples: High-similarity hard negative samples: Selecting samples from memory with similarity The K negative samples with the highest cosine similarity (K=5) are denoted as the set. .
[0051] High-confusion difficult negative samples: Calculate the features of all negative samples in the memory. Predicted probability of belonging to anchor point songs (Using a lightweight classifier or softmax similarity estimation), select the K negative samples with the highest probabilities, denoted as set. Predicted probability The estimate is: ;
[0052] in Features of the nth negative sample in the memory bank The predicted probability of being misclassified as an anchor point song. Let be the cosine similarity between the anchor feature and the feature of the nth negative sample. For example, the sharpening factor (e.g.) =0.5), This is the set of positive sample indexes for the anchor song in the memory bank. For index set The Middle The feature vector of a positive sample.
[0053] Dynamic weight allocation: for each selected hard negative sample Assign a weight This weight is related to the difficulty of finding the anchor point: for The samples in ; for The samples in .
[0054] The final weights are then normalized: ;in, It is the union of two types of difficult negative samples, (type) corresponds to (sim) or (conf).
[0055] Integration into the loss function: In the contrastive loss calculation, weights are applied to the loss term for these dynamically mined hard negative samples. And introduce an additional hard negative sample loss term. : ;
[0056] in: For the difficult negative sample loss term, A set of difficult negative samples; The final total loss is the weighted sum of the original contrast loss and this loss: ,in The total loss during model training. The difficulty loss weight is set to 0.5.
[0057] The above formulas are all dimensionless calculations. Dimensionless calculations can be performed using various methods such as standardization, which will not be elaborated here. The formulas are derived from software simulations based on a large amount of collected data, and the preset parameters in the formulas can be set by those skilled in the art according to the actual situation.
[0058] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, ATA hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium can be a solid-state ATA hard disk.
[0059] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0060] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0061] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0062] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0063] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0064] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable ATA hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0065] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A music database retrieval system based on feature extraction, characterized in that, Includes the following modules: The adversarial feature enhancement module is used to preprocess the input audio and extract initial features. Through an adversarial training mechanism that includes a main classifier and an adversarial classifier and a gradient reversal operation, it eliminates the variation information related to sound quality from the initial features and outputs a feature vector that is robust to changes in sound quality. A multi-level temporal fusion module is used to receive the robust feature vector, extract multi-granularity temporal features through multiple parallel convolutional branches with different time scales and temporal receptive fields, and generate a fixed-dimensional global audio feature vector after weighted fusion by an attention mechanism and modeling by a recurrent neural network. The cross-version comparison learning module is used to train the model based on triplet data consisting of anchor samples, positive samples, and negative samples, using a comparison loss function and a dynamic hard example mining strategy, and optimize the feature space distribution so that the global audio feature vector has high discriminativeness and high aggregation for different versions of the same song.
2. The music database retrieval system based on feature extraction according to claim 1, characterized in that, The adversarial training mechanism is specifically as follows: The main classifier is trained based on song identity labels, and the adversarial classifier is trained based on preset sound quality level labels. The adversarial classifier is connected via a gradient inversion layer. During backpropagation, the gradient flowing to the feature extraction network is inverted and scaled, forcing the feature extraction network to generate features that can deceive the adversarial classifier, thereby filtering out audio quality information.
3. The music database retrieval system based on feature extraction according to claim 2, characterized in that, The scaling factor used in the gradient reversal operation employs a dynamic scheduling strategy based on training progress. Set smaller coefficient values in the early stages of training so that the model learns the song identity first; As training progresses, the scaling factor value is gradually increased to reinforce the learning of sound quality invariance; The dynamic scheduling is implemented through a predefined scheduling function.
4. The music database retrieval system based on feature extraction according to claim 1, characterized in that, In the multi-level time-series fusion module: Multiple parallel convolutional branches, including three branches specifically designed for short, medium, and long time scales; Each branch employs a hierarchical dilated convolutional structure consisting of multiple convolutional layers, with the dilation rate of different layers increasing exponentially to expand the temporal receptive field of the branch.
5. The music database retrieval system based on feature extraction according to claim 4, characterized in that, In the hierarchical dilated convolutional structure: The outputs of each convolutional layer are fused through residual connections and batch normalization. The attention mechanism is a gated attention unit, which generates gated weights on the input feature sequence and multiplies them element by element with the original features to achieve dynamic weighted fusion.
6. The music database retrieval system based on feature extraction according to claim 1, characterized in that, The dynamic difficult example mining strategy includes: Maintain a dynamic memory that stores the features and labels of historical samples; For each anchor sample in training, select several negative samples with the highest feature similarity or the highest classification confusion with the anchor sample from the dynamic memory and use them as difficult negative samples. Weights are assigned to the selected difficult negative samples and used to calculate additional contrast loss terms.
7. The music database retrieval system based on feature extraction according to claim 6, characterized in that, The weights of the difficult negative samples are determined based on their similarity to the anchor samples or the predicted confusion probability, and are normalized before loss calculation. The total loss during model training is obtained by weighted summation of the standard contrastive loss term and the weighted additional contrastive loss term.