TL;DR
This paper introduces TagRec, a novel method for automatically tagging educational questions with a hierarchical learning taxonomy. By framing the problem as a similarity-based retrieval task and aligning question-answer embeddings with taxonomy labels using a transformer model and a custom loss function, TagRec significantly improves tagging accuracy and demonstrates adaptability to new, unseen labels.
What Problem Does This Paper Address?
Online learning platforms organize vast amounts of educational content, including questions, using hierarchical taxonomies (e.g., Subject > Chapter > Topic). Manually tagging new questions to this structure is time-consuming and doesn't scale. Existing automated methods often treat this as a flat multi-class classification problem, which struggles with:
- Ignoring Hierarchy: They fail to leverage the semantic relationships between different levels of the taxonomy.
- Class Imbalance: Focusing only on leaf nodes can lead to many classes having very few examples.
- Dynamic Taxonomies: New topics emerge, and old ones become obsolete, requiring models to be retrained frequently.
- Limited Semantic Understanding: Traditional methods often miss the nuanced semantic connections between question text and taxonomy labels.
This paper aims to address these limitations by developing a method that can effectively organize questions within a hierarchical structure, adapt to evolving taxonomies, and capture deeper semantic relationships.
Methods
TagRec tackles the problem by reframing it as a similarity-based retrieval task. Instead of directly classifying, it learns to find the most semantically similar taxonomy label for a given question-answer pair. The core components are:
- Question-Answer Augmentation: The question is paired with its answer to provide richer contextual information.
- Transformer-based Embeddings: A BERT model is used to generate contextualized embeddings for the question-answer pairs.
- Hierarchical Label Representation: Taxonomy labels (e.g., "Science - Physics - Electricity") are treated as sentences and embedded using advanced sentence representation methods like Universal Sentence Encoder (USE) or Sentence-BERT. This is crucial for capturing the semantic relatedness between labels.
- Alignment via Loss Function: The key innovation is aligning the question-answer embeddings with the label embeddings. This is achieved by fine-tuning a transformer model using a loss function that combines:
- Cosine Similarity: Maximizes the similarity between the question-answer pair and its correct label.
- Hinge Rank Loss: Minimizes the similarity between the question-answer pair and incorrect labels, with a margin to ensure sufficient separation.
- Pre-computation and Indexing: Label embeddings are pre-computed and indexed, allowing for efficient retrieval during testing.
This approach allows the model to learn a shared vector space where related questions and labels are close to each other, enabling it to handle unseen labels without retraining.
Datasets
The authors evaluated TagRec on three datasets:
- QC-Science: A large dataset of ~47,000 question-answer pairs from the science domain, tagged with subject-chapter-topic labels. This dataset was collected from an e-learning platform.
- ARC: A dataset of ~7,700 multiple-choice science exam questions with 406 hierarchical labels.
- Learning Objectives: A smaller dataset of ~400 learning objectives extracted from K-12 science textbooks, with taxonomies derived from table of contents. This dataset was used to test the model's ability to generalize to related but unseen content.
Key Insights and Ideas
- Similarity over Classification: Reframing the problem as similarity-based retrieval, rather than direct classification, is key to handling dynamic taxonomies and unseen labels.
- Leveraging Sentence Embeddings for Labels: Treating hierarchical labels as sentences and using advanced sentence embedding models (like Sentence-BERT) is far more effective than simple word embedding averaging for capturing label semantics.
- Augmenting with Answers is Beneficial: Including the answer alongside the question provides richer context, leading to better embeddings and improved tagging performance.
- Adaptability is Crucial: The ability to adapt to new labels without retraining is a significant advantage over traditional methods, making the system more practical for real-world educational platforms.
- Generalization to Related Content: The model's success in categorizing learning objectives, which are related but distinct from questions, highlights its strong generalization capabilities.
Key Results
TagRec demonstrated strong performance across the board:
- Significant Improvement: TagRec (using BERT with USE or Sentence-BERT for label embeddings) outperformed various baselines, including flat multi-class classification methods and other state-of-the-art approaches, by up to 6% in Recall@k on the QC-Science and ARC datasets.
- Handling Unseen Labels: In experiments with unseen labels (e.g., "matter→properties of material→reflect"), TagRec successfully predicted the correct label within the top 2 predictions, while other methods failed to even place it within the top 10.
- Generalization to Learning Objectives: When applied to the learning objectives dataset without retraining, TagRec achieved high Recall@1 and Recall@2 scores, outperforming other methods by 7%.
Limitations and Future Work
- Context Limit: While BERT has a context limit of 512 tokens, the authors note that question-answer pairs can sometimes exceed this. They plan to explore models like Longformer to handle longer sequences.
- Hyperbolic Space: The authors suggest exploring hyperbolic space for representing hierarchical labels in future work, as it might better capture the inherent hierarchical structure.
- Domain Specificity: While the method is shown to generalize to related content, its performance on entirely different domains or highly specialized taxonomies might require further investigation.
Summary updated