Sound positioning and detection method based on attention hyper-complex convolution combination network

By using an attention-based super-complex convolutional combination network, the problem of low localization and detection accuracy in sound event localization and detection in existing technologies is solved, achieving high accuracy and low error in localization and detection.

CN117877514BActive Publication Date: 2026-11-27SHAANXI NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311840709.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2026-11-27
Estimated Expiration
2043-12-28

AI Technical Summary

Technical Problem

Existing models combining convolutional neural networks and recurrent neural networks suffer from low accuracy in sound event localization and detection because they ignore important sound feature information.

Method used

By employing an attention-based super-complex convolutional combination network, which combines super-complex convolutional blocks and dual-stream attention blocks, the network dynamically adapts to changes in the input signal, extracts multi-scale deep feature information, and efficiently learns temporal dimension information, thus solving the problem of low localization and detection accuracy in existing technologies.

Benefits of technology

It achieves high accuracy in sound localization and detection, strong network stability, low localization error, and can effectively identify the location and direction of arrival of various sound event categories.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117877514B_ABST
    Figure CN117877514B_ABST
Patent Text Reader

Abstract

A sound positioning and detection method based on an attention hypercomplex convolution combined network, which is composed of the following steps: data set preprocessing, feature extraction, constructing an attention hypercomplex convolution combined network, training the attention hypercomplex convolution combined network, and testing the attention hypercomplex convolution combined network. The attention hypercomplex convolution combined network shares parameters between input signal dimensions by adjusting parameters, dynamically adapts to input signal changes in the user-defined domain to perform hypercomplex convolution operations, extracts deeper multi-scale local features, reduces parameter redundancy, avoids local information loss caused by scale transformation, expands the deep extraction of global context information in the time dimension, and improves the learning of time dimension information and the extraction of local and global feature information. The application has the advantages of strong network stability, high recognition accuracy, low positioning error and the like, and can be used for sound event positioning and detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of signal processing and artificial intelligence technology, specifically relating to sound localization and detection methods. Background Technology

[0002] The primary purpose of sound event localization and detection is to identify the event category information corresponding to one or more sound sources contained within a received audio signal, and to estimate the corresponding location or direction of arrival. Sound event localization and detection can be divided into two independent tasks: sound event detection and sound source localization. Sound event localization and detection has significant research value and broad application prospects in fields such as smart homes, sound scene analysis, surveillance, wildlife detection, and abnormal sound event detection.

[0003] Early sound event localization and detection addressed these two problems separately, and early models couldn't handle overlapping sound events. With the rapid development of deep learning technology, more and more methods based on deep neural network models have improved sound event localization accuracy and reduced localization errors. However, currently widely used models combining convolutional neural networks and recurrent neural networks suffer from drawbacks such as ignoring important sound feature information and low localization and detection accuracy. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide a sound localization and detection method based on attention-based super-complex convolutional combined networks, which has strong network stability, high recognition accuracy, and low positioning error.

[0005] The technical solution adopted to solve the above technical problems consists of the following steps:

[0006] (1) Dataset preprocessing

[0007] Sound signals were extracted from the STARSS22 real-scene spatial recording dataset and synth-set dataset, which included 13 sound event categories: female speech / speaking, male speech / speaking, clapping, telephone ringing, laughter, indoor sounds, footsteps, door opening and closing sounds, music, musical instrument sounds, faucet sounds, bell ringing, and knocking sounds. The dataset was divided into training set, validation set, and test set in a ratio of 7:1:2.

[0008] (2) Feature extraction

[0009] The Fast Fourier Transform (FFT) method is used to extract log-Mel spectrum features and sound intensity vector features from the sound signals in the dataset.

[0010] (3) Construct an attention-based hypercomplex convolutional ensemble network

[0011] The attention-based supercomplex convolutional combination network consists of a supercomplex convolutional block, a two-stream attention block, and a fully connected layer 1 connected in series.

[0012] The aforementioned hypercomplex convolutional block is composed of a hypercomplex adaptive convolutional layer, a batch normalization layer 1, and a modified linear unit 1 connected in series.

[0013] The dual-stream attention block consists of a scale-transformation attention network, an extended self-attention network, and an attention fusion network. The output of the scale-transformation attention network and the extended self-attention network connected in parallel is connected to the input of the attention fusion network.

[0014] (4) Training an attention-based hypercomplex convolutional ensemble network

[0015] 1) Determine the objective function

[0016] The objective functions include the mean squared error loss function (MSE) and the permutation-invariant training loss function (L). PIT .

[0017] The mean squared error loss function (MSE) is determined by the following formula:

[0018]

[0019] Where l represents the number of samples, l is a finite positive integer, and y s Let y represent the actual value of the s-th sample. s ′ represents the predicted value of the s-th sample.

[0020] The permutation-invariant training loss function L is determined by the following formula. PIT :

[0021]

[0022] Where C represents the number of classes, H represents the number of frames, Z represents the number of tracks, C, H, and Z are finite positive integers, and γ represents a permutation of class c and frame h, γ∈Perm(ch). This represents the target of the active coupling of the arrangement γ in the Cartesian direction of arrival. This indicates the active-coupled Cartesian arrival direction at track m, category c, and frame h.

[0023] 2) Determine the evaluation function

[0024] The evaluation function includes the evaluation function F. 20° Evaluation function ER 20° Evaluation function LE CD Evaluation function LR CD ;

[0025] The evaluation function F is determined by the following formula. 20° :

[0026]

[0027] Where C represents the number of classes, C is a finite positive integer, and TP c FN represents a true positive with a spatial threshold of no more than 20° for class c. c FP represents a false negative of class c. c This indicates a false positive for class c.

[0028] The evaluation function ER is determined by the following formula. 20° :

[0029]

[0030] Where N represents the number of active sound event classes in the reference, T represents the number of sound event classes detected but mispredicted, and D and I represent the remaining number of false negatives and false positives.

[0031] The evaluation function LE is determined by the following formula. CD :

[0032]

[0033] Where C represents the number of classes, E represents the number of reference values, and C and E are finite positive integers, θ v TP represents the angular error between the v-th reference and the prediction. c This indicates a true positive of class c.

[0034] The evaluation function LR is determined by the following formula. CD :

[0035]

[0036] Among them TP c FN represents a true positive of class c. c This indicates a false negative for class c.

[0037] 3) Training an attention-focused hypercomplex convolutional ensemble network

[0038] The training set was input into the attention hypercomplex convolutional ensemble network for training. During training, the training parameters were as follows: the learning rate of the attention hypercomplex convolutional ensemble network was 0.001, the decay rate was 0.5, the Adam optimizer was used, the number of iterations was 1000, and the training was continued until the objective function converged.

[0039] The validation set is fed into the trained attention hypercomplex convolutional ensemble network, and the performance of the attention hypercomplex convolutional ensemble network is evaluated using an evaluation function.

