每天早上一封邮件,把昨天的 AI 梳理好订阅邮件

METAL LAB

Listening Forward: Next Patch Embedding Prediction Enables Scalable Audio Learners

arXiv:2608.198632026-08-19

只让模型学会预测声音频谱图的下一个小块就能达到顶尖效果

NAPE是一种训练方法,把声音的时频图切成一小块一小块,按顺序输入模型,让它只根据前面的小块去预测下一个小块的特征值。它去掉了以往方法里复杂的重建解码器、教师-学生结构等设计,只靠因果掩码和梯度阻断这两个简单机制就能稳定训练。在六个音频和语音基准测试中,它在多个任务上取得了最佳的微调效果,并且随着模型变大性能持续提升。

他们做了什么

  1. 先把声音转成log-mel频谱图(一种展示声音随时间和频率变化的图像),切成小方块并排好顺序,再训练一个Transformer只用前面的小块去预测下一个小块的特征向量
  2. 去掉了以往音频自监督方法常用的重建解码器、单独训练的声学分词器、指数滑动平均的教师-学生结构、额外的正则化损失,只保留因果注意力掩码(挡住未来信息)和停止梯度(阻止梯度从目标一侧回传)两个核心机制
  3. 比较了四种把二维频谱图小块排成一维序列的方式(光栅、时间优先、之字形、对角线),结果沿时间推进的光栅、之字形、对角线三种明显优于先扫完频率再推进时间的时间优先方式
  4. 在AudioSet、ESC-50、Speech Commands V1/V2、IEMOCAP等六个基准上,NAPE在多个任务上取得了微调后的最佳效果,并且在19M、85M、303M三种参数规模下都表现出稳定的性能提升
  5. 即使冻结编码器、只训练顶部的简单分类器(线性探测),NAPE依然表现不错,而且在没有任何人工标注监督的情况下,其注意力模式也呈现出有意义的结构
