---
title: 'MemoryKT: Integrative Memory and Forgetting for KT'
url: https://www.emergentmind.com/topics/memorykt
type: topic
---

# MemoryKT: Integrative Memory and Forgetting for KT

memoryKT refers to "MemoryKT: An Integrative Memory-and-Forgetting Method for Knowledge Tracing," a neural architecture designed to model human-like memory encoding, storage, retrieval, and personalized forgetting within the context of student knowledge tracing. It introduces a temporal variational autoencoder (VAE) framework integrated with recurrent neural networks, explicitly simulating core cognitive memory processes for improved accuracy, interpretability, and individualization of student modeling [2508.08122].

## 1. Conceptual Foundations and Core Processes

MemoryKT formalizes the three principal processes of cognitive memory—encoding, storage with forgetting, and retrieval—as a unified, mechanistic approach to knowledge tracing (KT). Traditional KT methods, such as DKT or AKT, typically impose a single-stage or monolithic memory formulation, limiting their fidelity in simulating human memory dynamics. In contrast, MemoryKT decomposes the temporal evolution of a student’s mastery into:

- **Encoding**: Transformation of observed interaction data (e.g., exercise correctness/response, question concept) into a latent feature distribution.
- **Storage (with Personalized Forgetting)**: Modulation and maintenance of latent states over inter-event intervals, explicitly accounting for personalized decay rates modulated by correctness, difficulty, and elapsed time.
- **Retrieval**: Reconstruction and predictive usage of latent memory representations to model expected future student responses.

This triadic structure is operationalized via a temporal VAE and sequential recurrence, approximating the observed heterogeneity and asymmetry of human memory trajectories unavailable to prior approaches.

## 2. Model Architecture and Mathematical Specification

MemoryKT fuses a temporal variational autoencoder with an LSTM backbone to instantiate dynamic memory transitions. The principal components at each time step $t$ are:

- **Encoder**: Input $x_t$ (embedding of concept $c_t$ and correctness $r_t$), together with prior hidden state $h_{t-1}$, determines posterior parameters
$$q(z_t \mid x_t, h_{t-1}) = \mathcal{N}(z_t\;;\;\mu_{\mathrm{enc}}^t, \mathrm{diag}((\sigma_{\mathrm{enc}}^t)^2)).$$
- **Prior**: Conditioned on $h_{t-1}$, the prior takes the form
$$p(z_t \mid h_{t-1}) = \mathcal{N}(z_t\;;\;\mu_{\mathrm{prior}}^t, \mathrm{diag}((\sigma_{\mathrm{prior}}^t)^2)).$$
- **Latent Sampling**: $z_t$ is sampled using the reparameterization trick.
- **Decoder**: $z_t$ and $h_{t-1}$ reconstruct $x_t$ as
$$p(x_t \mid z_t, h_{t-1}) = \mathrm{Bernoulli}(\widehat{x}_t) \ \text{or} \ \mathcal{N}(\widehat{x}_t, I),$$
where $\widehat{x}_t$ is obtained by passing combined latent and recurrent features through a non-linear decoder.
- **Personalized Forgetting**: Storage strength is dynamically modulated by a per-student, per-concept forgetting score $f_t$ that depends on correctness history, difficulty, and elapsed time ($\Delta \tau$), normalized across the population to percentile bands $L_t \in [1,10]$.

The total objective function optimizes:
\[
\mathcal{L} = \lambda_{rec}\mathcal{L}_{recon} + \lambda_{kld}\mathcal{L}_{KL} + \mathcal{L}_{pred}
\]
where the three terms are, respectively, input reconstruction loss, KL divergence between the posterior and prior, and binary cross-entropy for next-response prediction.

## 3. Personalized Forgetting Module