[0040] (5) Testing Attention-Focused Hypercomplex Convolutional Combinator Network

[0041] The test set is input into the trained attention-based hypercomplex convolutional network for testing, and the attention-based hypercomplex convolutional network outputs the sound event localization and detection results.

[0042] In step (3) of this invention, the supercomplex convolutional combination network is constructed by sequentially connecting a supercomplex adaptive convolutional layer, a batch normalization layer 1, and a modified linear unit 1. The method for constructing the supercomplex convolutional block is as follows:

[0043] OP1(x1)=ReLU1(BN1(PIHC(x1)))

[0044] Where x1 represents the input data of the hypercomplex convolution block, PIHC represents the hypercomplex adaptive convolution layer, BN1 represents the batch normalization layer 1, ReLU1 represents the corrected linear unit 1, and OP1(x1) represents the output data of the hypercomplex convolution block.

[0045] The hypercomplex adaptive convolutional layer of this invention is composed of an average pooling layer 1, a convolutional layer 1, a modified linear unit 2, a convolutional layer 2, a softmax activation function layer, and a hypercomplex convolutional layer connected in series. The construction method of the hypercomplex adaptive convolutional layer is as follows:

[0046]

[0047]

[0048] M ij =Softmax(PC2(ReLU2(PC1(AP1(x2)))))

[0049] Where x2 represents the input data of the hypercomplex adaptive convolutional layer, n represents the hypercomplex adjustable coefficient, which is a user-defined parameter and is a finite positive integer, A t ∈R n×n Let represent the t-th algebraic regularity matrix, and R represent the set of real numbers, t∈[1,n], n∈[1,8]. W represents the Kronecker multiplication operation. i Let W represent the convolution kernel in the i-th batch, where i ∈ [1, n] and n ∈ [1, 8], and a represent the number of convolution kernels in each batch. ia ∈R k×k Let L represent the a-th convolutional kernel in the i-th batch of convolutional kernels, where k is a finite positive integer, k∈[3,11], b represents the offset term, b is a finite integer, b∈[-1,10], G represents the number of attention weight matrix M split into attention groups, G∈[5,15], and L j Let M represent the weight matrix of the j-th dynamic convolution kernel. ijM represents the attention weight matrix corresponding to the j-th batch of convolutional kernels. ij ∈R G×k , j∈[1,G], AP1 represents average pooling layer 1, PC1 represents convolutional layer 1 with a kernel size of 1×1 and a stride of 2, ReLU2 represents rectified linear unit 2 with the same structure as rectified linear unit 1, PC2 represents convolutional layer 2 with a kernel size of 1×1 and a stride of 1, and Softmax represents attention activation function.

[0050] The dual-stream attention block of the present invention is composed of a scale-transformed attention network, an extended self-attention network, and an attention fusion network. The output of the scale-transformed attention network and the extended self-attention network connected in parallel is connected to the input of the attention fusion network.

[0051] The attention fusion network of the present invention is composed of a convolutional layer 3, a fully connected layer 2, and a modified linear unit 3 connected in series. The convolutional kernel of the convolutional layer 3 has a size of 3×3 and a stride of 2. The structure of the fully connected layer 2 is the same as that of the fully connected layer 1, and the structure of the modified linear unit 3 is the same as that of the modified linear unit 1.

[0052] In step (3) of this invention, the scale transformation attention network is composed of a scale transformation attention block, a scale-tanh activation function, a bilinear interpolation layer, a modified linear unit 4, a fusion normalization network, and a depthwise separable convolutional layer connected in series. The output of the modified linear unit 4 is connected to the input of the depthwise separable convolutional layer. The fusion normalization network is composed of a convolutional layer 4, a batch normalization layer 2, and a sigmoid activation function layer 1 connected in series. The input of the scale transformation attention block is connected to the fusion normalization network. The method for constructing the scale transformation attention network is as follows:

[0053] OP2(x3)=DSC((Sigmoid1(BN2(PC4(σ(x3)))))⊙x3+σ(x3))

[0054]

[0055] Where x3 represents the input data of the scale-transform attention network, σ(x3) is the output result of the input data x3 after a composite operation σ, where σ is a composite operation including a scale-transform attention block, a scale-tanh activation function, a bilinear interpolation layer, and a modified linear unit 4, λ(x3) is the output result of the input data x3 after the routing function λ, SAttn represents the scale-transform attention block, α represents the adjustment coefficient of the scale-tanh activation function, and f tanh☐ represents the tanh activation function, BI represents the bilinear interpolation layer, ReLU4 represents the corrected linear unit 4, whose structure is the same as the corrected linear unit 1, ⊙ represents the Hadamard product operation, PC4 represents the convolutional layer 4, whose structure is the same as the convolutional layer 1, BN2 represents the batch normalization layer 2, whose structure is the same as the batch normalization layer 1, Sigmoid1 represents the attention activation function layer 1, DSC represents the depthwise separable convolutional layer with a kernel size of 3×3 and a stride of 1, and OP2(x3) represents the output data of the scale-transformed attention network.

[0056] The routing function λ is constructed by concatenating an average pooling layer 2, a convolutional layer 5, a batch normalization layer 3, and a modified linear unit 5. The method for constructing the routing function λ(x3) is as follows:

[0057] λ(x3)=ReLU5(BN3(PC5(AP2(x3))))

[0058] In this context, AP2 represents average pooling layer 2, which has the same structure as average pooling layer 1; PC5 represents convolutional layer 5, which has the same structure as convolutional layer 2; BN3 represents batch normalization layer 3, which has the same structure as batch normalization layer 1; and ReLU5 represents modified linear unit 5, which has the same structure as modified linear unit 1.

[0059] The scale transformation attention block of this invention is composed of a convolutional layer 6, a scale transformation multi-head attention layer, and a corrected linear unit 6 connected in series. The construction method of the scale transformation attention block is as follows:

[0060] SAttn=ReLU6(S-MHSA(PC6(x4)))

[0061] Where x4 represents the input data of the scale-transformed attention block, PC6 represents convolutional layer 6, which has the same structure as convolutional layer 2, S-MHSA represents the scale-transformed multi-head attention layer, and ReLU6 represents modified linear unit 6, which has the same structure as modified linear unit 1.

[0062] The method for constructing a scale-transformed multi-head attention layer is as follows:

[0063]

[0064] Where x5 represents the input data of the scale-transformed multi-head attention layer, DSC represents the depthwise separable convolutional layer, BN4 represents the batch normalization layer 4, whose structure is the same as that of the batch normalization layer 1, B represents the relative position offset for encoding the spatial relationships in the attention map, B∈[-5,20], and d represents the number of channels in each attention head, d∈[6,20].

[0065] In step (3), the extended self-attention network is composed of convolutional layer 7, extended sliding attention block, and modified linear unit 7 connected in series. The construction method of the extended self-attention network is as follows:

[0066] OP3(x6)=ReLU7(DRSAM(PC7(x6)))