Figure 1: Left: NAPE’s overview. The input spectrogram is split into patches and embedded into a sequence of embeddings. At each step, the model predicts the embedding of the next patch (red border) using only the embeddings of the preceding patches; patches at future positions are hidden by the causal attention mask. Middle: The NAPE pipeline: patch embeddings z are processed by the causal encoder h and predictor g to produce predictions z^, which are compared against the targets z under stop-gradient using a similarity function 𝒟 (i.e., negative cosine similarity). Right: Encoder architecture (h): multiple stacked Transformer layers with pre-norm design, causal self-attention, LayerScale, and query-key normalization.
Figure 1: Left: NAPE’s overview. The input spectrogram is split into patches and embedded into a sequence of embeddings. At each step, the model predicts the embedding of the next patch (red border) using only the embeddings of the preceding patches; patches at future positions are hidden by the causal attention mask. Middle: The NAPE pipeline: patch embeddings z are processed by the causal encoder h and predictor g to produce predictions z^, which are compared against the targets z under stop-gradient using a similarity function 𝒟 (i.e., negative cosine similarity). Right: Encoder architecture (h): multiple stacked Transformer layers with pre-norm design, causal self-attention, LayerScale, and query-key normalization.
Table 1: Ablation on main NAPE’s design elements: prediction shift, stop-gradient, and causal objective.
PredstopcausalAudio TasksSpeech Tasks
shiftgradmaskAS-2MAS-20KESC-50KS1KS2ER
Diverge
Diverge
41.824.868.996.197.357.0
49.639.194.297.998.864.9
Figure 2: Patch scanning orders. NAPE linearizes the 2D spectrogram patch grid into a 1D causal sequence in one of four ways: raster (left-to-right, bottom-to-top), time-major (bottom-to-top within each time column, then advance in time), zigzag (raster with alternating row directions), and diagonal (sweep by frequency-plus-time index). The numbers indicate the position of each patch in the resulting sequence.
Figure 2: Patch scanning orders. NAPE linearizes the 2D spectrogram patch grid into a 1D causal sequence in one of four ways: raster (left-to-right, bottom-to-top), time-major (bottom-to-top within each time column, then advance in time), zigzag (raster with alternating row directions), and diagonal (sweep by frequency-plus-time index). The numbers indicate the position of each patch in the resulting sequence.
Table 2: Ablation on the patch embedding layer.
Patch Emb.Audio TasksSpeech Tasks
LayerAS-2MAS-20KESC-50KS1KS2ER
Convstem46.734.389.197.498.363.6
Speechstem47.633.188.498.198.963.0
Conv2d49.639.194.297.998.864.9
Figure 3: NAPE’s performance across four scan orders on six benchmarks.
Figure 3: NAPE’s performance across four scan orders on six benchmarks.
Table 3: Ablation on the predictor-style variants.
Predictor#Par.Audio TasksSpeech Tasks
StyleAS-2MAS-20KESC-50KS1KS2ER
None-48.737.893.398.198.864.2
2-MLP1.2M49.438.593.698.098.864.2
Transformer14.2M49.238.493.098.298.765.0
SimSiam1.8M49.639.194.297.998.864.9
Figure 4: Scaling comparison between Audio-MAE and NAPE, raster.
Figure 4: Scaling comparison between Audio-MAE and NAPE, raster.
Table 4: Ablation on NAPE’s target to predict.
PredictedAudio TasksSpeech Tasks
TargetAS-2MAS-20KESC-50KS1KS2ER
1st enc. layerDiverge
Raw Mel49.738.094.897.798.664.2
Patch embed49.639.194.297.998.864.9
Figure 5: NAPE’s results at different scales under raster and diagonal scan orders.
Figure 5: NAPE’s results at different scales under raster and diagonal scan orders.
Table 5: Ablation on the similarity function.
SimilarityAudio TasksSpeech Tasks
FunctionAS-2MAS-20KESC-50KS1KS2ER
L1Diverge
L2Diverge
Cross-entropy48.837.493.698.098.764.5
Cosine49.639.194.297.998.864.9
Figure 6: Layer-wise linear probing analysis.
Figure 6: Layer-wise linear probing analysis.
Table 6: Comparison with audio methods on audio and speech downstream tasks. IN, AS, and LS denote the ImageNet, AudioSet, and LibriSpeech datasets, respectively. TI denotes the 400M text-image pairs for CLIP pre-training. We gray-out the models and results with additional supervised training on external datasets. Best results are in bold, second-best are underlined.
Model#Par.Pre-trainAudio TasksSpeech Tasks
DataAS-2MAS-20KESC-50KS1KS2ER
Out-of-domain Supervised Pre-training
PSLA (32)14MIN44.431.9--96.3-
AST (31)86MIN45.934.788.795.598.156.0
HTS-AT (17)31MIN47.1---98.0-
Audio-CLIP (35)93MTI+AS25.9-96.7---
In-domain Supervised Pre-training
AST (31)86MIN+AS45.9-95.6-97.9-
HTS-AT (17)31MIN+AS47.1-97.0---
Audio-MAE (40)86MAS--97.4---
Self-Supervised Pre-training
SS-AST (33)89MAS+LS-31.088.896.098.059.6
MAE-AST (6)86MAS+LS-30.690.095.897.959.8
CAV-MAE (34)86MIN+AS44.934.2----
Audio-MAE (40)86MAS47.337.194.196.998.3-
Audio-MAE L (40)304MAS47.437.7----
data2vec (7)94MAS-34.5----
MaskSpec (22)86MAS47.132.389.6-97.7-
BEATsiter3 (19)90MAS48.038.395.697.798.364.5
A-JEPA (29)86MAS48.638.496.397.798.5-
ASiT (2)86MAS48.038.695.398.298.9-
EAT (20)88MAS48.640.295.9-98.3-
SSLAM (3)88MAS50.240.996.298.898.1-
SPEARa Large (68)327MAS49.739.3----
NAPE-B raster85MAS49.639.194.297.998.864.9
NAPE-B diagonal85MAS49.739.294.897.998.667.1
NAPE-L raster303MAS50.240.596.097.998.868.0
NAPE-L diagonal303MAS50.040.496.298.298.968.8
Figure 7: Top: Prediction Quality Analysis. We report the cosine similarity between the predicted and true patch embeddings, averaged over 500 audio clips (left) and for two individual clips (middle, right). Bottom: Attention/Embedding Analyses. Left: selected query patch; middle: attention map showing the patches NAPE attends to when predicting the next patch; right: embedding-similarity map between the predicted next-patch embedding z^t+1 and every actual patch embedding in the spectrogram.
Figure 7: Top: Prediction Quality Analysis. We report the cosine similarity between the predicted and true patch embeddings, averaged over 500 audio clips (left) and for two individual clips (middle, right). Bottom: Attention/Embedding Analyses. Left: selected query patch; middle: attention map showing the patches NAPE attends to when predicting the next patch; right: embedding-similarity map between the predicted next-patch embedding z^t+1 and every actual patch embedding in the spectrogram.
Table 7: Linear probing results.
ModelLayerAS-2MAS-20KESC-50
Small2nd23.218.979.8
Base6th25.019.781.7
Large11th27.120.483.5
Listening Forward: Next Patch Embedding Prediction Enables Scalable Audio Learners figure 7
Table 8: Hyperparameter list. When an hyperparameter h varies between the base (hb) and large (hl) model, we include both values like (hb/hl). ∗Following (19), we balance each class to 50% of the size of the unknown class for each training epoch.
HyperparametersPre-trainingFine-tuning
AS-2MAS-2MAS-20KESC-50KS1KS2ER
OptimizerAdamW
Opt. Momentum (β1, β2)(0.9,0.95)(0.9,0.999)
Weight Decay0.05
Learning Rate SchedulerCosine Decay
Layer-Wise LR Decay1.00.7/0.90.8/0.90.7/0.90.7/0.80.7/0.80.7/0.9
Base Learning Rate5e-31.25e-3
Epochs30/2520/1530/20100505050
Warm-up Epochs34/36/510555
Batch Size256/12864
GPUs8441114
Weighted sampling✓∗
MultilabelN/A
EMA Decay Rate0.99990.999950.999
Label SmoothingN/A0.0.0.10.10.0.1
Roll Augmentation
Drop Path0.0.1
SpecAug (time/freq)N/A(96,16)(24,16)/(96,16)(96,24)/(24,16)(24,16)(24,16)(48,24)
Mixup (alpha/prob.)N/A(0.8,1.0)(0.8,0.8)(0.8,0.5)(0.8,0.8)(0.8,0.8)(0.8,0.5)
Cutmix (alpha/prob.)N/A(1.0,1.0)(1.0,0.8)(1.0,0.5)(1.0,0.8)(1.0,0.8)(1.0,0.5)
Noise Augmentation
Loss FunctionNeg Cos SimBCEBCECEBCEBCECE
Dataset Mean for Norm.-6.84-6.84-6.84-6.84-9.11-9.16-13.74
Dataset Std for Norm.5.385.385.385.384.534.613.88
Listening Forward: Next Patch Embedding Prediction Enables Scalable Audio Learners figure 8
Table 9: Ablation on the pooling method and attention type at fine-tuning.
AttentionPoolingTask
TypeModeAS-2MAS-20KKS2
BidirecCLS Tok49.738.998.7
BidirecLast Tok49.638.798.8
BidirecAvg Pool49.639.198.8
CausalLast Tok49.438.998.8
Listening Forward: Next Patch Embedding Prediction Enables Scalable Audio Learners figure 9
Table 10: Ablation on freezing the emb. layer.
Freeze embAS-2MAS-20KKS2
49.6139.1498.73
49.5839.0898.80
Figure 8: Pre-training budget ablation. AS-2M (left) and AS-20K (right) mAP trend as a function of the number of epochs the model is trained on.
Figure 8: Pre-training budget ablation. AS-2M (left) and AS-20K (right) mAP trend as a function of the number of epochs the model is trained on.
Table 12: Ablation on normalization layer style.
NormAudio TasksSpeech Tasks
TypeAS-2MAS-20KESC-50KS1KS2ER
LN49.639.194.297.998.864.9
RMS49.538.894.497.898.865.2
Figure 9: Comparison between JEPA, LeWorldModel, and NAPE architectures.
Figure 9: Comparison between JEPA, LeWorldModel, and NAPE architectures.
Table 13: Ablation on random masking applied to the input embeddings.
MaskAudio TasksSpeech Tasks
RatioAS-2MAS-20KESC-50KS1KS2ER
047.636.292.997.498.364.6
2047.336.292.297.698.563.9
5047.235.291.797.598.363.9

