オーディオAIガイド

HuBERT 自己監修スピーチ

HuBERT (Hidden-Unit BERT) は、2021年6月に発表されたFacebook AIによる自己教師あり音声モデルであり、ラベルなし音声のマスクされた区間に対してクラスターラベルを予測することで学習します。

このガイドを聴くAIによるナレーション · ~8 min

このページでは9 分で読めます
  1. 概要
  2. 主なポイント
  3. ディープダイブ
  4. 音声クリップからHuBERTユニットを作成する
  5. 現実世界の実装
  6. HuBERT 自己教師あり音声の将来
  7. 実践する
  8. 出典とさらなる参考文献
  9. 探検を続けましょう
  10. よくある質問

概要

LibriSpeech音声認識においてwav2vec 2.0と同等以上の性能を発揮し、その離散ユニットは音声生成、圧縮、音声研究の標準的な構成要素となりました。

主なポイント

  1. HuBERTは、ラベルなし音声のマスクされたスパンに対してk-meansクラスターラベルを予測することで、音声表現を学習します。
  2. 最初のラベルはMFCC特徴量を100個のグループにクラスタリングすることで得られ、その後、自身の隠れ層を500個にクラスタリングすることで得られます。
  3. わずか10分間のトランスクリプトでファインチューニングされたHuBERT X-LARGEは、test-cleanで4.6%、test-otherで6.8%のWERを達成しました。
  4. HuBERTはマスクされたフレームに対してのみ損失を計算するため、周囲のコンテキストから隠れた音声を推論せざるを得なくなります。
  5. HuBERTの離散ユニットは、テキストなしの音声生成や低ビットレートの音声再合成に広く使用されています。

ディープダイブ

HuBERT, short for Hidden-Unit BERT, is a method for learning useful representations of speech from recordings that have no transcripts. It was introduced by Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan Salakhutdinov and Abdelrahman Mohamed in a paper posted on June 14, 2021, with a Facebook AI blog post the next day. The trained model turns raw audio into a sequence of vectors, one every 20 milliseconds, that capture the sounds being spoken. Those vectors can then be fine-tuned with a small amount of labeled data for speech recognition or used directly for other speech tasks.

The idea borrows from BERT, the text model that learns by hiding some words in a sentence and predicting them. Speech makes this harder in three ways that the paper names: each utterance contains many sound units, there is no dictionary of those units to predict, and units have different lengths with no marked boundaries. HuBERT's answer is to create its own targets with an offline clustering step. K-means clustering, which groups similar vectors into a fixed number of clusters, assigns every 20 ms frame a cluster number. These numbers are the hidden units. They are noisy stand-ins for phonetic categories, but they are consistent: similar sounds get similar labels.

Training then proceeds like BERT. A convolutional encoder turns 16 kHz audio into frames, downsampling by a factor of 320. About 8% of frames are chosen as starting points and spans of 10 frames from each are replaced by a learned mask embedding. A transformer encoder reads the partly masked sequence and, at every masked frame, predicts which cluster that frame was assigned. The key design choice is computing the loss only on masked frames. To predict a hidden frame's label, the model must infer it from surrounding context, which forces it to learn both what sounds are present, like an acoustic model, and how speech sequences are structured, like a language model.

The clustering improves over iterations. In the first round, the authors clustered 39-dimensional MFCC features, a classic hand-designed summary of the speech spectrum, into 100 clusters. After training the BASE model for 250,000 steps on LibriSpeech's 960 hours, they clustered the output of its sixth transformer layer into 500 clusters and trained again for 400,000 steps. The LARGE and X-LARGE models were trained for one iteration on the 60,000-hour Libri-Light collection, using labels from the ninth layer of the second-iteration BASE model. The paper notes that HuBERT depends more on the consistency of the clustering than on how accurate the cluster labels are as phonetic categories.

The results matched or exceeded wav2vec 2.0, the leading self-supervised speech model at the time, across fine-tuning sets of 10 minutes, 1 hour, 10 hours, 100 hours and 960 hours. With only 10 minutes of labels, HuBERT LARGE reached 4.7% word error rate on test-clean and 7.6% on test-other, and the 1-billion-parameter X-LARGE reached 4.6% and 6.8%. With all 960 hours of labels, X-LARGE reached 1.8% on test-clean and 2.9% on test-other, against 1.8% and 3.3% for wav2vec 2.0 LARGE in the paper's comparison. The authors summarize the gain as up to 19% and 13% relative word error rate reduction on dev-other and test-other. The exceptions were small: with 100 hours of labels, HuBERT LARGE and BASE were each 0.1 points behind wav2vec 2.0 on one test set.

