SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2308.03300 · ICML · 2023

Do You Remember? Overcoming Catastrophic Forgetting for Fake Audio Detection

Chenglong Wang, Xiaohui Zhang, Jiangyan Yi, Jianhua Tao, Chuyuan Zhang

arXiv · PDF · Open in the Atlas

Code that ran

1 of 5 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; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 0 failures of our instrument; 4 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2308.03300.json · badge: /api/ran/2308.03300.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
Cecile-hi/Regularized-Adaptive-Weight-Modification canonical (classifier label)
classifier basis: classifier_2025
0 ran · 2 no recorded run
cecile-hi/regularized-adaptive-weight-modification marked official in Papers with Code
Papers with Code archive
1 ran · 2 no recorded run
FunctionStatusWhere it lives
StrategyCallbacks Ran
ran on a synthesized input
cecile-hi/regularized-adaptive-weight-modification/avalanche/training/plugins/rawm.py
code served (permissive licence) · get_code("cfd0a16ae683ecb5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned NoneType. The image it ran in was not recorded. If your copy returns the same type 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.

from abc import ABC
from typing import Generic, TypeVar

CallbackResult = TypeVar('CallbackResult')

class StrategyCallbacks(Generic[CallbackResult], ABC):
    """
    Strategy callbacks provide access before/after each phase of the training
    and evaluation loops. Subclasses can override the desired callbacks to
    customize the loops. In Avalanche, callbacks are used by
    :class:`StrategyPlugin` to implement continual strategies, and
    :class:`StrategyLogger` for automatic logging.

    For each method of the training and evaluation loops, `StrategyCallbacks`
    provide two functions `before_{method}` and `after_{method}`, called
    before and after the method, respectively.

    As a reminder, `BaseStrategy` loops follow the structure shown below:

    **Training loop**
    The training loop is organized as follows::
        train
            train_exp  # for each experience
                adapt_train_dataset
                train_dataset_adaptation
                make_train_dataloader
                train_epoch  # for each epoch
                    # forward
                    # backward
                    # model update

    **Evaluation loop**
    The evaluation loop is organized as follows::
        eval
            eval_exp  # for each experience
                adapt_eval_dataset
                eval_dataset_adaptation
                make_eval_dataloader
                eval_epoch  # for each epoch
                    # forward
                    # backward
                    # model update
    """

    def __init__(self):
        pass

    def before_training(self, *args, **kwargs) -> CallbackResult:
        """ Called before `train` by the `BaseStrategy`. """
        pass

    def before_training_exp(self, *args, **kwargs) -> CallbackResult:
        """ Called before `train_exp` by the `BaseStrategy`. """
        pass

    def before_train_dataset_adaptation(self, *args, **kwargs) -> CallbackResult:
        """ Called before `train_dataset_adapatation` by the `BaseStrategy`. """
        pass

    def after_train_dataset_adaptation(self, *args, **kwargs) -> CallbackResult:
        """ Called after `train_dataset_adapatation` by the `BaseStrategy`. """
        pass

    def before_training_epoch(self, *args, **kwargs) -> CallbackResult:
        """ Called before `train_epoch` by the `BaseStrategy`. """
        pass

    def before_training_iteration(self, *args, **kwargs) -> CallbackResult:
        """ Called before the start of a training iteration by the
        `BaseStrategy`. """
        pass

    def before_forward(self, *args, **kwargs) -> CallbackResult:
        """ Called before `model.forward()` by the `BaseStrategy`. """
        pass

    def after_forward(self, *args, **kwargs) -> CallbackResult:
        """ Called after `model.forward()` by the `BaseStrategy`. """
        pass

    def before_backward(self, *args, **kwargs) -> CallbackResult:
        """ Called before `criterion.backward()` by the `BaseStrategy`. """
        pass

    def after_backward(self, *args, **kwargs) -> CallbackResult:
        """ Called after `criterion.backward()` by the `BaseStrategy`. """
        pass

    def after_training_iteration(self, *args, **kwargs) -> CallbackResult:
        """ Called after the end of a training iteration by the
        `BaseStrategy`. """
        pass

    def before_update(self, *args, **kwargs) -> CallbackResult:
        """ Called before `optimizer.update()` by the `BaseStrategy`. """
        pass

    def after_update(self, *args, **kwargs) -> CallbackResult:
        """ Called after `optimizer.update()` by the `BaseStrategy`. """
        pass

    def after_training_epoch(self, *args, **kwargs) -> CallbackResult:
        """ Called after `train_epoch` by the `BaseStrategy`. """
        pass

    def after_training_exp(self, *args, **kwargs) -> CallbackResult:
        """ Called after `train_exp` by the `BaseStrategy`. """
        pass

    def after_training(self, *args, **kwargs) -> CallbackResult:
        """ Called after `train` by the `BaseStrategy`. """
        pass

    def before_eval(self, *args, **kwargs) -> CallbackResult:
        """ Called before `eval` by the `BaseStrategy`. """
        pass

    def before_eval_dataset_adaptation(self, *args, **kwargs) -> CallbackResult:
        """ Called before `eval_dataset_adaptation` by the `BaseStrategy`. """
        pass

    def after_eval_dataset_adaptation(self, *args, **kwargs) -> CallbackResult:
        """ Called after `eval_dataset_adaptation` by the `BaseStrategy`. """
        pass

    def before_eval_exp(self, *args, **kwargs) -> CallbackResult:
        """ Called before `eval_exp` by the `BaseStrategy`. """
        pass

    def after_eval_exp(self, *args, **kwargs) -> CallbackResult:
        """ Called after `eval_exp` by the `BaseStrategy`. """
        pass

    def after_eval(self, *args, **kwargs) -> CallbackResult:
        """ Called after `eval` by the `BaseStrategy`. """
        pass


# Concrete subclass for testing
class ConcreteStrategyCallbacks(StrategyCallbacks):
    def __init__(self):
        super().__init__()
        self.call_log = []

    def before_training(self, *args, **kwargs):
        self.call_log.append('before_training')
        return None

    def after_training(self, *args, **kwargs):
        self.call_log.append('after_training')
        return None

    def before_forward(self, *args, **kwargs):
        self.call_log.append('before_forward')
        return None

    def after_forward(self, *args, **kwargs):
        self.call_log.append('after_forward')
        return None


INIT_ARGS = {}

ARGS = {
    'args': (),
    'kwargs': {'test_param': 'test_value'}
}

METHOD = 'before_training'

if __name__ == '__main__':
    # Construct the instance
    instance = ConcreteStrategyCallbacks(**INIT_ARGS)
    
    # Call the method
    result = getattr(instance, METHOD)(*ARGS['args'], **ARGS['kwargs'])
    
    # Verify it works
    print(f"Instance created: {instance}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 NoneType — a NoneType output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a NoneType output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
RAWMPlugin Not yet run
unverified (harvested, no recorded run)
cecile-hi/regularized-adaptive-weight-modification/avalanche/training/plugins/rawm.py
code served (permissive licence) · get_code("0aa3cd8f47268187")
How it ran

no invocation recorded.

StrategyPlugin Not yet run
unverified (harvested, no recorded run)
cecile-hi/regularized-adaptive-weight-modification/avalanche/training/plugins/rawm.py
code served (permissive licence) · get_code("db2373fd76451782")
How it ran

no invocation recorded.

get_offline_protocol_index Not yet run
unverified (harvested, no recorded run)
Cecile-hi/Regularized-Adaptive-Weight-Modification/parse_log_to_result.py
code served (permissive licence) · get_code("12c1e870b8a4a76b")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

get_online_protocol_index Not yet run
unverified (harvested, no recorded run)
Cecile-hi/Regularized-Adaptive-Weight-Modification/parse_log_to_result.py
code served (permissive licence) · get_code("af6d584dfe07e620")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 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 5 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-22.

Repositories linked to this paper

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

Abstract

Current fake audio detection algorithms have achieved promising performances on most datasets. However, their performance may be significantly degraded when dealing with audio of a different dataset. The orthogonal weight modification to overcome catastrophic forgetting does not consider the similarity of genuine audio across different datasets. To overcome this limitation, we propose a continual learning algorithm for fake audio detection to overcome catastrophic forgetting, called Regularized Adaptive Weight Modification (RAWM). When fine-tuning a detection network, our approach adaptively computes the direction of weight modification according to the ratio of genuine utterances and fake utterances. The adaptive modification direction ensures the network can effectively detect fake audio on the new dataset while preserving its knowledge of old model, thus mitigating catastrophic forgetting. In addition, genuine audio collected from quite different acoustic conditions may skew their feature distribution, so we introduce a regularization constraint to force the network to remember the old distribution in this regard. Our method can easily be generalized to related fields, like speech emotion recognition. We also evaluate our approach across multiple datasets and obtain a significant performance improvement on cross-dataset experiments.

For agents

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

get_harvested_code_for_paper("2308.03300")
get_code_for_paper("2308.03300")
have("2308.03300")

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

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

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

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

Connect an agent — have() is free.