# Task-Focused Consolidation with Spaced Recall: Making Neural Networks learn like college students

## Abstract

Deep neural networks often suffer from a critical limitation known as catastrophic forgetting, where performance on past tasks degrades after learning new ones. This paper introduces a novel continual learning approach inspired by human learning strategies like Active Recall, Deliberate Practice, and Spaced Repetition, named **Task-Focused Consolidation with Spaced Recall (TFC-SR)**. TFC-SR enhances the standard experience replay framework with a mechanism we term the **Active Recall Probe**. It is a periodic, task-aware evaluation of the model’s memory that stabilizes the representations of past knowledge. We test TFC-SR on the Split MNIST and the Split CIFAR-100 benchmarks against leading regularization-based and replay-based baselines. Our results show that TFC-SR performs significantly better than these methods. For instance, on the Split CIFAR-100, it achieves a final accuracy of **13.17%** compared to Standard Experience Replay’s 7.40%. We demonstrate that this advantage comes from the stabilizing effect of the probe itself, and not from the difference in replay volume. Additionally, we analyze the trade-off between memory size and performance and show that while TFC-SR performs better in memory-constrained environments, higher replay volume is still more effective when available memory is abundant. We conclude that TFC-SR is a robust and efficient approach, highlighting the importance of integrating active memory retrieval mechanisms into continual learning systems.

## Key Results

The primary finding of this work is that TFC-SR, our proposed method, consistently outperforms strong continual learning baselines on the challenging Split CIFAR-100 benchmark. The "Active Recall Probe" mechanism provides a significant performance boost over standard replay methods.

![Main Comparison Plot](figures/cifar_tfc_vs_all.png)
*Figure: Final performance comparison on Split CIFAR-100.*

## Setup and Installation

This project was developed using Python 3.10 and PyTorch. All dependencies are listed in the `requirements.txt` file.

1.  **Create an environment:**
    It is recommended to use a virtual environment (e.g., venv or conda).

2.  **Install dependencies:**
    ```bash
    pip install -r requirements.txt
    ```

## How to Use

The repository is structured to easily reproduce all experiments and figures from the paper.

*   **To run all experiments from scratch:** Open and run the cells in `experiments_mnist.ipynb` and `experiments_cifar100.ipynb`. Please note that training on the CIFAR-100 benchmark is computationally intensive and requires a GPU.

*   **To visualize the final results:** Open and run the `plots_and_results.ipynb` notebook. This notebook loads the pre-computed results data from the `results/` directory and generates all the figures presented in the paper.

## Additional Output-Logged Notebooks

In addition to the clean experiment notebooks, we are including the following notebooks with preserved outputs (training logs, per-epoch accuracy, losses, and system messages) for transparency and reproducibility:

*   experiments_mnist_with_outputs.ipynb

*   experiments_cifar100_with_outputs.ipynb

These notebooks are functionally identical to the cleaned versions but include full outputs from the original experiment runs. They are provided as:

*   Proof of execution

*   A way to inspect fine-grained training behavior

*   A resource for reviewers interested in verifying the logs or internal diagnostics

These output-logged notebooks are not required to reproduce any results, but are included for completeness and transparency. If you wish to re-run the experiments from scratch, please refer to the clean versions (experiments_mnist.ipynb, experiments_cifar100.ipynb).