The main alternative, wav2vec 2.0, also masks speech, but it learns its discrete targets during training and uses a contrastive loss that must pick the true frame from sampled distractors. The HuBERT paper points out that this requires careful choice of negative samples, an extra diversity loss and a temperature schedule. HuBERT separates the two problems, discovering units offline and then training with a simple cross-entropy loss, which made training more direct. Compared with supervised speech recognition, both approaches need far less labeled data, which matters for languages and domains where transcripts are scarce.

HuBERT has clear limits. The published models were trained only on English read audiobooks from LibriVox, so they reflect that style and language, and results on other languages or spontaneous, noisy speech must be measured separately. The method needs repeated rounds of clustering and pre-training, and k-means over high-dimensional features for hundreds of hours of audio requires subsampling to fit in memory, which the authors note. HuBERT is an encoder, not a complete transcription system: it needs fine-tuning and a decoder, and the strongest reported numbers also used a language model during decoding. Its units capture mainly what is said, which is useful for content but means speaker identity and prosody must be handled by other components in generation systems.

The practical cost is concentrated in pre-training. The authors trained BASE on 32 GPUs and the LARGE and X-LARGE models on 128 and 256 GPUs for 400,000 steps each. Fine-tuning and use are far cheaper: pretrained and fine-tuned checkpoints were released through Facebook's fairseq repository and are available in Hugging Face Transformers, where a model loads in a few lines and expects raw audio sampled at 16 kHz. Three sizes exist, BASE with 95 million parameters, LARGE with 317 million and X-LARGE with 964 million.

04作業例

音声クリップからHuBERTユニットを作成する

  1. 10秒間の英語の音声クリップを読み込み、16 kHzにリサンプルして、160,000個のサンプルを取得します。

  2. それを事前学習済みのHuBERT BASEモデルに通し、それぞれ768個の数値を持つ約500フレームの隠れ状態を収集します。

  3. 中間のトランスフォーマーレイヤーの出力を取得し、多くのクリップのフレームに対して100個のクラスターを持つk-means法を適用します。

  4. テストクリップのすべてのフレームを最も近いクラスターに割り当て、500個の整数のシーケンスを取得します。

  5. テキストを持たない音声モデルがよく行うように、連続して繰り返される整数をマージして、より短いユニットシーケンスを取得します。

  6. 同じ文を話している2人の話者のユニットシーケンスを比較し、どのユニットが一致するかを確認します。

それが示すもの

学習者は離散的な疑似テキストを音声から取得し、マージ前に20 msごとに1ユニット取得します。異なる話者から同じ単語のユニット列は、HuBERT ユニットが主に内容を捉えていることを示しており、これが音声言語モデルのトークンとして機能する理由です。

現実世界の実装

低リソース音声認識:60,000 時間のラベルなしオーディオブック音声で事前学習した後、HuBERT LARGE をわずか 10 分の文字起こし音声でファインチューニングすると、LibriSpeech の test‑clean で 4.7% の語句誤り率、test‑other で 7.6% を達成しました。

テキストなし音声生成:Meta の Generative Spoken Language Modeling(2021)では、HuBERT 特徴を離散的疑似テキストユニットに変換し、それらで言語モデルを学習させ、テキストなしで音声を合成しました。

非常に低ビットレート圧縮:Meta は、HuBERT ユニットを用いた音声再合成研究で 1 秒あたり 365 ビットに達したと報告しており、MUSHRA リスニングテストでは圧縮されていない音声に次いで第2位でした。

汎用トランスクリプション:Hugging Face Transformers は、facebook/hubert-large-ls960-ft などの HuBERT チェックポイントを提供し、標準的な音声認識パイプラインで 16 kHz の英語音声を文字起こしできます。

音声分類:同じライブラリは HubertForSequenceClassification を提供し、プーリングされた分類ヘッドを持つ HuBERT エンコーダで、SUPERB ベンチマークのキーワードスポッティングなどのタスクに利用できます。

HuBERT 自己教師あり音声の将来

