Welcome👋! This repository provides the official implementation of our paper Learning Concept-Driven Logical Rules for Interpretable and Generalizable Medical Image Classification (CRL) [arXiv], which has been accepted by MICCAI 2025.
While concept-based models offer local concept explanations (instance-level), they often neglect the global decision logic (dataset-level). Moreover, these models often suffer from concept leakage, where unintended information within soft concept representations undermines both interpretability and generalizability. To address these limitations, we propose Concept Rule Learner (CRL), a novel framework to learn Boolean logical rules from binary visual concepts. CRL employs logical layers to capture concept correlations and extract clinically meaningful rules, thereby providing both local and global interpretability.
conda create -n crl python=3.10
conda activate crl
# please modify according to the CUDA version in your server
pip install torch==2.2.0 torchvision==0.17.0 --index-url https://download.pytorch.org/whl/cu118
pip install -r requirements.txt
- Download the skin datasets from here.
- Download the WBC images from here and concept annotations from here.
- Put raw images into
[data_dir]/raw_dataand the csv files into[data_dir]/meta_data. - Run
python -m data.split_datasetto split the skin dataset into five folds.
train&test for skin:
python main.py --configs configs/skin.yaml --data.fold [fold_idx]
train&test for WBC:
python main.py --configs configs/wbc.yaml
OOD test with DDI dataset
python test_ood.py
This project is released under the Apache-2.0 License.
We thank the maintainers of the following resources:
If you find our work or the repo useful, please consider giving a star and citation:
@inproceedings{Gao2025CRL,
author={Yibo Gao, Hangqi Zhou, Zheyao Gao, Bomin Wang, Shangqi Gao, Sihan Wang, Xiahai Zhuang},
title={Learning Concept-Driven Logical Rules for Interpretable and Generalizable Medical Image Classification},
booktitle={International Conference on Medical Image Computing and Computer Assisted Intervention},
year={2025}
}