[0067] Where x6 represents the input data of the extended self-attention network, PC7 represents convolutional layer 7, which has the same structure as convolutional layer 3, DRSAM represents the extended sliding attention block, ReLU7 represents the corrected linear unit 7, which has the same structure as corrected linear unit 1, and OP3(x6) represents the output data of the extended self-attention network.

[0068] The expanded sliding attention block of the present invention is composed of a global average pooling layer, a modified linear unit 8, an expanded sliding attention layer, and a sigmoid activation function layer 2 connected in series. The construction method of the expanded sliding attention block is as follows:

[0069] DRSAM=Sigmoid2(DRSA(ReLU8(GAP(x7))))

[0070]

[0071]

[0072] Where x7 represents the input data of the extended sliding attention block, GAP represents the global average pooling layer, ReLU8 represents the modified linear unit layer 8, whose structure is the same as that of the modified linear unit 1, DRSA represents the extended sliding attention layer, Sigmoid2 represents the attention activation function layer 2, whose structure is the same as that of the attention activation function layer 1, and Q, K, V represent the query, key, and value weight matrices obtained by linearly mapping the input data of the self-attention operation, where Q∈R S×df , K∈R S×df V∈R S×df R S×df Let represent a real matrix of size S×df, where S represents the maximum order of the weight matrix Q, S∈[5,11], df represents the dimension of the input features, df∈[4,8], u represents the number of rows in the weight matrix Q, u∈[1,S], p represents the length of the non-causal component of the sliding window, q represents the length of the causal component of the sliding window, v represents the window position parameter, v∈[0,p+q], (p+q)∈[4,10], r represents the expansion rate, r∈[2,10], e uv This represents the QK attention matrix from position u to v when the expansion rate of the expansion window is r. uv ∈R S×df V u+rvThis represents the (u+rv)th row of matrix V when the expansion rate of the expansion window is r. u Denotes the u-th row of the matrix, K u+rv This represents the u+rv-th row of matrix K when the expansion rate of the expansion window is r.

[0073] Because this invention employs a hybrid network of hypercomplex convolutional blocks and dual-stream attention blocks, the hypercomplex convolutional blocks share parameters across input signal dimensions by adjusting parameters, dynamically adapting to changes in the input signal within a user-defined domain to flexibly perform hypercomplex convolution operations. The scale-transformation attention network integrates local feature information with extracted multi-scale deep global features, avoiding the loss of local information caused by scale transformation. The extended self-attention network deeply extracts global context information in the time dimension. By constructing dual-stream attention blocks in parallel with the scale-transformation attention network, the extended self-attention network efficiently learns time dimension information and deeply extracts local and global feature information. The use of a combined attention hypercomplex convolutional network overcomes the shortcomings of existing technologies, such as ignoring important sound feature information and low localization and detection accuracy, resulting in high localization and detection accuracy. It has advantages such as strong network stability, high recognition accuracy, and low localization error, and can be used for sound localization and detection. Attached Figure Description

[0074] Figure 1 This is a flowchart of embodiment 1 of the present invention.

[0075] Figure 2 This is a schematic diagram of the structure of an attention-based hypercomplex convolutional network.

[0076] Figure 3 yes Figure 2 A schematic diagram of the structure of a complex convolutional block in the Chinese Super League.

[0077] Figure 4 yes Figure 3 A schematic diagram of the structure of a complex adaptive convolutional layer.

[0078] Figure 5 yes Figure 2 A schematic diagram of the structure of a dual-flow attention block.

[0079] Figure 6 yes Figure 5 A schematic diagram of the structure of a mesoscale transformation attention network.

[0080] Figure 7 This is a schematic diagram of the routing function λ.

[0081] Figure 8 yes Figure 6 A schematic diagram of the structure of a mesoscale transformation attention block.

[0082] Figure 9 yes Figure 5 A schematic diagram of the structure of an extended self-attention network.

[0083] Figure 10 yes Figure 9 A schematic diagram of the structure of the expanding sliding attention block. Detailed Implementation

[0084] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments, but the present invention is not limited to the following embodiments.

[0085] Example 1

[0086] The sound localization and detection method based on attention-based hypercomplex convolutional combination networks in this embodiment consists of the following steps (see...). Figure 1 ):

[0087] (1) Dataset preprocessing

[0088] Sound signals were extracted from the STARSS22 real-scene spatial recording dataset and synth-set dataset, which included 13 sound event categories: female speech / speaking, male speech / speaking, clapping, telephone ringing, laughter, indoor sounds, footsteps, door opening and closing sounds, music, musical instrument sounds, faucet sounds, bell ringing, and knocking sounds. The dataset was divided into training set, validation set, and test set in a ratio of 7:1:2.

[0089] (2) Feature extraction

[0090] The Fast Fourier Transform (FFT) method is used to extract log-Mel spectrum features and sound intensity vector features from the sound signals in the dataset.

[0091] (3) Construct an attention-based hypercomplex convolutional ensemble network

[0092] Figure 2 A schematic diagram of the attention-based hypercomplex convolutional combination network in this embodiment is provided. Figure 2 In this embodiment, the attention supercomplex convolutional combination network is composed of a supercomplex convolutional block, a two-stream attention block, and a fully connected layer 1 connected in series.

[0093] Figure 3 A schematic diagram of the hypercomplex convolution block in this embodiment is provided. Figure 3 In this embodiment, the hypercomplex convolutional block is composed of a hypercomplex adaptive convolutional layer, a batch normalization layer 1, and a modified linear unit 1 connected in series.

[0094] The method for constructing hypercomplex convolutional blocks is as follows:

[0095] OP1(x1)=ReLU1(BN1(PIHC(x1)))

[0096] Where x1 represents the input data of the hypercomplex convolution block, PIHC represents the hypercomplex adaptive convolution layer, BN1 represents the batch normalization layer 1, ReLU1 represents the corrected linear unit 1, and OP1(x1) represents the output data of the hypercomplex convolution block.

[0097] Figure 4 The hypercomplex adaptive convolutional layer in this embodiment is constructed by sequentially connecting an average pooling layer 1, a convolutional layer 1, a modified linear unit 2, a convolutional layer 2, a softmax activation function layer, and a hypercomplex convolutional layer. The construction method of the hypercomplex adaptive convolutional layer is as follows:

[0098]

[0099]

[0100] Mij=Softmax(PC2(ReLU2(PC1(AP1(x2)))))

