CATphishing banner

This directory contains the user-facing documentation for CATegorical and PHenotypic Image SyntHetic learnING (CATphishing). The code here is a local, flattened copy of the Code Ocean capsule. For container build and source layout details, see DEVELOPER_README.md.

Scientific Basis

CATphishing is described by Truong et al. in Nature Communications (2025) as an alternative to federated learning for collaborative medical imaging model development. The method trains latent diffusion models locally at participating institutions to capture site-specific image distributions. Synthetic multi-contrast 3D brain tumor MRI samples generated from those local models can then be aggregated centrally for downstream tasks without directly sharing raw patient images.

The published evaluation used multi-contrast MRI data from 2491 patients across seven institutions for IDH mutation classification and three-class tumor-type classification. The reported goal was to provide a privacy-conscious, scalable alternative to centralized data sharing and iterative federated learning communication.

This repository packages the capsule source for local review and Docker-based execution. Model outputs are intended for research, evaluation, and downstream analysis and should be interpreted in the context of the cited publication.

Capsule Usage

The default container command runs the Code Ocean capsule runner:

bash run

The run script executes:

python -u scripts/evaluate_IDH_classification_performance.py

That evaluation script expects previously generated classification result spreadsheets under /data/results and writes summary spreadsheets and ROC plots to /results.

Docker Build

Build the local CATphishing image from this directory:

cd /path/to/btvb/CATphishing
docker build -t git.biohpc.swmed.edu:5050/ansir/btvb/catphishing:gpu .

The Dockerfile uses a CUDA 11.8 runtime image, installs the capsule requirements, copies this directory to /opt/CATphishing, and runs bash run by default.

Default Evaluation Run

Prepare an input directory with the result spreadsheets expected by scripts/evaluate_IDH_classification_performance.py:

/path/to/data/results/
  centralized_training/
    centralized_training_TCGA_UTSW_EGD_test_UCSF.xlsx
    centralized_training_TCGA_UTSW_EGD_test_NYU.xlsx
    centralized_training_TCGA_UTSW_EGD_test_UWM.xlsx
    centralized_training_TCGA_UTSW_EGD_test_UPENN.xlsx
  fl_training/
    fl_training_TCGA_UTSW_EGD_test_UCSF.xlsx
    fl_training_TCGA_UTSW_EGD_test_NYU.xlsx
    fl_training_TCGA_UTSW_EGD_test_UWM.xlsx
    fl_training_TCGA_UTSW_EGD_test_UPENN.xlsx
  catphishing/
    catphishing_synthetic_data_test_UCSF.xlsx
    catphishing_synthetic_data_test_NYU.xlsx
    catphishing_synthetic_data_test_UWM.xlsx
    catphishing_synthetic_data_test_UPENN.xlsx

Run the default evaluation:

mkdir -p /path/to/results

docker run --rm --gpus all \
  -v /path/to/data:/data:ro \
  -v /path/to/results:/results \
  git.biohpc.swmed.edu:5050/ansir/btvb/catphishing:gpu

For Podman, use the same command but replace docker with podman. For Apptainer or Singularity, build or pull a compatible SIF from the Docker image and bind the same /data and /results paths.

Example Outputs

The default evaluation writes files to the mounted /results directory, including:

Training Entry Points

Training and generation workflows are script-driven and depend on local dataset CSVs, preprocessed multi-contrast MRI volumes, and model-specific YAML configuration values. Before running training, update the relevant config file under configs/ with local paths and experiment settings.

Common entry points include:

python scripts/train_vqkl3d.py --config_file configs/vqkl3d_config.yaml --num_gpu 1
python scripts/train_vqklSR3d.py --config_file configs/vqklSR3d_config.yaml --num_gpu 1
python scripts/train_ldpm3d_text_cond.py --config_file configs/ldpm3d_config.yaml --num_gpu 1

The default configuration files are examples from the capsule and may contain blank or site-specific path values. They are not expected to run unchanged on a new system.

Code Provenance

The local source was copied from Code Ocean capsule 6800638, version v1, available at:

In Code Ocean, executable source is stored under a code/ directory. In this repository, that source has been flattened into CATphishing/, so the primary capsule files live at the top level:

Citation

If you use the CATphishing model or Docker scaffold, please cite:

@article{Truong2025CATphishing,
  title={Categorical and phenotypic image synthetic learning as an alternative to federated learning},
  author={Truong, Nghi C. D. and {Bangalore Yogananda}, Chandan Ganesh and Wagner, Benjamin C. and Holcomb, James M. and Reddy, Divya D. and Saadat, Niloufar and Bowerman, Jason and Hatanpaa, Kimmo J. and Patel, Toral R. and Fei, Baowei and Lee, Matthew D. and Jain, Rajan and Bruce, Richard J. and Madhuranthakam, Ananth J. and Pinho, Marco C. and Maldjian, Joseph A.},
  journal={Nature Communications},
  volume={16},
  number={1},
  pages={9384},
  year={2025},
  doi={10.1038/s41467-025-64385-z},
  pmid={41130949},
  url={https://doi.org/10.1038/s41467-025-64385-z}
}

Funding

Funding provided by NIH/NCI grant R01CA260705.