Two-Stage Triplet Loss Training with Curriculum Augmentation for Audio-Visual Retrieval

Donghuo Zeng, Kazushi IkedaarXiv 2023 · DOI · arXiv

Introduction

Cross-modal retrieval—the ability to find relevant data in one modality (e.g., video) using a query from another (e.g., audio)—is a cornerstone of modern multimedia search. To achieve this, researchers map disparate data types into a shared "common embedding space." In this space, semantically similar items, such as the visual of a train and the sound of its whistle, are positioned close together.

The Challenge of Hard Negatives

The standard approach for training these models is the triplet loss function. This method teaches the model by comparing an "anchor" (the query) against a "positive" (a correct match) and a "negative" (an incorrect match). The goal is to push the negative example further away from the anchor than the positive example by at least a predefined margin.

However, not all negative examples are created equal. As shown in the visualization below, negatives can be categorized by their difficulty:

  • Easy negatives: Distinctly different from the anchor (e.g., a query for a "clock" vs. a negative of a "baby").
  • Semi-hard negatives: Closer to the anchor but still outside the positive margin.
  • Hard negatives: Very similar to the anchor (e.g., a "clock" vs. a "helicopter" with similar rhythmic sounds), often falling within the margin and confusing the model.
Visualization of easy, semi-hard, and hard negatives in the embedding space relative to an anchor and positive pair.

Training exclusively on easy negatives leads to a model that lacks nuance, while jumping straight to hard negatives can cause training instability and poor convergence. Most existing methods use a single-stage training process that fails to navigate this difficulty gradient effectively.

Proposed Methodology: Two-Stage Curriculum Learning

Researchers from KDDI Research have introduced a two-stage training strategy that utilizes curriculum learning—the process of training a model on increasingly difficult examples. Their architecture leverages pre-trained feature extractors (VGGish for audio and InceptionV3 for visual data) followed by fully connected layers to project features into the common space.

Stage 1: Establishing a Baseline

In the first stage, the model is trained using only semi-hard triplets. This allows the model to establish a stable and coherent baseline for the common embedding space without being overwhelmed by the most confusing edge cases.

Stage 2: Refinement via Embedding Augmentation

Once a baseline is established, the model transitions to training on hard triplets. To address the scarcity of naturally occurring hard negatives in smaller datasets, the authors introduce Embedding Augmentation.

The proposed two-stage training architecture featuring audio/visual encoders and embedding augmentation.

Instead of augmenting raw input data (like flipping an image), this method performs linear interpolation between existing data points of the same class within the embedding space. By creating these synthetic points, the model can "mine" for even harder negatives that were not present in the original training set, effectively densifying the landscape of the embedding space.

Experimental Results

The proposed method was evaluated on two standard benchmarks: the AVE (Audio-Visual Event) dataset and the VEGAS dataset.

  • AVE Dataset: The model achieved a Mean Average Precision (MAP) of 0.431, representing a significant 9.8% improvement over the previous state-of-the-art (MSNSCA).
  • VEGAS Dataset: The model reached a MAP of 0.830, outperforming other triplet-loss-based methods like ACMR.

Qualitative analysis further supported these metrics. In a case study involving "rail transport" queries, the two-stage model successfully retrieved more correct matches than its single-stage counterparts, demonstrating a superior ability to distinguish between subtle cross-modal similarities.

Key Insights and Discussion

Several critical findings emerged from this research:

  1. Curriculum Order Matters: The "Semi-to-Hard" progression significantly outperformed "Hard-to-Semi" or training on all triplets simultaneously. This confirms that building a foundational understanding before tackling difficult cases is essential for cross-modal tasks.
  2. The Goldilocks Zone of Augmentation: The number of synthetic points generated ($\gamma$) is a sensitive hyperparameter. The researchers found that generating exactly two synthetic points per pair was the "sweet spot"; exceeding this number introduced noise that degraded performance.
  3. Interpolation as Discovery: Embedding-level interpolation proved to be a powerful tool for discovering informative training cases that raw data augmentation might miss.

Conclusion and Future Work

By combining curriculum learning with synthetic embedding augmentation, this two-stage approach provides a robust framework for improving audio-visual retrieval. While the current method uses a fixed epoch-based transition between stages, future iterations may explore adaptive curricula that transition based on real-time model proficiency. Additionally, optimizing the computational overhead of synthetic point generation remains an area for further refinement.

Summary updated

Abstract

The cross-modal retrieval model leverages the potential of triple loss optimization to learn robust embedding spaces. However, existing methods often train these models in a singular pass, overlooking the distinction between semi-hard and hard triples in the optimization process. The oversight of not distinguishing between semi-hard and hard triples leads to suboptimal model performance. In this paper, we introduce a novel approach rooted in curriculum learning to address this problem. We propose a two-stage training paradigm that guides the model's learning process from semi-hard to hard triplets. In the first stage, the model is trained with a set of semi-hard triplets, starting from a low-loss base. Subsequently, in the second stage, we augment the embeddings using an interpolation technique. This process identifies potential hard negatives, alleviating issues arising from high-loss functions due to a scarcity of hard triples. Our approach then applies hard triplet mining in the augmented embedding space to further optimize the model. Extensive experimental results conducted on two audio-visual datasets show a significant improvement of approximately 9.8% in terms of average Mean Average Precision (MAP) over the current state-of-the-art method, MSNSCA, for the Audio-Visual Cross-Modal Retrieval (AV-CMR) task on the AVE dataset, indicating the effectiveness of our proposed method.
BibTeX
@misc{zeng2023two,
  author = {Donghuo Zeng and Kazushi Ikeda},
  title = {{Two-Stage Triplet Loss Training with Curriculum Augmentation for Audio-Visual Retrieval}},
  year = {2023},
  eprint = {2310.13451},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.13451},
}
Figure