# iCAM-Net **Repository Path**: Tomhappy/iCAM-Net ## Basic Information - **Project Name**: iCAM-Net - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-11 - **Last Updated**: 2026-04-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
An Interpretable Cross-Attention based Multi-task framework for predicting Herb-Disease Associations
## π Overview `iCAM-Net` is a deep learning model based on graph neural networks, designed to predict potential associations between herbs and diseases. The model leverages a multi-task learning framework to simultaneously learn **Herb-Disease (HD)** association prediction and **Compound-Protein (CP)** interaction prediction, thereby enhancing the primary task's performance and the model's interpretability. --- ## π Dataset The dataset for this project includes information on herbs, chemical compounds, diseases, and their associated target proteins. All data files should be placed in the `data/` directory. #### Recommended Directory Structure The code assumes the following project structure by default: ``` iCAM-Net/ βββ data/ β βββ HERB/ # HERB dataset β β βββ H_C_HERB.csv β β βββ D_P_HERB.csv β β βββ H_D_HERB.csv β β βββ H_D_HERB_neg.csv β β βββ C_P_HERB.csv β β βββ C_P_HERB_neg.csv β β βββ ce_HERB.txt β β βββ pe_HERB.txt β βββ H_C_TCM.csv β βββ D_P_TCM.csv β βββ H_D_TCM.csv β βββ H_D_TCM_neg.csv β βββ C_P_TCM.csv β βββ C_P_TCM_neg.csv β βββ ce_TCM.txt β βββ pe_TCM.txt βββ code/ β βββ main.py β βββ models.py β βββ train.py β βββ graph.py β βββ dataset.py β βββ HGNN.py βββ requirements.txt ``` > **Note:** The original data can be obtained from relevant sources and should be organized according to the structure above. --- ## π Installation First, clone this repository to your local machine. We strongly recommend using a virtual environment to manage project dependencies. ``` git clone https://github.com/qunshanxingyun/iCAM-Net.git cd iCAM-Net ``` 1. **Create and Activate a Virtual Environment (Optional but Recommended)** ```bash conda create -n icam python=3.12 conda activate icam ``` 2. **Install Dependencies** All required packages are listed in the `requirements.txt` file. ```bash pip install -r requirements.txt ``` --- ## β‘οΈ Running the Model All training and evaluation processes can be initiated by running the `main.py` script. 1. **Navigate to the `code` directory** ```bash cd code ``` 2. **Execute the main script** ```bash python main.py ``` The script will automatically load the data, build the model, split the datasets, and start the training and evaluation process. --- ## βοΈ Configuration Hyperparameters, file paths, and other configurations can be modified directly within the `main` function in `code/main.py`. --- ## β‘οΈ Training the Model All training and evaluation processes can be initiated by running the `main.py` script. 1. **Navigate to the `code` directory**: ```bash cd code ``` 2. **Modify Configuration (Optional)**: Hyperparameters, file paths, and other configurations can be adjusted directly within the `main` function in `code/main.py`. 3. **Execute the main script**: ```bash python main.py ``` The script will load the data, build the model, split the datasets, and start the training and evaluation pipeline. --- ## π¬ Inference We provide a dedicated Jupyter Notebook. **File**: `code/inference_and_case_study.ipynb` To use it, simply open the notebook in a Jupyter environment and follow the instructions in each cell. --- ## π Results & Tracking - **Local Results**: During training, the best-performing model (based on validation loss) will be saved to a timestamped directory inside `result/`. Final test results are printed to the console. - **Wandb**: We use `wandb` (Weights & Biases) for experiment tracking. If you have a `wandb` account, log in before running, and all metrics will be automatically tracked. To disable this, set `use_wandb=False` in the `MultiTaskTrainer` initialization in `main.py`. --- ## π Citation If you find our work useful, please cite: ```bibtex @article{zheng2025icamnet, title={iCAM-Net: Interpretable HerbβDisease Association Prediction via Cross-Channel Attention and Molecular Interaction Signals}, author={Zheng, Denggao and Qin, Chi and Wang, Ziyang and Li, Yu and Liu, Yu and Wang, Yunlai and Kan, Hongxing and Hu, Jili}, journal={Phytomedicine}, year={2025}, pages={157491}, doi={10.1016/j.phymed.2025.157491}, url={https://www.sciencedirect.com/science/article/pii/S0944711325011286} } ---