PCR: Proxy-based Contrastive Replay for Online Class-Incremental Continual Learning

February 27, 2026 ยท View on GitHub

Code For CVPR'2023 paper "PCR: Proxy-based Contrastive Replay for Online Class-Incremental Continual Learning" and TNNLS'2025 paper "HPCR: Holistic Proxy-based Contrastive Replay for Online Continual Learning"

The framework is based on online-continual-learning.

PCR is in https://github.com/FelixHuiweiLin/PCR/blob/main/agents/pcr.py.

CIFAR-100

  python general_main.py --num_runs 1 --data  cifar100 --cl_type nc --agent PCR  --retrieve random --update random --mem_size 1000 

CIFAR-10

  python general_main.py --num_runs 1 --data cifar10 --cl_type nc --agent PCR --retrieve random --update random --mem_size 200

Mini-Imagenet

python general_main.py --data --num_runs 1  mini_imagenet --cl_type nc --agent PCR --retrieve random --update random --mem_size 1000

HPCR is in https://github.com/FelixHuiweiLin/PCR/blob/main/agents/hpcr.py.

CIFAR-100

  python general_main.py --num_runs 1 --data  cifar100 --cl_type nc --agent HPCR  --retrieve random --update random --mem_size 1000 --hpcr_temp_max 1.8 --hpcr_temp_min 0.5625 --hpcr_PCD_alpha 0.1 --hpcr_SCD_beta 0.5

CIFAR-10

  python general_main.py --num_runs 1 --data cifar10 --cl_type nc --agent HPCR --retrieve random --update random --mem_size 200 --hpcr_temp_max 1.8 --hpcr_temp_min 0.5625 --hpcr_PCD_alpha 0.01 --hpcr_SCD_beta 0.5

Mini-Imagenet

python general_main.py --data --num_runs 1  mini_imagenet --cl_type nc --agent HPCR --retrieve random --update random --mem_size 1000 --hpcr_temp_max 1.8 --hpcr_temp_min 0.5625 --hpcr_PCD_alpha 0.1 --hpcr_SCD_beta 0.5