{"id":49865907,"url":"https://github.com/eddie221/mcpnet_pp","last_synced_at":"2026-05-15T03:00:01.645Z","repository":{"id":354992872,"uuid":"1202577695","full_name":"eddie221/MCPNet_PP","owner":"eddie221","description":"[TPAMI 2026] Official Repository for MCPNet++: An Interpretable Classifier via Multi-Level Concept Prototypes","archived":false,"fork":false,"pushed_at":"2026-05-01T09:22:36.000Z","size":1241,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-15T02:59:57.241Z","etag":null,"topics":["explainable-ai","inherent-interpretability","interpretable-machine-learning","prototype-based-models"],"latest_commit_sha":null,"homepage":"https://eddie221.github.io/MCPNet_PP_web/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eddie221.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-06T07:03:21.000Z","updated_at":"2026-05-01T09:22:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/eddie221/MCPNet_PP","commit_stats":null,"previous_names":["eddie221/mcpnet_pp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eddie221/MCPNet_PP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddie221%2FMCPNet_PP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddie221%2FMCPNet_PP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddie221%2FMCPNet_PP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddie221%2FMCPNet_PP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eddie221","download_url":"https://codeload.github.com/eddie221/MCPNet_PP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddie221%2FMCPNet_PP/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33051875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-15T02:00:06.351Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["explainable-ai","inherent-interpretability","interpretable-machine-learning","prototype-based-models"],"created_at":"2026-05-15T02:59:55.832Z","updated_at":"2026-05-15T03:00:01.637Z","avatar_url":"https://github.com/eddie221.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MCPNet++: Interpretable Classifier via Multi-Level Concept Prototypes [TPAMI 2026]\n[Bor-Shiun Wang](https://eddie221.github.io/),\n[Chien-Yi Wang](https://chienyiwang.github.io/)\\*,\n[Wei-Chen Chiu](https://walonchiu.github.io/)\\*\n\n\u003csup\u003e*Equal Advising\u003c/sup\u003e\n\nOfficial PyTorch implementation of TPAMI 2026 paper \"[MCPNet++: Interpretable Classifier via Multi-Level Concept Prototypes](https://ieeexplore.ieee.org/document/11474497)\".\n\n[[`Paper`](https://ieeexplore.ieee.org/document/11474497)] [[`Website`](https://eddie221.github.io/MCPNet_PP_web/)] [[`BibTeX`](#citation)]\n\n## Introduction\nPost-hoc and inherently interpretable methods have shown great success in uncovering the inner workings of black-box models, whether by examining them after training or by explicitly designing for interpretability. While these approaches effectively narrow the semantic gap between a model’s latent space and human understanding, they typically extract only high-level semantics from the model’s final feature map. As a result, they provide a limited perspective on the decision-making process. We argue that explanations lacking insight into both lower- and mid-level semantics cannot be considered fully faithful or genuinely useful. To address this issue, we introduce the Multi-Level Concept Prototypes Classifier (MCPNet), which offers a more holistic interpretation by drawing on information from multiple levels within the model. Rather than relying on predefined concept labels, MCPNet autonomously discovers meaningful concepts from feature maps. To increase versatility, we further propose MCPNet++, which can be seamlessly applied to both CNN and transformer backbones, allowing it to learn meaningful concepts from their respective features. Building on these learned concepts, we also introduce a large language model (LLM)-based method to bridge the gap between these concepts and human perception. Experimental results show that MCPNet++ provides more comprehensive explanations without sacrificing model performance, with the discovered concepts aligning closely with human understanding.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./static/Teaser.png\"/\u003e\n\u003c/div\u003e\n\n## Usage\n### Enviroment  \n\n```bash\nconda env create --file MCPNet_pp.yml --name mcpnet_pp\n```\n\n### Dataset\nThe code can be applied to any imaging classification dataset, structured according to the [Imagefolder format](https://pytorch.org/vision/stable/generated/torchvision.datasets.ImageFolder.html#torchvision.datasets.ImageFolder): \n\n\u003eroot/class1/xxx.png  \u003cbr /\u003e root/class1/xxy.png  \u003cbr /\u003e root/class2/xyy.png \u003cbr /\u003e root/class2/yyy.png\n\nAdd or update the paths to your dataset in ``train_utils/arg_reader.py``. \n\n\n### Training\n```bash\npython -m torch.distributed.launch --nproc_per_node=4 --master_port 9568 train.py \\\n    --case_name AWA2_vit \\\n    --basic_model vit_b_16 \\\n    --device 0 1 2 3 \\\n    --dataset_name AWA2 \\\n    --concept_cha 32 32 32 32 \\\n    --concept_per_layer 24 24 24 24 \\\n    --optimizer adamw \\\n    --saved_dir \"./\" \\\n    --dataloader load_data_train_val_classify_sub \\\n    --num_samples_per_class 50 --rand_sub \\\n    --train_batch_size 192 --val_batch_size 32 --epoch 100\n```\n\n### Visualize Concept Prototypes\nWe will scan the entire training set to find the top-k response images for each concept prototype.\n\n```bash\nbash ./script/visualize_prototype.sh\n```\n\n### Visualize Concept Patches\nExtract the top-k reaponse patches for each concept prototype.\n\n```bash\nbash ./script/extract_patch.sh  \n```\n\n\n### Caption Concepts\nBefore caption the concepts, make sure the concept prototypes and patches are extracted (following the [Prototypes](#visualize-concept-prototypes) and [Patches](#visualize-concept-patches)).\n```bash\nbash ./script/caption_script.sh\n```\n\n\n### Evaluate Performance\n\n```bash\nbash ./script/eval_classify.sh\n```\n\n### Explain Image\nBefore explain the image, make sure the concept prototypes and patches are extracted (following the [Prototypes](#visualize-concept-prototypes) and [Patches](#visualize-concept-patches)).\nThe caption for the concept is optional.\n\n```bash\nbash ./script/explain_img.sh\n```\n\n\n## Contact\nBor-Shiun Wang: [eddiewang.cs10@nycu.edu.tw](eddiewang.cs10@nycu.edu.tw)\n\nWei-Chien Chiu: [walon@cs.nctu.edu.tw](walon@cs.nctu.edu.tw)\n\nChien-Yi Wang: [chienyiw@nvidia.com](chienyiw@nvidia.com)\n\n\n## Citation\n```bibtex\n@ARTICLE{wang2026MCPNetPP,\n  author  = {Wang, Bor-Shiun and Wang, Chien-Yi and Chiu, Wei-Chen},\n  journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},\n  title   = {MCPNet++: Interpretable Classification Models via Multi-Level Concept Prototypes},\n  year    = {2026},\n  pages   = {1--18},\n  doi     = {10.1109/TPAMI.2026.3680506}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddie221%2Fmcpnet_pp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feddie221%2Fmcpnet_pp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddie221%2Fmcpnet_pp/lists"}