[0101] Where x2 represents the input data of the hypercomplex adaptive convolutional layer, n represents the hypercomplex adjustable coefficient, which is a user-defined parameter and is a finite positive integer, A t ∈R n×n Let represent the t-th algebraic rule matrix, and R represent the set of real numbers, t∈[1,n], n∈[1,8]. In this embodiment, n is 4. W represents the Kronecker multiplication operation. i Let W represent the convolution kernel in the i-th batch, where i ∈ [1, n] and n ∈ [1, 8], and a represent the number of convolution kernels in each batch. ia ∈R k×k Let L represent the a-th convolutional kernel in the i-th batch of convolutional kernels, where k is a finite positive integer, k∈[3,11], and k is 7 in this embodiment. Let b represent the offset term, where b is a finite integer, b∈[-1,10], and b is 5 in this embodiment. Let G represent the number of attention weight matrix M split into attention groups, G∈[5,15], and G is 10 in this embodiment. j Let M represent the weight matrix of the j-th dynamic convolution kernel. ij M represents the attention weight matrix corresponding to the j-th batch of convolutional kernels. ij ∈R G×k , j∈[1,G], AP1 represents average pooling layer 1, PC1 represents convolutional layer 1 with a kernel size of 1×1 and a stride of 2, ReLU2 represents rectified linear unit 2 with the same structure as rectified linear unit 1, PC2 represents convolutional layer 2 with a kernel size of 1×1 and a stride of 1, and Softmax represents attention activation function.

[0102] Figure 5A schematic diagram of the dual-flow attention block in this embodiment is provided. Figure 5 In this embodiment, the dual-stream attention block consists of a scale-transformation attention network, an extended self-attention network, and an attention fusion network. The output of the scale-transformation attention network and the extended self-attention network connected in parallel is connected to the input of the attention fusion network.

[0103] The attention fusion network in this embodiment is composed of a convolutional layer 3, a fully connected layer 2, and a modified linear unit 3 connected in series. The convolutional kernel size of the convolutional layer 3 is 3×3 and the stride is 2. The structure of the fully connected layer 2 is the same as that of the fully connected layer 1, and the structure of the modified linear unit 3 is the same as that of the modified linear unit 1.

[0104] Figure 6 A schematic diagram of the scale-shifting attention network in this embodiment is provided. Figure 6 In this embodiment, the scale transformation attention network is constructed by sequentially connecting a scale transformation attention block, a scale-tanh activation function, a bilinear interpolation layer, a corrected linear unit 4, a fusion normalization network, and a depthwise separable convolutional layer. The output of the corrected linear unit 4 is connected to the input of the depthwise separable convolutional layer. The fusion normalization network is constructed by sequentially connecting convolutional layer 4, a batch normalization layer 2, and a sigmoid activation function layer 1. The input of the scale transformation attention block is connected to the fusion normalization network. The construction method of the scale transformation attention network is as follows:

[0105] OP2(x3)=DSC((Sigmoid1(BN2(PC4(σ(x3)))))⊙x3+σ(x3))

[0106]

[0107] Where x3 represents the input data of the scale-transform attention network, σ(x3) is the output result of the input data x3 after a composite operation σ, where σ is a composite operation including a scale-transform attention block, a scale-tanh activation function, a bilinear interpolation layer, and a modified linear unit 4, λ(x3) is the output result of the input data x3 after the routing function λ, SAttn represents the scale-transform attention block, α represents the adjustment coefficient of the scale-tanh activation function, and f tanh☐ represents the tanh activation function, BI represents the bilinear interpolation layer, ReLU4 represents the corrected linear unit 4, whose structure is the same as the corrected linear unit 1, ⊙ represents the Hadamard product operation, PC4 represents the convolutional layer 4, whose structure is the same as the convolutional layer 1, BN2 represents the batch normalization layer 2, whose structure is the same as the batch normalization layer 1, Sigmoid1 represents the attention activation function layer 1, DSC represents the depthwise separable convolutional layer with a kernel size of 3×3 and a stride of 1, and OP2(x3) represents the output data of the scale-transformed attention network.

[0108] Figure 7 In this embodiment, the routing function λ is constructed by concatenating an average pooling layer 2, a convolutional layer 5, a batch normalization layer 3, and a modified linear unit 5. The method for constructing the routing function λ(x3) is as follows:

[0109] λ(x3)=ReLU5(BN3(PC5(AP2(x3))))

[0110] In this context, AP2 represents average pooling layer 2, which has the same structure as average pooling layer 1; PC5 represents convolutional layer 5, which has the same structure as convolutional layer 2; BN3 represents batch normalization layer 3, which has the same structure as batch normalization layer 1; and ReLU5 represents modified linear unit 5, which has the same structure as modified linear unit 1.

[0111] Figure 8 A schematic diagram of the scale transformation attention block in this embodiment is provided. Figure 8 In this embodiment, the scale transformation attention block is composed of a convolutional layer 6, a scale transformation multi-head attention layer, and a corrected linear unit 6 connected in series. The construction method of the scale transformation attention block is as follows:

[0112] SAttn=ReLU6(S-MHSA(PC6(x4)))

[0113] Where x4 represents the input data of the scale-transformed attention block, PC6 represents convolutional layer 6, which has the same structure as convolutional layer 2, S-MHSA represents the scale-transformed multi-head attention layer, and ReLU6 represents rectified linear unit 6, which has the same structure as rectified linear unit 1.

[0114] The method for constructing a scale-transformed multi-head attention layer is as follows:

[0115]

[0116] Where x5 represents the input data of the scale-transformed multi-head attention layer, DSC represents the depthwise separable convolutional layer, BN4 represents the batch normalization layer 4, whose structure is the same as that of the batch normalization layer 1, B represents the relative position offset for encoding the spatial relationships in the attention map, B∈[-5,20], and in this embodiment, B is 8, and d represents the number of channels in each attention head, d∈[6,20], and in this embodiment, d is 12.

[0117] Figure 9 A schematic diagram of the extended self-attention network in this embodiment is provided. Figure 9 In this embodiment, the extended self-attention network is composed of a convolutional layer 7, an extended sliding attention block, and a corrected linear unit 7 connected in series. The construction method of the extended self-attention network is as follows:

[0118] OP3(x6)=ReLU7(DRSAM(PC7(x6)))

[0119] Where x6 represents the input data of the extended self-attention network, PC7 represents convolutional layer 7, which has the same structure as convolutional layer 3, DRSAM represents the extended sliding attention block, ReLU7 represents the corrected linear unit 7, which has the same structure as corrected linear unit 1, and OP3(x6) represents the output data of the extended self-attention network.

[0120] Figure 10 A schematic diagram of the expanded sliding attention block in this embodiment is provided. Figure 10 In this embodiment, the expanded sliding attention block is composed of a global average pooling layer, a modified linear unit 8, an expanded sliding attention layer, and a sigmoid activation function layer 2, connected in series. The construction method of the expanded sliding attention block is as follows:

[0121] DRSAM=Sigmoid2(DRSA(ReLU8(GAP(x7))))

[0122]

[0123]

