SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2512.03125 · NeurIPS · 2025

Mitigating Intra-and Inter-modal Forgetting in Continual Learning of Unified Multimodal Models

Radu Marculescu, Xiwen Wei, Mustafa Munir

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2512.03125.json · badge: /api/ran/2512.03125.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
Christina200/MoDE-official canonical (classifier label)
classifier basis: census
5 ran · 1 no recorded run
FunctionStatusWhere it lives
calculate_accuracy_and_stderr Ran
ran, honoured the contract we drafted
Christina200/MoDE-official/evaluation/eval_utils.py
code served (permissive licence) · get_code("1b18c796c4da6ae8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# The function takes a 'scores' parameter which should be array-like
# It converts it to a numpy array and computes mean and standard error
# So we need to provide a list or array of numeric scores

scores_list = [0.85, 0.92, 0.88, 0.90, 0.87, 0.91]

ARGS = {
    "scores": scores_list
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
list_images Ran
ran; our contract draft was wrong, not the code
Christina200/MoDE-official/evaluation/eval_utils.py
code served (permissive licence) · get_code("854ba9a561fa7dbd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile
import shutil

# Create a temporary directory with test image files
temp_dir = tempfile.mkdtemp()

# Create some dummy image files with valid extensions
image_names = ['image1.png', 'image2.jpg', 'photo.jpeg', 'data.tiff', 'pic.JPG']
for name in image_names:
    open(os.path.join(temp_dir, name), 'w').close()

# Also add some non-image files that should be filtered out
open(os.path.join(temp_dir, 'readme.txt'), 'w').close()
open(os.path.join(temp_dir, 'data.csv'), 'w').close()

ARGS = {
    'image_dir': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
scienceqa_correct Ran
ran, violated the contract we drafted
Christina200/MoDE-official/evaluation/eval_vqa_pretrained.py
code served (permissive licence) · get_code("869f6f4db09216c0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re
import string

# The function scienceqa_correct takes three string parameters:
# - question: a string containing multiple choice options in format "A. option text\nB. option text\n..."
# - answer: a string representing the gold letter answer (a-d)
# - generated_text: a string representing the generated response to evaluate

# Construct valid test arguments
question = """A. The process of photosynthesis
B. The breakdown of glucose for energy
C. The replication of DNA
D. The transportation of nutrients"""

answer = "b"

generated_text = "The answer is B. The breakdown of glucose for energy"

ARGS = {
    "question": question,
    "answer": answer,
    "generated_text": generated_text
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
score_response Ran
ran, violated the contract we drafted
Christina200/MoDE-official/evaluation/eval_vqa_pretrained.py
code served (permissive licence) · get_code("691bd3c0dd9dd186")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re
import string

# Based on the function signature:
# score_response(task_id, question, answer, generated_text)
# 
# The function uses:
# - task_id: string, checked with .lower() and 'in' operator
# - question: string, passed to scienceqa_correct which uses re.findall to extract options
# - answer: string, used as reference answer
# - generated_text: string, the generated response to evaluate

ARGS = {
    'task_id': 'ScienceQA',
    'question': 'Which of the following is a mammal?\nA. Dog\nB. Fish\nC. Bird\nD. Lizard',
    'answer': 'a',
    'generated_text': 'The answer is A. Dog'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
tokenwise_kl_topk_chunked Ran
ran; our contract draft was wrong, not the code
Christina200/MoDE-official/training/distillation_trainer.py
code served (permissive licence) · get_code("01a77f51f77e049d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# Construct tiny tensors for the function
batch_size = 2
seq_length = 5
vocab_size = 4

student_logits = torch.randn(batch_size, seq_length, vocab_size)
teacher_logits = torch.randn(batch_size, seq_length, vocab_size)

# Optional attention mask - shape [B, S]
attn_mask = torch.ones(batch_size, seq_length, dtype=torch.bool)

ARGS = {
    "student_logits": student_logits,
    "teacher_logits": teacher_logits,
    "T": 1.0,
    "K": 2,
    "chunk_size": 2,
    "attn_mask": attn_mask,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
distill_collate_fn Not yet run
unverified (harvested, no recorded run)
Christina200/MoDE-official/training/data.py
code served (permissive licence) · get_code("0bf728f37d3eb489")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Unified Multimodal Generative Models (UMGMs) unify visual understanding and image generation within a single autoregressive framework. However, their ability to continually learn new tasks is severely hindered by catastrophic forgetting, both within a modality (intra-modal) and across modalities (inter-modal). While intra-modal forgetting has been studied in prior continual learning (CL) work, inter-modal forgetting remains largely unexplored. In this paper, we identify and empirically validate this phenomenon in UMGMs and provide a theoretical explanation rooted in gradient conflict between modalities. To address both intra-and inter-modal forgetting, we propose Modality-Decoupled Experts (MoDE), a lightweight and scalable architecture that isolates modality-specific updates to mitigate the gradient conflict and leverages knowledge distillation to prevent catastrophic forgetting and preserve pre-trained capabilities. Unlike previous CL methods that remain modality-coupled and suffer from modality gradient conflict, MoDE explicitly decouples modalities to prevent interference. Experiments across diverse benchmarks demonstrate that MoDE significantly mitigates both inter-and intra-modal forgetting, outperforming prior CL baselines in unified multimodal generation settings. Codes are publicly available: https://github.com/Christina200/MoDE-official.git. 39th Conference on Neural Information Processing Systems (NeurIPS 2025).

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2512.03125")
get_code_for_paper("2512.03125")
have("2512.03125")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2512.03125.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2512.03125.svg)](https://syntology.ai/paper/2512.03125)

Connect an agent — have() is free.