Pooling方法总结(语音识别)

本文介绍了几种在语音识别中常用的特征池化方法,如统计池化、注意力机制驱动的池化(如自注意力和多头注意力)、NetVLAD、LDE和ABP等,强调了不同方法如何捕捉帧级别特征的重要性。短时谱池化及其改进版也被提及,以提高对时序信息的利用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Pooling layer将变长的frame-level features转换为一个定长的向量。

1. Statistics Pooling

链接:http://danielpovey.com/files/2017_interspeech_embeddings.pdf

The default pooling method for x-vector is statistics pooling.

The statistics pooling layer calculates the mean vector µ as well as the second-order statistics as the standard deviation vector σ over frame-level features ht (t = 1, · · · , T ).

2. Attentive Statistics Pooling

链接:https://arxiv.org/pdf/1803.10963.pdf

在一段话中,往往某些帧的帧级特征比其他帧的特征更为独特重要,因此使用attention赋予每帧feature不同的权值。

其中f(.)代表非线性变换,如tanh or ReLU function。

最后将每帧特征加劝求和

3. Self-Attentive pooling

链接:https://danielpovey.com/files/2018_interspeech_xvector_attention.pdf

4. Self Multi-Head Attention pooling

论文:Multi-Resolution Multi-Head Attention in Deep Speaker Embedding | IEEE Conference Publication | IEEE Xplore

5. NetVLAD

论文:

https://arxiv.org/pdf/1902.10107.pdf

https://arxiv.org/pdf/1511.07247.pdf

更详细的解释参考:从VLAD到NetVLAD,再到NeXtVlad - 知乎

6. Learnable Dictionary Encoding (LDE)

论文:https://arxiv.org/pdf/1804.05160.pdf

we introduce two groups of learnable parameters. One is the dictionary component center, noted as µ = {µ1, µ2 · · · µc}. The other one is assigned weights, noted as w.

where the smoothing factor  s_cfor each dictionary center u_cis learnable.

7. Attentive Bilinear Pooling (ABP) - Interspeech 2020

论文:https://www.isca-speech.org/archive/Interspeech_2020/pdfs/1922.pdf

Let H \in \mathbb{R}^{L\times D} be the frame-level feature map captured by the hidden layer below the self-attention layer, where L and D are the number of frames and feature dimension respectively. Then the attention map A \in \mathbb{R}^{K\times L} can be obtained by feeding H into a 1×1 convolutional layer followed by softmax non-linear activation, where K is the number of attention heads. The 1st-order and 2nd-order attentive statistics of H, denoted by µ and \sigma ^{2} , can be computed similar as crosslayer bilinear pooling, which is

where T1(x) is the operation of reshaping x into a vector, and T2(x) includes a signed square-root step and a L2- normalization step.  The output of ABP is the concatenation of µ and \sigma ^{2}

8. Short-time Spectral Pooling (STSP) - ICASSP 2021

​​​​​​​​​​​​​​​​​​​​​​​​​​​​https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=9414094&tag=1icon-default.png?t=N7T8https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=9414094&tag=1From a Fourier perspective, statistics pooling only exploits the DC (zero-frequency) components in the spectral domain, whereas STSP incorporates more spectral components besides the DC ones during aggregation and is able to retain richer speaker information.

1. 将卷积层提取到的特征做STFT(Short Time Fourier Transorm),每一个channel得到一个二维频谱图。

2. 计算averaged spectral array

3. 计算second-order spectral statistics

4. 将两个特征进行拼接(C is the number of channels)

9. Multi-head attentive STSP (IEEE TRANS. ON AUDIO, SPEECH, AND LANGUAGE PROCESSING 2022)

One limitation of STSP is that the brute average of the spectrograms along the temporal axis ignores the importance of individual windowed segments when computing the spectral representations. In other words, all segments in a specific spectrogram were treated with equal importance.

### 如何在语音识别中应用卷积神经网络(CNN) #### CNN在语音特征提取中的作用 卷积神经网络(CNN)因其强大的特征提取能力,在语音识别领域得到了广泛应用。它可以通过卷积操作自动从原始数据中学习到有用的特征表示,而无需依赖传统的手工设计特征[^1]。这种特性使得CNN特别适合于处理复杂的语音信号。 #### 声学特征的预处理 在实际应用中,语音信号通常被转换为频谱图或梅尔频率倒谱系数(MFCCs),以便更好地捕捉时域和频域的信息。这些声学特征作为输入提供给CNN模型进行训练[^4]。例如,MFCC是一种常用的特征表示方法,它可以反映人类听觉系统的感知特性,因此非常适合用于语音识别任务。 #### 卷积层的作用 卷积层是CNN的核心组成部分之一,负责执行卷积运算以检测局部模式。通过对不同尺度和平移不变性的模式进行建模,卷积层可以从语音信号中提取出丰富的时空特征[^2]。具体来说,卷积核会在输入数据上滑动,并计算每个位置上的加权求和结果,最终形成一个新的特征映射。 #### 池化层的功能 为了进一步降低特征的空间尺寸并增强模型的鲁棒性,池化层常被用来压缩信息。最大池化是最常见的形式之一,它选取窗口内的最大值作为输出;平均池化则是取均值作为输出。通过这种方式,不仅可以减少参数数量,还能缓解过拟合现象的发生。 以下是基于Keras框架的一个简单示例代码片段展示如何构建一个基本的CNN架构来进行语音命令分类: ```python from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten, Dense model = Sequential() # 添加第一个卷积层与最大池化层 model.add(Conv2D(filters=32, kernel_size=(3, 3), activation='relu', input_shape=(40, 100, 1))) model.add(MaxPooling2D(pool_size=(2, 2))) # 添加第二个卷积层与最大池化层 model.add(Conv2D(filters=64, kernel_size=(3, 3), activation='relu')) model.add(MaxPooling2D(pool_size=(2, 2))) # 展平层 model.add(Flatten()) # 全连接层 model.add(Dense(units=128, activation='relu')) # 输出层 (假设我们有十个类别) model.add(Dense(units=10, activation='softmax')) model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy']) ``` 此代码定义了一个简单的两层卷积神经网络结构,适用于小型语音命令集的分类任务。 #### 应用场景举例 除了上述提到的基础功能外,CNN还可以与其他技术相结合来解决更加复杂的语音识别问题。比如,在端到端的语音识别系统中,可以将CNN与循环神经网络(RNN)或者Transformer结合起来,共同完成从音频波形直接预测文字的任务[^3]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值