This repository is a public, reproduction-oriented release of CONCIL.
Learning New Concepts, Remembering the Old: Continual Learning for Multimodal Concept Bottleneck Models
It contains:
- the original project structure and experiment scripts,
- paper figures and visualization assets,
- and a cleaned reproduction entry
reproduce_concil.pythat consolidates local bug fixes found during replication.
If your goal is to reproduce the project from scratch, this README is written as a step-by-step guide.
| Paper | Project Page | Repository |
|---|---|---|
| arXiv PDF | xll0328.github.io/concil | GitHub |
reproduce_concil.py
Use this first. It is the cleanest public reproduction path in this repo.
src/experiments/CONCIL_1114.pysrc/experiments/CONCIL.pysrc/experiments/CONCIL_1111.pycommand/*.sh
These are kept for completeness and historical continuity, but for first-time reproduction you should start from reproduce_concil.py.
Representative retained local reproduction results are:
| Setting | Metric | Paper | Local reproduction |
|---|---|---|---|
| CUB 2-stage | Avg concept acc | 0.8233 | 0.8237 |
| CUB 2-stage | Avg class acc | 0.6287 | 0.7033 |
| AwA 2-stage | Avg concept acc | 0.9708 | 0.9716 |
| AwA 2-stage | Avg class acc | 0.8739 | 0.8543 |
Interpretation:
- CUB is aligned and in the retained run some metrics are higher than the paper table.
- AwA concept accuracy is aligned/slightly higher.
- AwA class accuracy is slightly below the paper value in the retained run.
So the current public release is best described as:
a paper-aligned public code release with a cleaned reproduction path.
conda create -n concil python=3.8
conda activate concilpip install -r requirements.txtcd MM25-CONCILThis project uses:
- CUB-200-2011
- AwA2 (Animals with Attributes 2)
A recommended local layout is:
MM25-CONCIL/
├── source_data/
│ ├── CUB_200_2011/
│ └── Animals_with_Attributes2/
└── processed_data/
├── cub_processed_data/
└── awa_processed_data/
You do not have to use this exact layout, but it is the easiest one to follow.
Place the official dataset under:
source_data/CUB_200_2011
The preprocessing script expects the standard CUB structure, including:
images/images.txttrain_test_split.txtattributes/image_attribute_labels.txt
Place the dataset under:
source_data/Animals_with_Attributes2
The preprocessing script expects files such as:
JPEGImages/classes.txtpredicate-matrix-binary.txt
python src/processing/cub_data_processing.py \
-save_dir processed_data/cub_processed_data \
-data_dir source_data/CUB_200_2011This produces:
processed_data/cub_processed_data/train.pklprocessed_data/cub_processed_data/test.pklprocessed_data/cub_processed_data/attribute_map.pkl
Important note: the CUB preprocessing script filters the original 312 attributes and keeps only attributes with at least 500 positive instances in the training set. That is why this project uses 116 concepts for CUB.
python src/processing/awa_data_processing.py \
-save_dir processed_data/awa_processed_data \
-data_dir source_data/Animals_with_Attributes2This produces:
processed_data/awa_processed_data/train.pklprocessed_data/awa_processed_data/test.pkl
Important note: the AwA preprocessing script uses class-level binary predicate vectors and performs a 50/50 random split per class with seed 42.
After preprocessing, create the local path config:
cp src/utils/data_path.example.yml src/utils/data_path.ymlThen edit src/utils/data_path.yml.
Example:
cub:
processed_dir: /absolute/path/to/MM25-CONCIL/processed_data/cub_processed_data
source_dir: /absolute/path/to/MM25-CONCIL/source_data/CUB_200_2011
awa:
processed_dir: /absolute/path/to/MM25-CONCIL/processed_data/awa_processed_data
source_dir: /absolute/path/to/MM25-CONCIL/source_data/Animals_with_Attributes2Recommended: use absolute paths to avoid path bugs.
This is the part most users miss.
reproduce_concil.py requires:
-base_ckpt /path/to/checkpoint.pth
CONCIL’s continual stage starts from a pretrained base model, then performs analytic continual updates.
This public repository does not currently ship the original pretrained base checkpoints.
In other words, after cloning this repo you should not expect files like these to already exist locally:
base_model/CUB/CUB.pthbase_mode_awal/.../AWA.pth
Those paths existed in the original local development environment, but they are not included in the public GitHub release.
You need a base checkpoint compatible with the chosen dataset:
- CUB run -> CUB base checkpoint
- AwA run -> AwA base checkpoint
Use it directly:
python reproduce_concil.py \
-dataset cub \
-base_ckpt /path/to/your/CUB_checkpoint.pth \
-saved_dir results/concil_repro_cubThe repository includes:
src/experiments/CONCIL_base_train.py
But note that this file explicitly says:
NOT THE FINAL CODE USED IN THE PROJECT.
So the most honest and reliable current statement is:
- this repository contains the reference/base-training variant,
- but the cleanest fully supported public path currently assumes that you already have a compatible base checkpoint.
If your goal is successful reproduction with the fewest surprises, use this route:
- preprocess data,
- prepare or obtain a compatible base checkpoint,
- run
reproduce_concil.py, - validate the 2-stage result first,
- then scale to more stages.
A future repository cleanup could make reproduction even easier by adding one of these:
- a polished official base-training script,
- released pretrained checkpoints,
- or a separate checkpoint download section.
For the current release, however, the correct expectation is:
the repo gives you the full continual-learning code path, dataset preprocessing path, and reproduction entry, but base checkpoints must currently be supplied by the user.
python reproduce_concil.py \
-dataset cub \
-base_ckpt /path/to/CUB.pth \
-saved_dir results/concil_repro_cub \
-batch_size 64 \
-num_stages 2 \
-class_ratio 0.5 \
-concept_ratio 0.5 \
-buffer_size 25000 \
-gg1 500 \
-gg2 1 \
-seed 42python reproduce_concil.py \
-dataset awa \
-base_ckpt /path/to/AWA.pth \
-saved_dir results/concil_repro_awa \
-batch_size 64 \
-num_stages 2 \
-class_ratio 0.5 \
-concept_ratio 0.5 \
-buffer_size 25000 \
-gg1 500 \
-gg2 1 \
-seed 42-dataset:cuborawa-base_ckpt: pretrained base model checkpoint-saved_dir: output directory-batch_size: batch size-num_stages: number of continual phases-class_ratio: initial visible class ratio in phase 1-concept_ratio: initial visible concept ratio in phase 1-buffer_size: expansion buffer size-gg1: concept-layer regularization-gg2: class-layer regularization-seed: random seed-num_workers: dataloader workers
Paper-style values used in this repo include:
class_ratio = 0.5concept_ratio = 0.5buffer_size = 25000gg1 = 500gg2 = 1
After a successful run, you should see timestamped outputs such as:
run.logoverall_summary.csvstage_1_metrics.csvstage_2_metrics.csv- ...
If these files are produced, your run most likely completed correctly.
The repo keeps the original shell scripts for multi-stage sweeps.
bash command/CONCIL_cub_exp.shThis loops over:
gg1 = 500gg2 = 1buffer_size = 25000num_stages = 2 3 4 5 6 7 8 9 10
bash command/CONCIL_awa_exp.shThis loops over the same sweep pattern for AwA.
bash command/CONCIL_tc_11_14.shThis explores multiple values of:
gg1gg2- fixed
buffer_size = 25000 - fixed
num_stages = 3
If you are reproducing this project for the first time, do this exact order:
- Create environment
- Install requirements
- Download raw CUB and/or AwA2
- Preprocess datasets
- Copy and edit
src/utils/data_path.yml - Prepare a compatible base checkpoint
- Run a 2-stage experiment first
- Check
overall_summary.csv - Only then try larger stage sweeps
This order avoids most reproduction failures.
Fix:
cp src/utils/data_path.example.yml src/utils/data_path.ymlUse:
source_data/CUB_200_2011source_data/Animals_with_Attributes2
reproduce_concil.py will fail immediately if -base_ckpt is wrong.
Always run commands after:
cd MM25-CONCILIt is useful as a reference, but not the cleanest supported public entry.
.
├── command/ # Original batch scripts
├── figures/ # README / paper figures
├── reproduce_concil.py # Cleaned reproduction entry
├── run_concil_example.sh # Example run wrapper
├── src/
│ ├── analytic/ # Recursive analytic modules
│ ├── data/ # Dataset wrappers and auxiliary CSVs
│ ├── experiments/ # Original project experiment scripts
│ ├── models/
│ ├── processing/ # Dataset preprocessing scripts
│ └── utils/ # Config and utility code
├── VISUAL/ # Visualization assets and notebooks
├── requirements.txt
├── LICENSE
└── readme.md
@inproceedings{lai2025learning,
title={Learning New Concepts, Remembering the Old: Continual Learning for Multimodal Concept Bottleneck Models},
author={Lai, Songning and Liao, Mingqian and Hu, Zhangyi and Yang, Jiayu and Chen, Wenshuo and Xiao, Hongru and Tang, Jianheng and Liao, Haicheng and Yue, Yutao},
booktitle={Proceedings of the ACM International Conference on Multimedia (ACM MM)},
year={2025}
}This project is licensed under the MIT License. See LICENSE for details.