A central innovation in MemoryKT is the individualized forgetting mechanism, which contrasts with uniform decay models. For each student $s$ and concept $c$, the forgetting score $S_s$ is recursively updated upon each interaction:
\[
S_s \leftarrow S_s + \frac{\Delta S(r_t, d_{c_t}, \Delta\tau, r_{prev})}{N}
\]
where $N$ counts total responses. $\Delta S$ increases with correct answers on harder or more temporally distant exercises and decreases more sharply after incorrect answers, particularly if following recent correct responses to easy questions. Population normalization maps $S_s$ to cohort-based percentiles $L_t$, discretized into 10 bins, allowing interpretable tracking and embedding as model features.

This approach allows MemoryKT to estimate and utilize individual “memory ability” on a granular, time-varying basis, facilitating high-resolution student modeling and interpretability.

## 4. Training Regimen, Inference, and Hyperparameters

- **Optimization**: Adam optimizer, learning rate $10^{-3}$, weight decay $10^{-5}$, dropout $0.1$.
- **Hyperparameters**: Embedding dimension 64, LSTM hidden size 128, VAE latent size 32.
- **Training Protocol**: Early stopping based on validation AUC, maximum 200 epochs, regularization by tuning $\lambda_{kld}$ (1.0–2.0) and $\lambda_{rec}$ (0.1–1.0).
- **Inference Workflow**: Each new $(c_t, r_t, t_t)$ computes $x_t \to$ posterior, samples $z_t$, decodes $x_t$ (training), computes $L_t$ (forgetting), updates LSTM, and predicts $p_{t+1}$.

## 5. Empirical Evaluation and Benchmarking

MemoryKT was validated on four public benchmarks: ASSIST09, ASSIST15, AL2005, and POJ. It was compared against deep (DKT, DKVMN), attention-based (SAKT, SAINT), memory-augmented (AKT, ATKT, GKT, KQN, ReKT), and rule-based KT baselines. Evaluation primarily used AUC and accuracy.

| Dataset     | MemoryKT AUC | Best Baseline (AUC) | Δ AUC   | MemoryKT ACC | Best Baseline (ACC) | Δ ACC     |
|-------------|--------------|---------------------|---------|--------------|---------------------|-----------|
| ASSIST09    | 0.8534       | AKT: 0.8474         | +0.0060 | 0.7974       | 0.7772              | +0.0202   |
| ASSIST15    | 0.7476       | AKT: 0.7281         | +0.0195 | 0.7590       | 0.7521              | +0.0069   |
| AL2005      | 0.8437       | ReKT: 0.8275        | +0.0162 | 0.8117       | 0.8164              | –0.0047   |
| POJ         | 0.6186       | (4th place)         | n/a     | 0.6473       | (4th)               | n/a       |

On the two large ASSISTments datasets, MemoryKT achieved the largest performance gains, supporting the hypothesis that explicit and personalized memory/forgetting modeling yields measurable improvement [2508.08122].

## 6. Interpretability and Cognitive Validity

MemoryKT provides interpretable, individualized “forgetting curves” ($L_t$ over time) for each student, modeling cognitive variability across users. Case studies on the ASSIST15 dataset demonstrated:

- A high Pearson correlation ($r \approx 0.75$) between normalized sequence reconstruction error and forgetting score, suggesting alignment between learnable memory features and measurable memory ability.
- Positive correlation ($r \approx 0.68$) between reconstruction fidelity and observed student response accuracy, indicating that the latent space encodes meaningful mastery gradients.

These findings illustrate that MemoryKT’s design supports both predictive performance and cognitive plausibility—a feature not typically available in prior KT systems.

## 7. Limitations and Comparative Positioning

MemoryKT’s modeling paradigm requires structured, response-level interaction data and explicit concept/difficulty annotations. On datasets lacking rich concept embedding (e.g., POJ), it underperforms other models. The percentile-based forgetting score discretization may also obscure more nuanced, continuous differences in forgetting dynamics at the extremes.

Compared with baselines, MemoryKT distinguishes itself by unifying sequential latent variable modeling with interpretable, personalized forgetting, supporting both predictive and diagnostic use cases in educational data mining and cognitive modeling.

Source: https://www.emergentmind.com/topics/memorykt