Rethinking and Improving Student Learning and Forgetting Processes for Attention based Knowledge Tracing Models

Youheng Bai, Xueyi Li, Zitao Liu, Yaying Huang, Mi Tian, Weiqi Luo

Introduction

Knowledge Tracing (KT) is a fundamental task in personalized education, aimed at modeling a student's evolving mastery of various topics based on their historical performance. As students interact with educational platforms, they generate a sequence of correct and incorrect responses to questions associated with specific knowledge components.

The Knowledge Tracing process: mapping student responses to knowledge components over a sequence of timesteps.

While attention-based models like Transformers have significantly advanced the state-of-the-art in KT, they often struggle with two critical aspects: oversimplified modeling of the forgetting process and poor generalization to long interaction sequences (the "length extrapolation" wall).

The Challenge of Forgetting and Extrapolation

Existing KT models typically assume that forgetting follows a rigid, uniform exponential decay. However, human memory is more nuanced; different materials are forgotten at different rates, and the relevance of past problems to current ones is often confounded with temporal decay. Furthermore, models trained on short interaction windows often fail when applied to students with extensive histories, losing the ability to track long-term knowledge retention.

LefoKT: Relative Forgetting Attention

To address these limitations, the authors introduce LefoKT, a framework centered on Relative Forgetting Attention (RFA). Instead of relying on hand-crafted decay functions, RFA leverages Relative Positional Encodings (RPEs) to model forgetting.

Architectural comparison of attention mechanisms: (a) standard Self-Attention, (b) Relation-aware Attention, (c) Monotonic Attention, and (d) the proposed Relative Forgetting Attention.

The core innovation lies in decoupling content relevance from temporal decay:

  • Temporal Bias via RPEs: RFA injects a temporal bias directly into attention scores using RPEs. This allows the model to separate what is being learned from when it was learned.
  • Multi-Head Forgetting: By utilizing multi-head attention, different heads can learn distinct forgetting curves—some capturing short-term "cramming" effects while others track long-term mastery.
  • Length Extrapolation: Because RPEs depend on relative distances rather than absolute positions, LefoKT can handle sequences significantly longer than those encountered during training without performance degradation.

Evaluation and Key Insights

LefoKT was evaluated on three benchmark datasets: AL2005 (Algebra), BD2006 (Bridge to Algebra), and NIPS34 (mathematics questions from Eedi). The researchers tested various RPE methods, including ALiBi (linear decay) and KERPLE (power-law decay), finding that these modern encodings naturally mimic psychological forgetting curves like the Ebbinghaus curve.

Key findings include:

  • State-of-the-Art Performance: LefoKT variants consistently outperformed established baselines like AKT and SAKT. On the BD2006 dataset, LefoKT with ALiBi improved AUC by approximately 0.4% over standard AKT.
  • Superior Extrapolation: When trained on 200 interactions but tested on up to 1,000, LefoKT maintained a stable AUC, whereas standard models saw significant performance drops.
  • Redundancy: Interestingly, adding RPEs to models that already had explicit forgetting modules (like AKT) decreased performance, suggesting that RPEs are inherently sufficient for capturing forgetting dynamics.

Conclusion

LefoKT demonstrates that modeling forgetting through relative positional biases is a powerful and flexible approach for Knowledge Tracing. By moving away from rigid decay functions, the model achieves better predictive accuracy and handles long-term student histories more robustly. Future work may involve incorporating real-world time gaps and making decay rates dynamic based on the difficulty of specific knowledge components.

Summary updated

BibTeX
@inproceedings{bai2025rethinking,
  author = {Youheng Bai and Xueyi Li and Zitao Liu and Yaying Huang and Mi Tian and Weiqi Luo},
  title = {{Rethinking and Improving Student Learning and Forgetting Processes for Attention based Knowledge Tracing Models}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i27.34998},
}
Figure