H-Vectors: Utterance-Level Speaker Embedding Using a Hierarchical Attention Model

Yanpei Shi, Qiang Huang, Thomas Hain

This paper introduces H-vectors, a novel approach to speaker embedding that uses a hierarchical attention mechanism to better capture the nuances of individual voices. By treating speech audio like a structured document—where frames are words and segments are sentences—the model learns to prioritize the most "speaker-distinctive" parts of an utterance, significantly outperforming the industry-standard X-vector baseline.

TL;DR

The authors propose a hierarchical attention network (HAN) to generate utterance-level speaker embeddings called H-vectors. By applying attention at both the frame and segment levels, the model effectively "listens" to the most informative parts of a recording, leading to superior speaker identification and verification performance compared to standard X-vectors.

What Problem Does This Paper Address?

In the world of speech processing, a "speaker embedding" is a fixed-length mathematical representation of a person's voice. The goal is to create a vector where two recordings of the same person are close together in space, while recordings of different people are far apart.

The current standard, the X-vector, typically uses a deep neural network to extract frame-level features and then collapses them into a single vector using simple statistics (like mean and standard deviation). However, speech is not uniform; some parts of an utterance (like a specific vowel sound or a unique inflection) carry much more information about a speaker's identity than others (like silence or background noise). Standard pooling methods often "wash out" these distinctive local details. The authors aim to solve this by allowing the model to selectively attend to the most relevant information at multiple scales.

Methods

The core innovation is the Hierarchical Attention Network (HAN). The architecture mimics the structure of a document:

  1. Frame-Level Encoder: The raw audio is divided into segments, and segments into frames. A 1D-CNN and a bidirectional Gated Recurrent Unit (Bi-GRU) process the frames to capture local context.
  2. Frame-Level Attention: An attention mechanism assigns weights to each frame. This allows the model to focus on specific acoustic events within a segment.
  3. Segment-Level Encoder: The weighted frames are pooled into segment vectors. These vectors pass through another CNN.
  4. Segment-Level Attention: A second attention layer weights the segments themselves. This helps the model ignore segments that might be noisy or uninformative (like long pauses) across the entire utterance.
  5. Utterance Representation: The final H-vector is produced by aggregating these weighted segments, which is then used for speaker classification.

This "two-tier" attention allows the model to learn speaker-related information both locally (within a few milliseconds) and globally (across several seconds).

Datasets

The researchers used three primary datasets for their experiments:

  • NIST SRE 2008 (Part 1): Used for training the model. It contains roughly 640 hours of multilingual telephone and interview speech from 1,336 speakers.
  • CallHome American English (CHE): Used for evaluation.
  • Switchboard Cellular (SWBC): Used for evaluation. This dataset is particularly challenging as it includes varied environments like indoors, outdoors, and moving vehicles.

Key Insights and Ideas

  • Speech as a Document: The most compelling idea is the analogy between speech and text. Just as some words are more important to a sentence's meaning than others, some acoustic frames are more important to a speaker's identity.
  • Hierarchical Focus: By separating attention into two levels, the model doesn't just look for "important sounds"; it looks for "important moments" within the recording.
  • Robustness to Short Utterances: The H-vector showed a more significant performance boost over baselines when the input audio was short (1 second). This suggests that the attention mechanism is highly efficient at finding "speaker signal" even when data is scarce.

Key Results

The H-vector consistently outperformed both the standard X-vector and an "X-vector + Global Attention" baseline:

  • Accuracy (SRE08): For 1-second utterances, H-vectors achieved 94.5% accuracy (vs. 90.1% for X-vectors). For 3-second utterances, accuracy reached 98.5%.
  • Error Rates: On the challenging Switchboard (SWBC) dataset, H-vectors reduced the Equal Error Rate (EER) to 1.69% for 3-second clips, compared to 2.01% for the standard X-vector.
  • Visual Discrimination: Using t-SNE to map the embeddings into 2D space, the authors showed that H-vectors create much tighter, more distinct clusters for individual speakers, with far less overlap between different people than the baseline methods.

Limitations and Future Work

While the results are promising, the authors note a few areas for growth:

  • Feature Input: The current model relies on 20-dimensional MFCCs. The authors suggest that using more detailed features like filter-banks or Mel-spectrograms might further improve results.
  • Computational Complexity: To keep the model fast, they omitted the GRU layer at the segment level. Future work could explore if adding more complex temporal modeling at higher levels justifies the extra compute time.
  • Scaling: The next step is testing the H-vector architecture on even larger, more modern benchmarks like the VoxCeleb datasets.

Summary updated

BibTeX
@inproceedings{shi2020h,
  author = {Yanpei Shi and Qiang Huang and Thomas Hain},
  title = {{H-Vectors: Utterance-Level Speaker Embedding Using a Hierarchical Attention Model}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2020},
  doi = {10.1109/icassp40776.2020.9054448},
}
Figure