# HuBERT

HuBERT（Hidden-Unit BERT）是 [Meta AI](https://www.edgepedia.org/zh/meta-ai) 于 2021 年 6 月发布的一种自监督语音表示模型，它从未标注音频中学习：在输入的被掩码区域上预测由 k-means 聚类生成的离散伪标签。<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup> 它面向语音识别、生成与压缩而设计。<sup>[2](https://ai.meta.com/blog/hubert-self-supervised-representation-learning-for-speech-recognition-generation-and-compression/)</sup> 其量化方式——采用固定簇大小 K 的经典 k-means 算法——后来在后续工作中被描述为掩码单元预测的标准机制。<sup>[3](https://arxiv.org/html/2310.02720v2)</sup> 本文介绍该模型系列：其训练方法、已发布规模与结果、与相关模型的比较、采用情况，以及 2023 年以来的状况。Meta 公司及其消费产品另行介绍。

| 事实 | 数值 |
|---|---|
| 制作者 | Meta AI（2021 年 6 月公布）<sup>[2](https://ai.meta.com/blog/hubert-self-supervised-representation-learning-for-speech-recognition-generation-and-compression/)</sup> |
| 方法 | 仅在掩码区域上对 k-means 伪标签进行掩码预测<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup> |
| 规模（已发布） | Base 95M、Large 317M、X-Large 964M 参数<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup> |
| 预训练数据 | Base：960 小时 LibriSpeech；Large 与 X-Large：60,000 小时 Libri-Light<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup> |
| 计算资源 | Base：在 32 块 GPU 上两轮迭代（先 250k 步，再 400k 步）；Large 与 X-Large：在 128 块和 256 块 GPU 上 400k 步<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup> |
| 厂商报告的最佳 WER | 10 分钟微调设置：4.7% test-clean / 7.6% test-other（Large）；4.6% / 6.8%（X-Large）<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup> |
| 可用性 | 检查点位于 fairseq、Hugging Face Transformers 和 torchaudio 中<sup>[4](https://github.com/facebookresearch/fairseq/tree/main/examples/hubert)</sup><sup> • </sup><sup>[5](https://huggingface.co/docs/transformers/en/model_doc/hubert)</sup><sup> • </sup><sup>[6](https://docs.pytorch.org/audio/2.4.0/generated/torchaudio.pipelines.HUBERT_BASE.html)</sup> |

## 训练如何运作

HuBERT 预训练有两个交替步骤。首先，离线聚类步骤在声学特征上运行 k-means，为训练音频的每一帧分配一个簇索引。其次，类似 BERT 的预测损失训练模型为输入中被掩码的片段预测正确的簇索引，且损失只作用于被掩码区域。Meta 的公告称，该模型通过在聚类步骤与预测步骤之间交替，逐步改进其离散表示。<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup><sup> • </sup><sup>[2](https://ai.meta.com/blog/hubert-self-supervised-representation-learning-for-speech-recognition-generation-and-compression/)</sup>

在 960 小时 [LibriSpeech](https://www.edgepedia.org/zh/librispeech) 训练集上的第一轮迭代中，论文的标签来自在 39 维 MFCC 特征（13 个系数加上一阶和二阶导数）上拟合的、含 100 个簇的 k-means。第二轮迭代对第一轮模型第 6 层 Transformer 的特征进行聚类。<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup> fairseq 中发布的 Base 检查点附带一个 L9 km500 量化器，即从第 9 层取 500 个簇的簇分配；这一配置与论文第一轮迭代的 MFCC 设置不同。<sup>[4](https://github.com/facebookresearch/fairseq/tree/main/examples/hubert)</sup>

作者认为，这一目标比 wav2vec 2.0 的对比损失更简单、更稳定；后者需要仔细设计负样本帧的采样来源，需要一项辅助多样性损失来鼓励离散单元的使用，还需要合适的 Gumbel-softmax 温度退火安排。HuBERT 的直接预测损失避开了这些组件，并且依赖聚类步骤的一致性，而不是伪标签的内在质量。<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup> 在 10 次试验中，用 1、10 或 100 小时语音拟合 K = 100 或 500 个簇的消融实验显示出较小的标准差；增加 k-means 拟合数据至多使 PNMI 提高 0.012，作者将此解读为伪标签稳定且拟合成本低的证据。<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup>

训练超参数已详细公布：掩码跨度为长度 10，且 8% 的编码器帧被掩码；Base、Large 和 X-Large 的峰值学习率分别为 5e-4、1.5e-3 和 3e-3。<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup>

## 版本、规模与发布时间线

三种规模共享一个七层、512 通道的卷积波形编码器，步幅为 5,2,2,2,2,2,2，从而在进入 Transformer 堆叠之前缩短序列。其上是 12 层、宽度 768（Base，95M 参数）、24 层、宽度 1024（Large，317M）或 48 层、宽度 1280（X-Large，964M）。<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup> fairseq 发布表将 Large 模型列为约 316M 参数，与论文表格中的 317M 数值存在微小差异。<sup>[4](https://github.com/facebookresearch/fairseq/tree/main/examples/hubert)</sup>

Base 模型在 32 块 GPU 上、使用 960 小时 LibriSpeech 训练两轮迭代（先 250k 步，再 400k 步），每块 GPU 最多处理 87.5 秒音频。Large 与 X-Large 分别在 128 块和 256 块 GPU 上、使用 60,000 小时 Libri-Light 训练一轮 400k 步，每块 GPU 的批大小降至 56.25 秒和 22.5 秒音频。<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup> 这些检查点在 fairseq 中与 ASR 微调变体一同发布，并且仍可从该仓库下载。<sup>[4](https://github.com/facebookresearch/fairseq/tree/main/examples/hubert)</sup> X-Large 检查点也以 facebook 组织名义在 [Hugging Face](https://www.edgepedia.org/zh/hugging-face) 上分发。<sup>[7](https://huggingface.co/facebook/hubert-xlarge-ll60k)</sup>

## 基准性能：厂商结果与独立结果

已发布的 WER 结果由厂商报告，来自 Meta 自己的论文和模型卡。在仅有 10 分钟标注数据的超低资源设置中，HuBERT Large 在 LibriSpeech test-clean 上达到 4.7% WER，在 test-other 上达到 7.6%，分别比 wav2vec 2.0 Large 低 0.1% 和 0.6%；X-Large 达到 4.6% 和 6.8%。<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup> 1B 参数的 X-Large 模型在 Libri-Light 的 60,000 小时数据上预训练时，在 dev-other 和 test-other 上显示出最高 19% 和 13% 的相对 WER 降低；Hugging Face 模型卡重申了这一说法。<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup><sup> • </sup><sup>[7](https://huggingface.co/facebook/hubert-xlarge-ll60k)</sup>

在 LibriSpeech（960 小时）和 Libri-Light（60,000 小时）基准的 10 分钟、1 小时、10 小时、100 小时和 960 小时微调子集上，论文报告 HuBERT 要么与 wav2vec 2.0 相当，要么优于它，唯一例外是在 100 小时设置下，HuBERT 的 WER 比 wav2vec 2.0 高出 0.1%。它与两个最佳的基于 wav2vec 2.0 的预训练结果相当，但落后于将预训练与自训练相结合的方法。<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup>

## 与 wav2vec 2.0 及后续掩码单元模型的比较

目标函数是与 wav2vec 2.0 的主要差异：HuBERT 用类似交叉熵的损失预测固定的簇分配，而 wav2vec 2.0 使用带负采样、多样性项和温度退火的对比损失。<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup> 在已发布基准上，两者表现几乎相同；除 X-Large 模型带来的更大相对增益外，HuBERT 报告的优势在百分之零点几的量级。<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup>

后续工作将 HuBERT 视为标准的掩码单元预测基线。2023 年的一项后续工作 Multi-resolution HuBERT 将 HuBERT 的量化描述为采用固定簇大小 K 的经典 k-means 算法，并提出多分辨率变体以解决固定 K 的限制。<sup>[3](https://arxiv.org/html/2310.02720v2)</sup>

## 采用情况与基于单元的生成

在 GSLM（生成式口语语言模型）实验中，一个在 HuBERT 簇索引上训练的单元语言模型生成的语音，在自动评估和人工评估中都与顶级的监督式字符级语言模型质量相当；这是论文和 Meta 公告中的说法。<sup>[1](https://ar5iv.labs.arxiv.org/html/2106.07447)</sup><sup> • </sup><sup>[2](https://ai.meta.com/blog/hubert-self-supervised-representation-learning-for-speech-recognition-generation-and-compression/)</sup> 一项使用 HuBERT 的语音重合成工作以 365 bps 的比特率实现了音频压缩且不降低质量，同样由 Meta 报告。<sup>[2](https://ai.meta.com/blog/hubert-self-supervised-representation-learning-for-speech-recognition-generation-and-compression/)</sup> 这里的来源直接记录了 GSLM 的用法，后续工作则将 HuBERT 的量化描述为掩码单元预测的标准机制。<sup>[3](https://arxiv.org/html/2310.02720v2)</sup>

该模型已集成到 [Hugging Face Transformers](https://www.edgepedia.org/zh/hugging-face-transformers) 和 torchaudio 中。Hugging Face Transformers 将 HuBERT 记录为仅在掩码区域上应用预测损失，以迫使模型在连续输入上同时学习声学建模和语言建模，并应对每句话中的多个声音单元、预训练期间没有词典，以及可变长度且未分段的声音单元。<sup>[5](https://huggingface.co/docs/transformers/en/model_doc/hubert)</sup> Torchaudio 2.4.0 附带一个 HUBERT_BASE 流水线，该流水线在 960 小时未标注 LibriSpeech 音频（train-clean-100、train-clean-360 和 train-other-500）上预训练，未经过微调，使该模型成为主流音频工具包的标准组件。<sup>[6](https://docs.pytorch.org/audio/2.4.0/generated/torchaudio.pipelines.HUBERT_BASE.html)</sup>

## References

1. [HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Units (Hsu et al., 2021)](https://ar5iv.labs.arxiv.org/html/2106.07447)
2. [HuBERT: Speech representations for recognition & generation (Meta AI blog, June 2021)](https://ai.meta.com/blog/hubert-self-supervised-representation-learning-for-speech-recognition-generation-and-compression/)
3. [Multi-resolution HuBERT: Multi-resolution Speech Self-Supervised Learning with Masked Unit Prediction (arXiv, 2023)](https://arxiv.org/html/2310.02720v2)
4. [fairseq examples/hubert (facebookresearch GitHub)](https://github.com/facebookresearch/fairseq/tree/main/examples/hubert)
5. [HuBERT · Hugging Face Transformers documentation](https://huggingface.co/docs/transformers/en/model_doc/hubert)
6. [torchaudio HUBERT_BASE pipeline documentation (torchaudio 2.4.0)](https://docs.pytorch.org/audio/2.4.0/generated/torchaudio.pipelines.HUBERT_BASE.html)
7. [facebook/hubert-xlarge-ll60k · Hugging Face model card](https://huggingface.co/facebook/hubert-xlarge-ll60k)
8. [Multi-resolution HuBERT (ICLR 2024 proceedings)](https://proceedings.iclr.cc/paper_files/paper/2024/file/6d09ef61aeb76be676b358f6f87b3484-Paper-Conference.pdf)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 19, 2026 · Edited: Sep 19, 2026; Oct 11, 2026 · Last review: Sep 19, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 现代人工智能：基础模型、生成式人工智能与人工智能产业 › Model families and named models › Audio, music, and speech models

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/hubert

English original: https://www.edgepedia.org/hubert