HuBERT's most lasting influence may be outside speech recognition. Its discrete units showed that speech can be modeled like text without any transcripts: Meta's Generative Spoken Language Modeling paper (February 2021, revised September 2021) compared HuBERT units with CPC and wav2vec 2.0 units for training language models on raw audio, and Meta's June 2021 announcement described generation and very low bitrate resynthesis built on HuBERT. Open questions include how to extend self-supervised speech models to many languages, accents and recording conditions when public pre-training data is dominated by English audiobooks, how to capture prosody, emotion and speaker identity that clustered content units tend to discard, and how to reduce the cost of iterative clustering and pre-training at large scale. The HuBERT authors said in 2021 that they planned to simplify training into a single phase instead of repeated rounds of clustering and pre-training. Comparisons also keep shifting. Newer models trained on far more varied data, with or without labels, have changed what counts as state of the art on many benchmarks since 2021, so HuBERT is now often used as a well-understood baseline and feature extractor rather than the best available recognizer. Choosing it today is mainly a question of whether its open checkpoints, 16 kHz English training data and discrete units fit the task.

実践する

なぜそれが重要なのか

  • アクセスと到達範囲. 文字起こし、ナレーション、音声インターフェイスを通じてアクセシビリティを向上させます。
  • 費用と予算. メディア チームは、より少ない予算で洗練されたオーディオをより迅速に出荷できます。
  • 速度とスケール. 顧客対応システムは、音声対話を大規模に処理できます。

気をつけてください

  • 同意がない場合、音声の悪用やなりすましのリスクが高まります。
  • アクセント、方言、または騒がしい環境では精度が低下する可能性があります。
  • 合成音声は、明確なラベルが付けられていないと、本物の音声と間違われる可能性があります。

次のステップ

  1. 音声のキャプチャ、複製、再利用については明示的な同意を取得してください。
  2. さまざまな話者や背景条件で品質をテストします。
  3. 人間がいつ出力をレビューまたは承認する必要があるかを定義します。
  4. 合成音声にラベルを付け、出所記録を保管して説明責任を果たします。

出典とさらなる参考文献

  1. arXivHuBERT:隠れユニットのマスク予測による自己教師あり音声表現学習
  2. Meta AIHuBERT:音声認識、生成、圧縮のための自己教師あり表現学習
  3. arXivRaw Audio からの Generative Spoken Language Modeling
  4. Hugging Face Transformers documentationHuBERT

探検を続けましょう

無料ニュースレター

毎日のAIブリーフィングを受け取る

毎週平日の朝に英語で書かれた3つの検証済みAIストーリー。無料で永続的、広告なし。

毎週平日に1通のメール。ワンクリックで購読解除。住所を販売または共有しません。

自分自身をテストしてください

HuBERT Self-Supervised Speech クイズを受ける

すべての回答に即時フィードバック、合格後は検証可能なID付きの共有可能な証明書を取得。

クイズを開始する

無料AI教育をサポート。AI Understandingは501(c)(3)の非営利団体です — 広告なし、課金壁なし、常に。 寄付をする

よくある質問

HuBERT 自己教師あり音声とは何ですか?

HuBERT(Hidden‑Unit BERT)は Facebook AI が 2021 年 6 月に公開した自己教師あり音声モデルで、ラベルなし音声からマスクされた音声区間のクラスタラベルを予測して学習します。LibriSpeech の音声認識で wav2vec 2.0 と同等または上回り、その離散ユニットは音声生成、圧縮、音声研究の標準的な構成要素となっています。

HuBERT はトレーニング中に予測しようとするターゲットをどのように生成しますか?

HuBERT は、オーディオ フレームの特徴を (K-means 経由で) 個別の隠れユニットにクラスター化し、マスクされたフレームのそれらのクラスター ラベルを予測します。

HuBERT のマスク予測トレーニング スキームに影響を与えた有名なテキスト モデルは何ですか?

HuBERT (Hidden-Unit BERT) は BERT のマスク予測目標を借用し、テキスト トークンではなく離散音声単位に適用します。

HuBERT は、トレーニングを繰り返すたびにターゲット ラベルをどのように改善しますか?

後続のイテレーションでは、HuBERT はモデルが学習した表現をクラスタリングして更新された疑似ラベルを作成しますが、論文ではこれらのラベルを検証済みの音素として特定していません。

HuBERT の最初のイテレーションでは通常どのような機能がクラスター化されますか?

最初の反復では、基本的な MFCC 機能をまとめます。後の反復では、より豊富なトランスフォーマー層表現が使用されます。

HuBERT は、クラスタリングが不完全であっても、なぜ有用な構造を学習できるのでしょうか?

目的はマスクされたフレームに割り当てられたクラスター ID を予測することだけであるため、ノイズの多いクラスターにもかかわらず、タスクは学習可能で一貫性を保ちます。