Introduction
In specialized audio processing domains such as speaker recognition or rare acoustic event detection, the scarcity of labeled data presents a significant hurdle. Few-shot learning (FSL) has emerged as a solution, enabling models to recognize novel classes from a minimal number of examples. However, standard approaches like Prototypical Networks often falter in extreme "one-shot" scenarios. This paper introduces Episodic Triplet Mining (ETM), a novel framework that enhances few-shot classification by preserving data variance and effectively leveraging unlabeled data through semi-supervised learning.
The Challenge: Variance and Overfitting
The current industry standard for FSL, the Prototypical Network, represents each class by the mean embedding of its support samples. In one-shot learning, this "prototype" is merely a single sample, causing the model to lose critical information about class variance. While traditional triplet loss—which compares an anchor to positive and negative samples—could theoretically address this, it often leads to a combinatorial explosion of possible triplets, resulting in unstable training and severe overfitting.
Episodic Triplet Mining (ETM)
To overcome these limitations, the authors propose ETM. Instead of mining triplets across the entire dataset, ETM restricts the process to individual training "episodes"—small, randomized subsets of classes and queries.
As shown in the figure above, for every query (anchor), the system computes a distance matrix against the support set. It then identifies the $n_P$ farthest positives (hard positives) and $n_N$ nearest negatives (semi-hard negatives). By allowing an anchor to interact with all negatives in an episode simultaneously, ETM ensures stable updates and prevents the network from memorizing specific triplets, thereby mitigating overfitting.
Leveraging Unlabeled Data
The framework is further extended to semi-supervised learning using an episodic pseudo-labeling technique. In each training episode, the model predicts labels for a batch of unlabeled data based on the current support set. These pseudo-labeled samples are merged with the actual support set to compute the ETM loss. Interestingly, the authors found that the inherent noise in these pseudo-labels acts as a regularizer, delaying overfitting by ensuring a non-zero loss is consistently backpropagated.
Experimental Evaluation
The approach was tested on two distinct tasks: Speaker Recognition (VCTK corpus) and Audio Event Classification (FSD 2018). ETM demonstrated significant gains over baseline Prototypical Networks, particularly in one-shot settings.
Key results include:
- Superior Accuracy: On the FSD 2018 5-way 1-shot task, ETM achieved 78.53% accuracy, outperforming Prototypical loss (75.33%). On the more challenging VCTK 20-way 1-shot task, ETM reached 67.40%, a massive improvement over the 56.23% achieved by Prototypical loss.
- Semi-Supervised Efficiency: When trained with only 33% labeled data, the semi-supervised ETM model achieved 85.41% accuracy on a 5-way 1-shot task, nearly matching the "top-line" performance of a model trained on 100% labeled data (86.66%).
Conclusion
Episodic Triplet Mining provides a robust alternative to Prototypical Networks for few-shot audio classification. By confining triplet mining to episodic boundaries and utilizing pseudo-labeled data, the model preserves variance and scales effectively with minimal supervision. While the current implementation requires a supervised "warm start" to ensure pseudo-label accuracy, ETM represents a significant step toward practical, data-efficient audio recognition systems.
Summary updated