All models

CODA-Prompt

Pre-trained ViT with learned prompt components assembled per input, for rehearsal-free continual learning.

Image classification · 794 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (559 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
89.8M
Operations
794
Framework
PyTorch
Recurrent
Yes
Published
CVPR 2023
Cited by
349 (as of 29 October 2026)
Authors
James Seale Smith, Leonid Karlinsky, Vyshnavi Gutta and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m15152
Graph hash
8197b17d574b2f7dc979ad99505aeea24e3750fe5e21df8d6de62f7cf7a278fd
Skeleton hash
905958f927509aa387d21373f8dda9b2603697c4bd9d3d8e9267a1244d896b53
Architecture hash
bec56eb634a75e06ab66630bb13f4d3bb9b09f67c4296f1a842c7009829d9591
Diagram SHA-256
5d48d6343afef5c684e175be9f32e0e739f383800206403ab6864ce911512906
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

CODA-Prompt, short for COntinual Decomposed Attention-based Prompting, is a method for rehearsal-free continual learning. The problem is catastrophic forgetting, which computer vision models suffer when learning new concepts from continuously shifting training data. Typical solutions rehearse previously seen data, which increases memory costs and may violate data privacy.

Earlier prompting approaches for pre-trained vision transformers generate prompts with a key-query mechanism, and the paper's objection is that this mechanism is not trained end-to-end with the task sequence. CODA-Prompt instead learns a set of prompt components that are assembled with input-conditioned weights to produce input-conditioned prompts. The code builds on pre-trained vit_base_patch16_224 weights.

The paper's abstract reports outperforming DualPrompt on established benchmarks by as much as 4.5% in average final accuracy. The authors state that their setting is rehearsal-free class-incremental continual learning and that the method has not been tested for other settings such as domain-incremental continual learning. The released code now uses the Gram-Schmidt process at the start of each new task to initialize new prompting parameters.

Key idea. CODA-Prompt learns a set of prompt components that are assembled with input-conditioned weights into input-conditioned prompts, giving an attention-based key-query scheme trained end-to-end.

  • CODA-Prompt
  • COntinual Decomposed Attention-based Prompting
  • continual learning
  • rehearsal-free continual learning
  • class-incremental learning
  • catastrophic forgetting
  • prompting
  • vision transformer

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{smith2023codapromptcontinualdecomposedattentionbased,
      title={CODA-Prompt: COntinual Decomposed Attention-based Prompting for Rehearsal-Free Continual Learning}, 
      author={James Seale Smith and Leonid Karlinsky and Vyshnavi Gutta and Paola Cascante-Bonilla and Donghyun Kim and Assaf Arbelle and Rameswar Panda and Rogerio Feris and Zsolt Kira},
      year={2023},
      eprint={2211.13218},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2211.13218}, 
}