[0124] Where x7 represents the input data of the extended sliding attention block, GAP represents the global average pooling layer, ReLU8 represents the modified linear unit layer 8, whose structure is the same as that of the modified linear unit 1, DRSA represents the extended sliding attention layer, Sigmoid2 represents the attention activation function layer 2, whose structure is the same as that of the attention activation function layer 1, and Q, K, V represent the query, key, and value weight matrices obtained by linearly mapping the input data of the self-attention operation, where Q∈R S×df , K∈R S×df , V∈R S×df RS×df Let S represent a real matrix of size S×df, where S represents the maximum order of the weight matrix Q, S∈[5,11], and S is 8 in this embodiment; df represents the input feature dimension, df∈[4,8], and df is 6 in this embodiment; u represents the number of rows in the weight matrix Q, u∈[1,S]; p represents the length of the non-causal component of the sliding window, q represents the length of the causal component of the sliding window; v represents the window position parameter, v∈[0,p+q], (p+q)∈[4,10], and (p+q) is 7 in this embodiment; r represents the dilation rate, r∈[2,10], and r is 6 in this embodiment; e uv This represents the QK attention matrix from position u to v when the expansion rate of the expansion window is r. uv ∈R S×df V u+rv This represents the (u+rv)th row of matrix V when the expansion rate of the expansion window is r. u Denotes the u-th row of the matrix, K u+rv This represents the u+rv-th row of matrix K when the expansion rate of the expansion window is r.

[0125] (4) Training an attention-based hypercomplex convolutional ensemble network

[0126] 1) Determine the objective function

[0127] The objective functions include the mean squared error loss function (MSE) and the permutation-invariant training loss function (L). PIT .

[0128] The mean squared error loss function (MSE) is determined by the following formula:

[0129]

[0130] Where l represents the number of samples, l is a finite positive integer, and y s Let y represent the actual value of the s-th sample. s ′ represents the predicted value of the s-th sample.

[0131] The permutation-invariant training loss function L is determined by the following formula. PIT :

[0132]

[0133] Where C represents the number of classes, H represents the number of frames, Z represents the number of tracks, C, H, and Z are finite positive integers, and γ represents a permutation of class c and frame h, γ∈Perm(ch). This represents the target of the active coupling of the arrangement γ in the Cartesian direction of arrival. This indicates the active-coupled Cartesian arrival direction at track m, category c, and frame h.

[0134] 2) Determine the evaluation function

[0135] The evaluation function includes the evaluation function F. 20° Evaluation function ER 20° Evaluation function LE CD Evaluation function LR CD ;

[0136] The evaluation function F is determined by the following formula. 20° .

[0137]

[0138] Where C represents the number of classes, C is a finite positive integer, and TP c FN represents a true positive with a spatial threshold of no more than 20° for class c. c FP represents a false negative of class c. c This indicates a false positive for class c.

[0139] The evaluation function ER is determined by the following formula. 20° :

[0140]

[0141] Where N represents the number of active sound event classes in the reference, T represents the number of sound event classes detected but mispredicted, and D and I represent the remaining number of false negatives and false positives.

[0142] The evaluation function LE is determined by the following formula. CD :

[0143]

[0144] Where C represents the number of classes, E represents the number of reference values, and C and E are finite positive integers, θ v TP represents the angular error between the v-th reference and the prediction. c This indicates a true positive of class c.

[0145] The evaluation function LR is determined by the following formula. CD .

[0146]

[0147] Among them TP c FN represents a true positive of class c. c This indicates a false negative for class c.

[0148] 3) Training an attention-focused hypercomplex convolutional ensemble network

[0149] The training set was input into the attention hypercomplex convolutional ensemble network for training. During training, the training parameters were as follows: the learning rate of the attention hypercomplex convolutional ensemble network was 0.001, the decay rate was 0.5, the Adam optimizer was used, the number of iterations was 1000, and the training was continued until the objective function converged.

[0150] The validation set is fed into the trained attention hypercomplex convolutional ensemble network, and the performance of the attention hypercomplex convolutional ensemble network is evaluated using an evaluation function.

[0151] (5) Testing Attention-Focused Hypercomplex Convolutional Combinator Network

[0152] The test set is input into the trained attention-based hypercomplex convolutional network for testing, and the attention-based hypercomplex convolutional network outputs the sound event localization and detection results.

[0153] A sound localization and detection method based on attention-based hypercomplex convolutional ensemble networks was developed.

[0154] Example 2

[0155] The sound localization and detection method based on attention-based super-complex convolutional combination networks in this embodiment consists of the following steps:

[0156] (1) Dataset preprocessing

[0157] The steps are the same as in Example 1.

[0158] (2) Feature extraction

[0159] The steps are the same as in Example 1.

[0160] (3) Construct an attention-based hypercomplex convolutional ensemble network

[0161] The attention-based supercomplex convolutional ensemble network in this embodiment consists of a supercomplex convolutional block, a two-stream attention block, and a fully connected layer 1 connected in series. The structure of the supercomplex convolutional block in this embodiment consists of a supercomplex adaptive convolutional layer, a batch normalization layer 1, and a modified linear unit 1 connected in series.

[0162] The method for constructing the hypercomplex convolutional block in this embodiment is the same as in Embodiment 1.

[0163] The hypercomplex adaptive convolutional layer in this embodiment is composed of an average pooling layer 1, a convolutional layer 1, a modified linear unit 2, a convolutional layer 2, a softmax activation function layer, and a hypercomplex convolutional layer, connected in series. The construction method of the hypercomplex adaptive convolutional layer is as follows:

[0164]

[0165]

[0166] M ij =Softmax(PC2(ReLU2(PC1(AP1(x2)))))

[0167] Where x2 represents the input data of the hypercomplex adaptive convolutional layer, n represents the hypercomplex adjustable coefficient, which is a user-defined parameter and is a finite positive integer, A t ∈R n×n Let represent the t-th algebraic rule matrix, where t∈[1,n] and n∈[1,8]. In this embodiment, n takes the value 1. W represents the Kronecker multiplication operation. i Let W represent the convolution kernel in the i-th batch, where i ∈ [1, n] and n ∈ [1, 8], and a represent the number of convolution kernels in each batch. ia ∈R k×k Let represent the a-th convolutional kernel in the i-th batch of convolutional kernels, where k is a finite positive integer, k∈[3,11], and in this embodiment k is 3. Let b represent the offset term, where b is a finite integer, b∈[-1,10], and in this embodiment b is -1. Let G represent the number of attention weight matrix M split into attention groups, G∈[5,15], and in this embodiment G is 5. L j Let M represent the weight matrix of the j-th dynamic convolution kernel. ij M represents the attention weight matrix corresponding to the j-th batch of convolutional kernels. ij ∈R G×k , j∈[1,G], AP1 represents average pooling layer 1, PC1 represents convolutional layer 1 with a kernel size of 1×1 and a stride of 2, ReLU2 represents rectified linear unit 2 with the same structure as rectified linear unit 1, PC2 represents convolutional layer 2 with a kernel size of 1×1 and a stride of 1, and Softmax represents attention activation function.

[0168] The structure of the dual-stream attention block and attention fusion network in this embodiment is the same as that in Embodiment 1.

