Constructing Multiple Tasks for Augmentation: Improving Neural Image Classification with K-Means Features

Tao Gui, Lizhi Qing, Qi Zhang, Jiacheng Ye, Hang Yan, Zichu Fei, Xuanjing Huang

Introduction

Multi-task learning (MTL) has long been a staple of deep learning, allowing models to improve generalization by learning a shared representation across multiple related objectives. However, MTL typically requires multiple labeled datasets, creating a "cold start" problem for researchers working with a single labeled source. While manually designed auxiliary tasks—such as predicting image rotation or colorization—can help, they are often domain-specific and labor-intensive. Furthermore, poorly chosen auxiliary tasks can lead to "negative transfer," where noise from the secondary task degrades performance on the primary objective.

This paper introduces a novel framework to automate task construction and protect models from negative transfer. By combining unsupervised $k$-means clustering with a meta-learning wrapper (Meta-MTL), the authors demonstrate how to generate diverse "pseudo-tasks" that consistently boost classification performance.

Methodology: Automatic Task Generation and Meta-MTL

The proposed pipeline consists of two distinct stages: task generation and meta-optimization.

1. Automatic Task Generation via $k$-means

To create auxiliary tasks without manual labeling, the authors leverage unsupervised embeddings. Images are first mapped into a latent space using an autoencoder or a self-supervised model like DeepCluster. The core innovation lies in running $k$-means clustering on these embeddings multiple times. To ensure the resulting tasks are diverse and capture different semantic features, the authors apply random scaling or select random subsets of dimensions before each clustering run. Each unique partition of the data serves as a "pseudo-label" set for a new auxiliary classification task.

2. The Meta-MTL Framework

Standard MTL minimizes the joint loss of all tasks simultaneously. To prevent noisy or irrelevant auxiliary tasks from harming the main model, the authors adapt the Model-Agnostic Meta-Learning (MAML) framework.

The Meta-MTL architecture illustrates the flow from input images to hidden vectors, multiple clustering partitions, and the meta-gradient update process.

As shown in the architecture diagram above, the model's shared layers are updated based on a meta-objective: how well they facilitate performance on the main task after a simulated fine-tuning step on an auxiliary task. This ensures that the shared features being learned are specifically those that translate to gains on the primary classification goal, effectively filtering out "task noise."

Key Insights

  • Semantic Clustering: Visual inspection of the $k$-means clusters reveals that they often capture human-recognizable features, such as grouping animal heads or specific character stroke patterns, providing a meaningful signal for the model to learn.
  • Diversity through Randomness: By viewing the data through different "lenses" (via random scaling during clustering), the model is forced to learn a richer set of features, preventing the backbone from overfitting to any single attribute.
  • Meta-Learning as a Filter: The Meta-MTL approach acts as a gatekeeper. If a cluster is based on irrelevant features (like background color), the meta-optimization objective will naturally down-weight its influence because it fails to improve performance on the main task.

Experimental Results and Scalability

The researchers evaluated Meta-MTL across several benchmarks, including Omniglot, MNIST (in a low-data 1% label regime), CIFAR-10, and miniImageNet. The method consistently outperformed both Single Task Learning (STL) and standard MTL baselines. For instance, on Omniglot, the model achieved 74.80% accuracy, a 9% jump over the STL baseline.

One of the most significant findings is the model's robustness to the number of auxiliary tasks. In standard MTL, adding more tasks—especially noisy ones—often leads to a performance plateau or decline.

Accuracy comparison between Meta-MTL and standard MTL as the number of auxiliary decoders increases.

As illustrated in the plot above, Meta-MTL (using $k$-means labels) shows an upward trend in accuracy as the number of decoders increases, whereas standard MTL methods see performance drop. This demonstrates that the meta-learning wrapper successfully leverages additional data partitions to improve the shared backbone without succumbing to negative transfer.

Conclusion

By automating the creation of auxiliary tasks and using meta-learning to manage their influence, this work provides a scalable way to improve image classification when labels are scarce. While the approach is computationally more intensive than standard training due to higher-order gradients, its ability to extract semantic value from unsupervised clusters makes it a powerful tool for robust representation learning. Future work may explore extending this $k$-means augmentation strategy to other domains such as Natural Language Processing.

Summary updated

BibTeX
@inproceedings{gui2020constructing,
  author = {Tao Gui and Lizhi Qing and Qi Zhang and Jiacheng Ye and Hang Yan and Zichu Fei and Xuanjing Huang},
  title = {{Constructing Multiple Tasks for Augmentation: Improving Neural Image Classification with K-Means Features}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  doi = {10.1609/aaai.v34i07.6719},
}
Figure