Knowledge-Aware Meta-learning for Low-Resource Text Classification

Huaxiu Yao, Yingxin Wu, Maruan Al-Shedivat, Eric P. Xing

Abstract

Meta-learning has emerged as a powerful paradigm for low-resource text classification, yet it often struggles with the distribution gap between training and testing tasks. When a model encounters novel entities or concepts during inference, its performance degrades. We introduce Knowledge-Aware Meta-learning (KGML), a framework that augments sentences with external knowledge from structured bases like WordNet. By constructing sentence-specific knowledge graphs and processing them via Graph Neural Networks, KGML provides the necessary global context to bridge the generalization gap. Our experiments demonstrate that KGML consistently improves performance across gradient-based, metric-based, and unsupervised meta-learning settings.

Introduction

The core promise of meta-learning is rapid adaptation to new tasks with minimal data. However, in natural language processing (NLP), this adaptation is frequently hindered by vocabulary shifts. For instance, a model meta-trained on political news may fail when applied to cryptocurrency news because it lacks the semantic context for specialized entities. Standard meta-learning algorithms are "blind" to information outside their training tasks. KGML addresses this by integrating an external "source of truth"—a Knowledge Base (KB)—to relate novel terms to a broader semantic framework.

Methodology

The KGML framework operates in three distinct stages: extraction, representation, and fusion.

1. Sentence-Specific KG Extraction

For each input sentence, the model identifies key entities and retrieves related concepts from WordNet. To overcome the inherent sparsity of raw KBs, the graph is "densified" by adding edges based on k-Nearest Neighbors (k-NN) in a semantic embedding space. A Minimum Spanning Tree (MST) algorithm is then employed to extract the most informative and concise paths between entities, ensuring the resulting graph is both dense and relevant.

Figure 1: Example of sentence-specific knowledge graph extraction, showing original entities (red) and extracted context (blue) linked via semantic relationships.

2. Graph Representation and Fusion

The extracted graph is processed using a Graph Neural Network (specifically GraphSAGE) to generate a holistic vector representation ($g_{i,j}$). Simultaneously, the original text is encoded using a transformer model like BERT or ALBERT. A learned aggregator then fuses these two representations, creating a "knowledge-aware" embedding that captures both local context and global semantic relationships.

Figure 4: The KGML architecture for (a) Supervised Adaptation and (b) Unsupervised Adaptation, illustrating the integration of BERT and GNN branches.

Experimental Evaluation

KGML was evaluated on three benchmarks: Amazon Reviews (product category classification), Huffpost (news headline categorization), and Twitter (unsupervised federated sentiment analysis).

Key Results

  • Supervised Learning: In 1-shot classification on the Amazon dataset, KGML-ProtoNet achieved 58.62% accuracy, a significant improvement over the 55.32% baseline. On Huffpost, KGML-MAML reached 44.29%, compared to 39.95% for standard MAML.
  • Unsupervised Adaptation: On the Twitter dataset, KGML achieved 67.00% accuracy. Notably, the framework restored performance to the ARM baseline, which otherwise struggled to outperform simple empirical risk minimization.
  • Ablation Studies: Results confirmed that both k-NN densification and the specialized aggregator are critical; removing either component led to a measurable drop in classification accuracy.

Discussion and Conclusion

The primary insight of this work is that external knowledge serves as a semantic bridge. By mapping unknown entities to their "ancestry" (e.g., hypernyms or derivations), KGML allows models to generalize from known concepts to novel ones. While the construction of per-sentence graphs introduces a slight increase in computational overhead (e.g., increasing meta-training time from 0.3s to 0.4s per task), the accuracy gains justify the cost in low-resource scenarios. Future work may explore the integration of multiple, domain-specific knowledge bases to further enhance representation quality.

Summary updated

BibTeX
@inproceedings{yao2021knowledge,
  author = {Huaxiu Yao and Yingxin Wu and Maruan Al-Shedivat and Eric P. Xing},
  title = {{Knowledge-Aware Meta-learning for Low-Resource Text Classification}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.136},
}
Figure