Abstract
Few-shot learning (FSL) aims to recognize novel categories with minimal labeled data. While self-supervised pretext tasks are often employed to enhance feature robustness, standard methods fail to distinguish between beneficial and ambiguous augmentations. We propose the Hierarchical Tree Structure-aware (HTS) method, a flexible plug-in that organizes raw and augmented images into a hierarchical tree. By utilizing a Tree-based Long Short-Term Memory (Tree-LSTM) network with adaptive gating, HTS selectively aggregates transferable knowledge while filtering out harmful noise. Experimental results across four benchmarks demonstrate that HTS significantly outperforms baseline models and achieves state-of-the-art performance.
Introduction
The primary bottleneck in few-shot learning is the scarcity of labeled data, which often leads to models overfitting to dataset-specific features rather than learning generalizable semantic concepts. To mitigate this, researchers have turned to pretext tasks—such as predicting image rotation or color permutation—to provide additional supervision. However, conventional approaches typically treat all augmented data equally (Data Augmentation) or as independent tasks (Self-Supervised Learning). This "one-size-fits-all" approach is problematic; for instance, rotating a radially symmetric object provides no new semantic information and may introduce ambiguity. There is a critical need for a mechanism that can adaptively select relevant features from augmented data.
The HTS Framework
The Hierarchical Tree Structure-aware (HTS) method addresses these limitations through a two-stage process: hierarchical construction and gated aggregation.
Hierarchical Tree Construction
For each input image, HTS constructs a tree where the raw image serves as the root node. Subsequent levels of the tree represent different pretext tasks. For example, the first level may consist of various rotations of the root image, while the second level applies color permutations to each rotated instance. This structure explicitly captures the hierarchical relationship between different types of data transformations, moving beyond flat augmentation strategies.
Gated Selection Aggregating
To process the hierarchical data, HTS employs a Tree-based Long Short-Term Memory (Tree-LSTM) network. Unlike standard LSTMs that operate on sequences, the Tree-LSTM aggregates information from child nodes (augmented features) up to the parent node (the refined image representation).
A key feature of this component is the forgetting gate. This gate allows the model to adaptively weight the contribution of each child node. If an augmentation introduces noise or ambiguity—such as a rotation that obscures key features—the gate suppresses its influence, ensuring that only the most useful features are propagated to the final representation.
Evaluation and Results
The HTS module was evaluated on four standard FSL benchmarks: miniImageNet, tieredImageNet, CUB-200-2011, and CIFAR-FS.
Performance Gains
HTS demonstrated remarkable versatility, improving the performance of various backbone algorithms such as ProtoNet, RelationNet, and GNNs. On the miniImageNet dataset, integrating HTS with ProtoNet resulted in a 14.54% increase in 1-shot accuracy and a 10.93% increase in 5-shot accuracy. These gains suggest that the hierarchical filtering of pretext tasks provides a much richer feature set than standard training.
Generalization and Robustness
Cross-domain experiments (e.g., training on miniImageNet and testing on the bird-focused CUB dataset) confirmed that HTS learns features that are truly generalizable across different semantic domains. Furthermore, t-SNE visualizations revealed that HTS produces more distinct and compact clusters in the feature space compared to standard backbones, facilitating more accurate classification.
Discussion and Conclusion
The HTS method highlights the importance of adaptive feature selection in few-shot learning. By structuring pretext tasks hierarchically and employing a gated aggregation mechanism, the model can effectively leverage self-supervision without being misled by noisy augmentations.
While HTS is highly effective, it introduces a slight increase in computational complexity due to the multi-stage forward pass. Future work may focus on optimizing the tree structure or exploring automated methods for selecting the most effective pretext tasks for specific datasets. Overall, HTS provides a robust and flexible solution for enhancing the generalization capabilities of few-shot classification models.
Summary updated