界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

graph-explainability

graph-explainability

【效率与协作】Use DIG's xgraph stack for subgraph, edge, node, walk, and saliency explanations with SubgraphX, PGExplainer, GNNExplainer, GNN-LRP, DeepLIFT, GradCAM, FlowX, and explanation metrics.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: graph-explainability description: "Use DIG's xgraph stack for subgraph, edge, node, walk, and saliency explanations with SubgraphX, PGExplainer, GNNExplainer, GNN-LRP, DeepLIFT, GradCAM, FlowX, and explanation metrics." disable-model-invocation: true metadata: disco-role: operating license: GPL 3.0

Graph Explainability

Use this sub-skill for DIG workflows that explain a trained GNN or evaluate explanation metrics.

Include

  • dig.xgraph.dataset: BA_LRP, MarginalSubgraphDataset, MoleculeDataset, SentiGraphDataset, SynGraphDataset.
  • dig.xgraph.method: DeepLIFT, FlowX, GNNExplainer, GNN_GI, GNN_LRP, GradCAM, PGExplainer, SubgraphX, MCTS.
  • dig.xgraph.evaluation: XCollector, ExplanationProcessor, control_sparsity.
  • dig.xgraph.models: GCN_2l, GIN_2l, load_model, and the checkpoint compatibility helpers in dig.xgraph.utils.compatibility.
  • Benchmark-style xgraph workflows using the bundled benchmarks/xgraph source evidence.

Exclude

  • Training new base GNNs from scratch: use the SSL or model-specific sub-skill that owns the model.
  • 2D/3D molecular generation, OOD datasets, augmentation, fairness, or large-scale loaders: route elsewhere.

Start Here

  • Read references/api-reference.md for the explainers, metrics, and compatibility helpers.
  • Read references/workflows.md for node, graph, and benchmark workflows.
  • Read references/troubleshooting.md for checkpoint, mask, and model-config issues.
  • Run scripts/xgraph_metric_smoke.py for a safe CPU-only metric smoke check.

Core Workflows

  • Node or graph explanation: build a trained model, choose an explainer, and request an explanation for a node, graph, or edge target.
  • Subgraph explanations: use SubgraphX/MCTS when the question is which subgraph matters most.
  • Edge-mask metrics: use ExplanationProcessor with XCollector and control_sparsity to compute fidelity and sparsity.
  • Checkpoint compatibility: adapt saved model state dicts with compatible_state_dict when PyG versions change.

Quick Validation

python scripts/xgraph_metric_smoke.py --help
python scripts/xgraph_metric_smoke.py
我的收藏