{"id":20041790,"url":"https://github.com/andreasmazur/improvedgnnexplanations","last_synced_at":"2025-06-27T10:06:58.275Z","repository":{"id":112595819,"uuid":"467091143","full_name":"andreasMazur/ImprovedGNNExplanations","owner":"andreasMazur","description":"Improve Zorro exlanations for graph neural networks.","archived":false,"fork":false,"pushed_at":"2022-10-11T07:46:15.000Z","size":43223,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-27T10:05:48.620Z","etag":null,"topics":["deep-learning","deep-neural-networks","explainability","explainable-ai","explainable-artificial-intelligence","explainable-ml","neural-networks"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreasMazur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-03-07T12:47:25.000Z","updated_at":"2022-10-11T07:44:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"cb5ca9cc-0fec-4e05-b57e-72289f4c0e89","html_url":"https://github.com/andreasMazur/ImprovedGNNExplanations","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andreasMazur/ImprovedGNNExplanations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasMazur%2FImprovedGNNExplanations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasMazur%2FImprovedGNNExplanations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasMazur%2FImprovedGNNExplanations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasMazur%2FImprovedGNNExplanations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreasMazur","download_url":"https://codeload.github.com/andreasMazur/ImprovedGNNExplanations/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreasMazur%2FImprovedGNNExplanations/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262235779,"owners_count":23279566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["deep-learning","deep-neural-networks","explainability","explainable-ai","explainable-artificial-intelligence","explainable-ml","neural-networks"],"created_at":"2024-11-13T10:47:50.135Z","updated_at":"2025-06-27T10:06:58.233Z","avatar_url":"https://github.com/andreasMazur.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Refined Zorro Explanations for Graph Neural Networks\n\nThis repository contains the code for the paper:\n\n```\n@article{Mazur2022,\n  title={Improving Zorro Explanations for Sparse Observations with Dense Proxy Data},\n  author={Mazur, Andreas and Artelt, André and Hammer, Barbara},\n  journal={ESANN},\n  doi={https://doi.org/10.14428/esann/2022.ES2022-27},\n  pages={527-532},\n  year={2022},\n  publisher={i6doc.com}\n}\n```\n\nWe analyse and refine explanations for predictions from a deep Q-learning agent in the Taxi-v3 environment [2].\nDefault integer observations are converted to graph observations. However, those appear to contain sparse feature matrices.\nNaively applying Zorro [1] onto the sparse observations results in problematic explanations.\nThat is why we extend the deep Q-network with a proxy branch.\nWe train the proxy branch by minimizing a fidelity value comparable to the widely known Fidelty-Minus evaluation metric.\nSimultaneously we freeze the weights of the deep Q-network.\nThe proxy branch outputs dense proxy data which we can use to substitute the sparse original observations.\nThe explanations retrieved by applying Zorro on the dense proxy data appear to be better interpretable than the initially computed explanations\nfor the sparse observations.\n\n\u003c!-- ![](https://github.com/andreasMazur/RefinedGNNExplanations/blob/main/Experiment.gif) --\u003e\n\n# Install\n\nThis experiment was conducted with Python3.9. Further, install the requirements:\n\n```pip install -r requirements.txt```\n\nIf you want to repeat the experiment yourself, then you need to execute the `experiment.py`-script in the repository's root directory.\nIt will automatically load a pre-trained network with its added and trained proxy-branch. If you want to repeat everything\nfrom scratch, you must:\n1. Train a reinforcement learning agent by executing the ``train_agent.train_agent``-script\n2. Train the explanation branch by executing the ``learn_proxies.grid_search``-script (requires trained agent from previous step)\n3. Conduct experiment by executing `experiment`-script\n\n# References\n\n[1] Funke, Thorben, Megha Khosla, and Avishek Anand. \"Hard masking for explaining graph neural networks.\" (2020).\n\n[2] T Erez, Y Tassa, E Todorov, \"Hierarchical Reinforcement Learning with the MAXQ Value Function Decomposition\", 2011.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasmazur%2Fimprovedgnnexplanations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreasmazur%2Fimprovedgnnexplanations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreasmazur%2Fimprovedgnnexplanations/lists"}