Continual Learning for General AI: The Challenge of Long-Term Memory

    Continual learning enables AI systems to acquire new knowledge from data and interactions while retaining existing capabilities. This article explains why it is difficult, how it differs from fine-tuning and long-context processing, and how approaches such as test-time training, nested learning, external memory, and incremental fine-tuning address the problem. It also outlines practical engineering workflows, risks, and evaluation considerations.

    1. Why Continual Learning Is Difficult for General AI

    Continual learning refers to a model’s ability to keep acquiring knowledge from new data and interactions after deployment while preserving the capabilities it has already learned. This involves two requirements: learning new information and avoiding the loss of existing knowledge.

    The real world changes rapidly. New products, regulations, and business processes appear continuously. If a model relies only on static pretraining, it can cover the knowledge and rules available up to the end of training. Later changes must be handled through manual updates or external patches.

    Pretraining has two major limitations:

    • Low data efficiency: Humans can often learn a new skill and handle common situations after a small amount of practice. Models typically require much larger datasets to develop similar capabilities, and they may still fail on edge cases.
    • Fixed parameters after training: Corrections, preferences, and experiences learned during a single conversation do not automatically change the model’s future behavior.

    Some researchers consider continual learning an important challenge on the path toward artificial general intelligence (AGI), particularly for long-term tasks in open environments. Because there is no universally accepted definition of AGI, this reflects the view of some researchers rather than a settled consensus.

    Continual learning also introduces new risks. When a model learns from new data, it may overwrite existing capabilities. This is known as catastrophic forgetting. Every update also requires computing resources, evaluation, and rollback mechanisms, making it significantly more expensive than one-time training. If the learning material contains user data, the system must also address authorization, retention periods, and deletion requirements.

    2. Continual Learning vs. Fine-Tuning vs. Long Context

    All three approaches allow a model to use new information to some extent, but they work in different ways.

    Dimension Continual learning Fine-tuning Long context
    What is updated Model parameters or external memory, updated continuously as new data arrives Model parameters, usually updated in batches Nothing in the parameters; information is added to the current input
    Main cost Training, evaluation, versioning, and rollback operations Labeled data and training compute Inference becomes more expensive as the input grows longer
    Forgetting risk High; dedicated safeguards are required Medium; depends on how new and old data are mixed Low, but information is not retained across sessions
    Suitable scenarios Knowledge changes frequently and the system must adapt over time Stable output styles, formats, or domain-specific tasks Analyzing lengthy material within a single session
    Common issues Catastrophic forgetting and memory contamination Data bias and overfitting The model may make less effective use of information in the middle of a long input

    A practical selection process is to assess the problem in order:

    1. If the information is needed only within a single session, prefer long-context processing or retrieval.
    2. If the goal is stable output style or domain-specific expression, consider fine-tuning.
    3. Use continual learning only when the system must adapt across sessions and the team can evaluate the impact of each update.

    3. Test-Time Training and Nested Learning

    Test-Time Training

    Test-time training updates part of a model during inference. The model uses the current input to construct an auxiliary objective, performs a small number of parameter updates, and then generates a prediction. This approach is generally more useful when the input distribution differs substantially from the training data.

    A typical process is:

    1. Select a subset of parameters that can be updated, such as specific layers or adapters.
    2. Construct a self-supervised objective from the current input, such as predicting masked content.
    3. Perform a small number of gradient steps, then generate the prediction.
    4. Decide whether to retain the update. If the model is restored to its original parameters after every inference, errors will not accumulate across multiple predictions.
    5. Record latency and prediction results for later evaluation.

    The cost is increased inference latency, and the updates may be unstable. If the input contains inaccurate or malicious content, it may directly affect the model’s state.

    Nested Learning

    Nested learning is a line of research made public by a Google research team in 2025. According to the related paper, it treats a model as a set of nested optimization problems in which different components are updated at different frequencies. Faster-updating components capture recent information, while slower-updating components consolidate long-term patterns.

    This approach attempts to reduce forgetting at the model-architecture level rather than relying on external patches. Most results remain at the research stage, and engineering validation is limited. Developers should first reproduce the findings on their own evaluation datasets before deciding whether to adopt this approach.

    4. Engineering Approaches: External Memory and Incremental Fine-Tuning

    External Memory

    External memory stores information that needs to be retained over time in a database or vector index. The model retrieves relevant information at runtime. Because this approach does not modify model parameters, it has a lower risk of forgetting and is easier to roll back.

    A minimal workflow is:

    1. Input: Extract candidate facts from each interaction, such as user preferences, business rules, or corrections.
    2. Filtering: Use rules or human review to filter the candidates and remove temporary information and sensitive data.
    3. Writing: Store the source, timestamp, and version number for each memory item, and define an expiration time.
    4. Retrieval: Retrieve the most relevant memory items for the current question and add them to the prompt.
    5. Validation: Use a fixed test set to evaluate answer quality and verify that the new memories have not introduced errors.
    6. Rollback: If validation fails, point retrieval back to the previous version of the memory collection.

    Incremental Fine-Tuning

    Incremental fine-tuning periodically performs small training updates on an existing model using new data. The main challenge is preventing the loss of existing capabilities.

    A recommended workflow is:

    1. Collect new data and perform deduplication, cleaning, and de-identification.
    2. Mix in a portion of old data for replay. Determine the appropriate ratio using a validation set.
    3. Use a lower learning rate or train only low-rank adapters, such as LoRA, to reduce changes to the original parameters.
    4. Evaluate the model on both legacy-task and new-task test sets.
    5. Release the new version only when both sets of metrics meet the required standards. Otherwise, roll back to the previous version.

    5. Metrics for Measuring Learning Performance

    Looking only at accuracy on new tasks cannot show whether the model has forgotten its previous capabilities. Several metrics should be used together, with their calculation methods clearly defined.

    • Average accuracy