为什么重要

这说明在语言模型上行之有效的简单的下一步预测思路,同样适用于音频领域,为构建音频AI模型提供了一条不必依赖复杂预训练流程的新路径。而且只需较少的预训练轮数就能达到甚至超过许多已发表方法的效果,在算力有限的情况下也很有吸引力。

本文术语

  • 自监督学习 · 不依赖人工标注标签,直接利用数据自身结构进行训练的方法
  • log-mel频谱图 · 把声音按时间和频率展开画成的图像式表示
  • 因果注意力掩码 · 阻止模型看到序列中未来位置信息的机制
  • 停止梯度 · 阻止梯度从某一分支反向传播的技术
  • 线性探测 · 冻结预训练模型,只训练其上简单分类器来评估效果的方法

论文原文摘要(英文)

Self-supervised learning (SSL) has driven substantial progress in audio representation learning, though existing methods have increasingly relied on elaborate pre-training recipes to reach competitive performance. A markedly different pre-training philosophy underpins the most influential progress in language modeling and, more recently, in visual representation learning: rather than train encoders as static feature extractors, models are trained to predict the next element, a discrete token or a continuous embedding, from the preceding context. Autoregressive prediction thereby provides a unified pre-training interface that transfers across modalities, compelling the model to learn the underlying data distribution. We ask whether such a simple causal paradigm can yield strong audio learners, given that audio's temporal structure makes autoregressive prediction of patch embeddings a natural fit. We introduce NAPE (Next-Audio-Patch-Embedding prediction), a self-supervised framework in which a causal Transformer predicts each next patch embedding of a log-mel spectrogram from the previous ones, using causal masking and stop-gradient as its sole training signal. The design is intentionally minimalist, avoiding reconstruction decoders, acoustic tokenizers, student-teacher setups, and auxiliary regularization losses. Across six audio and speech benchmarks, NAPE achieves state-of-the-art fine-tuning performance on several tasks, scales consistently across encoder sizes, and yields strong linear-probing results. NAPE also produces structured attention patterns without explicit supervision.

作者 · Umberto Cappellazzo

在 arXiv 阅读

最新论文

全部论文 →

METAL LAB 最新报道

图片来源: Umberto Cappellazzo et al., arXiv:2608.19863, CC BY 4.0