[0169] The structure of the scale-transformation attention network in this embodiment is the same as that in Embodiment 1. The method for constructing the scale-transformation attention network is the same as that in Embodiment 1.

[0170] In this embodiment, the scale transformation attention block is composed of a convolutional layer 6, a scale transformation multi-head attention layer, and a corrected linear unit 6 connected in series. The construction method of the scale transformation attention block is as follows:

[0171] SAttn=ReLU6(S-MHSA(PC6(x4)))

[0172] Where x4 represents the input data of the scale-transformed attention block, PC6 represents convolutional layer 6, which has the same structure as convolutional layer 2, S-MHSA represents the scale-transformed multi-head attention layer, and ReLU6 represents modified linear unit 6, which has the same structure as modified linear unit 1.

[0173] The method for constructing a scale-transformed multi-head attention layer is as follows:

[0174]

[0175] Where x5 represents the input data of the scale-transformed multi-head attention layer, DSC represents the depthwise separable convolutional layer, BN4 represents the batch normalization layer 4, whose structure is the same as that of the batch normalization layer 1, B represents the relative position offset for encoding the spatial relationships in the attention map, B∈[-5,20], and in this embodiment, B is -5, and d represents the number of channels in each attention head, d∈[6,20], and in this embodiment, d is 6.

[0176] The extended self-attention network and its construction method in this embodiment are the same as in Embodiment 1.

[0177] The structure of the expanded sliding attention block in this embodiment is the same as that in Embodiment 1.

[0178] The method for constructing the expanded sliding attention block in this embodiment is as follows:

[0179] DRSAM=Sigmoid2(DRSA(ReLU8(GAP(x7))))

[0180]

[0181]

[0182] Where x7 represents the input data of the extended sliding attention block, GAP represents the global average pooling layer, ReLU8 represents the modified linear unit layer 8, whose structure is the same as that of the modified linear unit 1, DRSA represents the extended sliding attention layer, Sigmoid2 represents the attention activation function layer 2, whose structure is the same as that of the attention activation function layer 1, and Q, K, V represent the query, key, and value weight matrices obtained by linearly mapping the input data of the self-attention operation, where Q∈R S×df , K∈R S×df V∈R S×df R S×dfLet S represent a real matrix of size S×df, where S represents the maximum order of the weight matrix Q, S∈[5,11], and S is 5 in this embodiment. df represents the input feature dimension, df∈[4,8], and df is 4 in this embodiment. u represents the number of rows in the weight matrix Q, u∈[1,S], p represents the length of the non-causal component of the sliding window, q represents the length of the causal component of the sliding window, v represents the window position parameter, v∈[0,p+q], (p+q)∈[4,10], and (p+q) is 4 in this embodiment. r represents the dilation rate, r∈[2,10], and r is 2 in this embodiment. uv This represents the QK attention matrix from position u to v when the expansion rate of the expansion window is r. uv ∈R S×df V u+rv This represents the (u+rv)th row of matrix V when the expansion rate of the expansion window is r. u Denotes the u-th row of the matrix, K u+rv This represents the u+rv-th row of matrix K when the expansion rate of the expansion window is r.

[0183] The other steps are the same as in Example 1. This completes the sound localization and detection method based on attention-based hypercomplex convolutional ensemble networks.

[0184] Example 3

[0185] The sound localization and detection method based on attention-based super-complex convolutional combination networks in this embodiment consists of the following steps:

[0186] (1) Dataset preprocessing

[0187] The steps are the same as in Example 1.

[0188] (2) Feature extraction

[0189] The steps are the same as in Example 1.

[0190] (3) Construct an attention-based hypercomplex convolutional ensemble network

[0191] The attention-based supercomplex convolutional ensemble network in this embodiment consists of a supercomplex convolutional block, a two-stream attention block, and a fully connected layer 1 connected in series. The structure of the supercomplex convolutional block in this embodiment consists of a supercomplex adaptive convolutional layer, a batch normalization layer 1, and a modified linear unit 1 connected in series.

[0192] The method for constructing the hypercomplex convolutional block in this embodiment is the same as in Embodiment 1.

[0193] The hypercomplex adaptive convolutional layer in this embodiment is composed of an average pooling layer 1, a convolutional layer 1, a modified linear unit 2, a convolutional layer 2, a softmax activation function layer, and a hypercomplex convolutional layer, connected in series. The construction method of the hypercomplex adaptive convolutional layer is as follows:

[0194]

[0195]

[0196] M ij =Softmax(PC2(ReLU2(PC1(AP1(x2)))))

[0197] Where x2 represents the input data of the hypercomplex adaptive convolutional layer, n represents the hypercomplex adjustable coefficient, which is a user-defined parameter and is a finite positive integer, A t ∈R n×n Let represent the t-th algebraic rule matrix, where t∈[1,n] and n∈[1,8]. In this embodiment, n is 8. W represents the Kronecker multiplication operation. i Let W represent the convolution kernel in the i-th batch, where i ∈ [1, n] and n ∈ [1, 8], and a represent the number of convolution kernels in each batch. ia ∈R k×k Let L represent the a-th convolutional kernel in the i-th batch of convolutional kernels, where k is a finite positive integer, k∈[3,11], and k is 11 in this embodiment. Let b represent the offset term, where b is a finite integer, b∈[-1,10], and b is 10 in this embodiment. Let G represent the number of attention weight matrix M split into attention groups, G∈[5,15], and G is 15 in this embodiment. j Let M represent the weight matrix of the j-th dynamic convolution kernel. ij M represents the attention weight matrix corresponding to the j-th batch of convolutional kernels. ij ∈R G×k , j∈[1,G], AP1 represents average pooling layer 1, PC1 represents convolutional layer 1 with a kernel size of 1×1 and a stride of 2, ReLU2 represents rectified linear unit 2 with the same structure as rectified linear unit 1, PC2 represents convolutional layer 2 with a kernel size of 1×1 and a stride of 1, and Softmax represents attention activation function.

[0198] The structure of the dual-stream attention block and attention fusion network in this embodiment is the same as that in Embodiment 1.

[0199] The structure of the scale-transformation attention network in this embodiment is the same as that in Embodiment 1. The method for constructing the scale-transformation attention network is the same as that in Embodiment 1.

[0200] In this embodiment, the scale transformation attention block is composed of a convolutional layer 6, a scale transformation multi-head attention layer, and a corrected linear unit 6 connected in series. The construction method of the scale transformation attention block is as follows:

[0201] SAttn=ReLU6(S-MHSA(PC6(x4)))

[0202] Where x4 represents the input data of the scale-transformed attention block, PC6 represents convolutional layer 6, which has the same structure as convolutional layer 2, S-MHSA represents the scale-transformed multi-head attention layer, and ReLU6 represents modified linear unit 6, which has the same structure as modified linear unit 1.

[0203] The method for constructing a scale-transformed multi-head attention layer is as follows:

[0204]

[0205] Where x5 represents the input data of the scale-transformed multi-head attention layer, DSC represents the depthwise separable convolutional layer, BN4 represents the batch normalization layer 4, whose structure is the same as that of the batch normalization layer 1, B represents the relative position offset for encoding the spatial relationships in the attention map, B∈[-5,20], and in this embodiment, B is 20, and d represents the number of channels in each attention head, d∈[6,20], and in this embodiment, d is 20.

[0206] The extended self-attention network and its construction method in this embodiment are the same as in Embodiment 1.

[0207] The structure of the expanded sliding attention block in this embodiment is the same as that in Embodiment 1.

[0208] The method for constructing the expanded sliding attention block in this embodiment is as follows:

[0209] DRSAM=Sigmoid2(DRSA(ReLU8(GAP(x7))))

[0210]

[0211]

[0212] Where x7 represents the input data of the extended sliding attention block, GAP represents the global average pooling layer, ReLU8 represents the modified linear unit layer 8, whose structure is the same as that of the modified linear unit 1, DRSA represents the extended sliding attention layer, Sigmoid2 represents the attention activation function layer 2, whose structure is the same as that of the attention activation function layer 1, and Q, K, V represent the query, key, and value weight matrices obtained by linearly mapping the input data of the self-attention operation, where Q∈R S×df , K∈R S×dfV∈R S×df R S×df Let S represent a real matrix of size S×df, where S represents the maximum order of the weight matrix Q, S∈[5,11], and S is 11 in this embodiment. df represents the input feature dimension, df∈[4,8], and df is 8 in this embodiment. u represents the number of rows in the weight matrix Q, u∈[1,S], p represents the length of the non-causal component of the sliding window, q represents the length of the causal component of the sliding window, v represents the window position parameter, v∈[0,p+q], p+q∈[4,10], and (p+q) is 10 in this embodiment. r represents the dilation rate, r∈[2,10], and r is 10 in this embodiment. uv This represents the QK attention matrix from position u to v when the expansion rate of the expansion window is r. uv ∈R S ×df V u+rv This represents the (u+rv)th row of matrix V when the expansion rate of the expansion window is r. u Denotes the u-th row of the matrix, K u+rv This represents the u+rv-th row of matrix K when the expansion rate of the expansion window is r.

[0213] The other steps are the same as in Example 1. This completes the sound localization and detection method based on attention-based hypercomplex convolutional ensemble networks.

Claims

1. A sound localization and detection method based on attention-based hypercomplex convolutional ensemble networks, characterized by: The following steps are involved: (1) Dataset preprocessing Sound signals were extracted from the STARSS22 real-scene spatial recording dataset and synth-set dataset, which included 13 sound event categories: female speech / talking, male speech / talking, clapping, telephone ringing, laughter, indoor sounds, footsteps, door opening and closing sounds, music, musical instrument sounds, faucet sounds, bell ringing, and knocking sounds. The dataset was divided into training set, validation set, and test set in a ratio of 7:1:

2. (2) Feature extraction The Fast Fourier Transform method is used to extract log-Mel spectrum features and sound intensity vector features from the sound signals in the dataset; (3) Construct an attention-based hypercomplex convolutional ensemble network The attention-based supercomplex convolutional ensemble network consists of a supercomplex convolutional block, a two-stream attention block, and a fully connected layer 1 connected in series. The aforementioned hypercomplex convolutional block is composed of a hypercomplex adaptive convolutional layer, a batch normalization layer 1, and a modified linear unit 1 connected in series. The supercomplex adaptive convolutional layer is composed of an average pooling layer 1, a convolutional layer 1, a modified linear unit 2, a convolutional layer 2, a softmax activation function layer, and a supercomplex convolutional layer connected in series. The dual-stream attention block consists of a scale-transformation attention network, an extended self-attention network, and an attention fusion network. The output of the scale-transformation attention network and the extended self-attention network connected in parallel is connected to the input of the attention fusion network. (4) Training attention-based hypercomplex convolutional ensemble networks 1) Determine the objective function The objective function includes the mean squared error loss function. Permutation-invariant training loss function ; Determine the mean square error loss function using the following formula : in, Indicates the number of samples. For finite positive integers, Indicates the first The actual value of each sample Indicates the first Predicted values ​​for each sample; The permutation-invariant training loss function is determined by the following formula. : in, Indicates the number of classes. Indicates the number of frames. Indicates the number of orbits. , , It is a finite positive integer, γ represents the class and frame An arrangement on top, , Represents arrangement The activity coupling Cartesian reaches the target in the direction of the direction. Indicates in orbit ,category and frame The activity at the location is coupled with the Cartesian arrival direction; 2) Determine the evaluation function Evaluation functions include evaluation functions Evaluation function Evaluation function Evaluation function ; Determine the evaluation function according to the following formula : in, Indicates the number of classes. It is a finite positive integer. Representation Class The spatial threshold does not exceed True positive, Representation Class False negatives, Representation Class False positives; Determine the evaluation function according to the following formula : in, This represents the number of active sound event classes in the reference, where T represents the number of sound event classes detected but mispredicted. and This represents the number of remaining false negatives and false positives; the evaluation function is determined by the following formula. : in, Indicates the number of classes. Indicates the number of reference values. , It is a finite positive integer. Indicates the first The angular error between the reference and the prediction Representation Class True positive; Determine the evaluation function according to the following formula : in Representation Class True positive, Representation Class False negatives; 3) Training an attention-focused hypercomplex convolutional ensemble network The training set was input into the attention hypercomplex convolutional ensemble network for training. During training, the training parameters were as follows: the learning rate of the attention hypercomplex convolutional ensemble network was 0.001, the decay rate was 0.5, the Adam optimizer was used, the number of iterations was 1000, and the training was continued until the objective function converged. The validation set is input into the trained attention hypercomplex convolutional ensemble network, and the performance of the attention hypercomplex convolutional ensemble network is evaluated using the evaluation function. (5) Testing Attention-Focused Hypercomplex Convolutional Combinator Network The test set is input into the trained attention-based hypercomplex convolutional network for testing, and the attention-based hypercomplex convolutional network outputs the sound event localization and detection results.

2. The sound localization and detection method based on attention-based super-complex convolutional combination networks according to claim 1, characterized in that... In step (3), the construction method of the supercomplex convolutional blocks in the attention-based supercomplex convolutional combination network is as follows: in, This represents the input data for the hypercomplex convolutional block. This indicates a hypercomplex adaptive convolutional layer. Indicates batch normalization layer 1, Indicates the modified linear unit 1, This represents the output data of the hypercomplex convolution block.

3. The sound localization and detection method based on attention-based super-complex convolutional ensemble networks according to claim 2, characterized in that... The method for constructing the hypercomplex adaptive convolutional layer is as follows: in, This represents the input data of the hypercomplex adaptive convolutional layer. A represents the hypercomplex adjustable coefficient, which is a user-defined parameter and is a finite positive integer. t ∈R n×n Indicates the first There are x^n algebraic regular matrices, where R represents the set of real numbers. , , This represents the Kronecker multiplication operation. Indicates the first Batch convolution kernel, , , W represents the number of convolutional kernels in each batch. ia ∈R k×k Indicates the first In the batch convolution kernel, the first One convolutional kernel, It is a finite positive integer. , This represents the offset term, where b is a finite integer. , This indicates that the attention weight matrix is... The number of attention groups to break it down. , Indicates the first A dynamic convolution kernel weight matrix, Indicates the first The first batch of convolution kernels corresponding to the M attention weight matrices ij ∈R G×k , , Indicates average pooling layer 1, This indicates convolutional layer 1 with a kernel size of [value missing]. The step size is 2. This represents modified linear unit 2, whose structure is the same as that of modified linear unit 1. This indicates convolutional layer 2, with a kernel size of [value missing]. The step size is 1. This represents the attention activation function.

4. The sound localization and detection method based on attention-based hypercomplex convolutional combination networks according to claim 1, characterized in that: In step (3), the dual-stream attention block is composed of a scale-transformed attention network, an extended self-attention network, and an attention fusion network. The output of the scale-transformed attention network and the extended self-attention network connected in parallel is connected to the input of the attention fusion network. The attention fusion network consists of a convolutional layer 3, a fully connected layer 2, and a modified linear unit 3 connected in series. The convolutional kernel of the convolutional layer 3 has a size of 3×3 and a stride of 2. The structure of the fully connected layer 2 is the same as that of the fully connected layer 1, and the structure of the modified linear unit 3 is the same as that of the modified linear unit 1.

5. The sound event localization and detection method based on attention-based hypercomplex convolutional ensemble networks according to claim 1, characterized in that: In step (3), the scale transformation attention network is composed of a scale transformation attention block, a scale-tanh activation function, a bilinear interpolation layer, a modified linear unit 4, a fusion normalization network, and a depthwise separable convolutional layer connected in series. The output of the modified linear unit 4 is connected to the input of the depthwise separable convolutional layer. The fusion normalization network is composed of a convolutional layer 4, a batch normalization layer 2, and a sigmoid activation function layer 1 connected in series. The input of the scale transformation attention block is connected to the fusion normalization network. The construction method of the scale transformation attention network is as follows: OP2(x3) = DSC (( Sigmoid1 ( BN2( PC4 ( σ(x3)))))⊙x3+ σ(x3)) in, This represents the input data for a scale-shifting attention network. Input data After a compound operation The calculated output results It is a composite operation, including a scale-transformation attention block, a scale-tanh activation function, a bilinear interpolation layer, and a modified linear unit 4. Input data via routing function The calculated output results This represents a scale transformation attention block. This represents the adjustment coefficient of the Scale-tanh activation function. This represents the tanh activation function. Indicates a bilinear interpolation layer. This represents modified linear unit 4, which has the same structure as modified linear unit 1. ⊙ represents the Hadamard product operation. This represents convolutional layer 4, whose structure is the same as that of convolutional layer 1. This represents batch normalization layer 2, whose structure is the same as that of batch normalization layer 1. This represents attention activation function layer 1. This indicates a depthwise separable convolutional layer with a kernel size of 3×3 and a stride of 1. This represents the output data of the scale-transformed attention network; The routing function The routing function is composed of an average pooling layer 2, a convolutional layer 5, a batch normalization layer 3, and a modified linear unit 5 connected in series. The construction method is as follows: in, This represents average pooling layer 2, which has the same structure as average pooling layer 1. This represents convolutional layer 5, whose structure is the same as convolutional layer 2. This indicates batch normalization layer 3, whose structure is the same as batch normalization layer 1. This represents the modified linear unit 5, which has the same structure as the modified linear unit 1.

6. The sound localization and detection method based on attention-based hypercomplex convolutional ensemble networks according to claim 5, characterized in that: The scale transformation attention block is composed of a convolutional layer 6, a scale transformation multi-head attention layer, and a corrected linear unit 6 connected in series. The construction method of the scale transformation attention block is as follows: in, The input data represents the scaling attention block. This represents convolutional layer 6, whose structure is the same as convolutional layer 2. This indicates a multi-head attention layer with scale transformation. This represents modified linear unit 6, whose structure is the same as that of modified linear unit 1; The method for constructing a scale-transformed multi-head attention layer is as follows: in, This represents the input data for the scale-transformed multi-head attention layer. This indicates a depthwise separable convolutional layer. This indicates batch normalization layer 4, whose structure is the same as that of batch normalization layer 1. This represents the relative position offset used to encode spatial relationships in the attention map. , This represents the number of channels in each attention head. .

7. The sound localization and detection method based on attention-based hypercomplex convolutional ensemble networks according to claim 1, characterized in that: In step (3), the extended self-attention network is composed of convolutional layer 7, extended sliding attention block, and modified linear unit 7 connected in series. The construction method of the extended self-attention network is as follows: in, This represents the input data for the expanded self-attention network. This represents convolutional layer 7, whose structure is the same as that of convolutional layer 3. Indicates expanding the sliding attention block. This represents the modified linear unit 7, whose structure is the same as that of the modified linear unit 1. This represents the output data of the extended self-attention network.

8. The sound localization and detection method based on attention-based hypercomplex convolutional ensemble networks according to claim 7, characterized in that: The expanded sliding attention block is composed of a global average pooling layer, a modified linear unit 8, an expanded sliding attention layer, and a sigmoid activation function layer 2, connected in series. The construction method of the expanded sliding attention block is as follows: in, This represents the input data for expanding the sliding attention block. This indicates a global average pooling layer. This represents layer 8 of the modified linear unit, whose structure is the same as that of the modified linear unit 1. This indicates an expanded sliding attention layer. This represents attention activation function layer 2, whose structure is the same as that of attention activation function layer 1. This represents the weight matrix of the query, key, and value obtained by linearly mapping the input data of the self-attention operation, where Q∈R. S×df , K∈R S×df V∈R S×df R S×df Describes a real matrix of size S×df. Represents the weight matrix The maximum order, , Indicates the input feature dimension. , Represents the weight matrix the number of rows, , Indicates the length of the non-causal component of the sliding window. Indicates the length of the causal component of the sliding window. Indicates the window position parameter. , , Indicates the expansion rate. , This indicates the expansion rate within the expansion window. At that time, from the position arrive of Attention matrix, e uv ∈R S×df , This indicates the expansion rate within the expansion window. At that time, matrix The OK, Represents the matrix of the first OK, This indicates the expansion rate within the expansion window. At that time, matrix The OK.

Citation Information

Patent Citations

  • Hypercomplex magnetic resonance spectrum reconstruction method based on deep learning

    CN110598579A

  • Audio data processing method and device, mobile equipment and audio system

    CN115714947A