divelab / GOOD

GOOD: A Graph Out-of-Distribution Benchmark [NeurIPS 2022 Datasets and Benchmarks]
https://good.readthedocs.io/
GNU General Public License v3.0
177 stars 19 forks source link

Questions about the comparison graph #22

Open czstudio opened 6 months ago

czstudio commented 6 months ago

Excuse me, how can I draw a comparison graph between the visually extracted causal diagram and the actual label? such as the paper:"Joint Learning of Label and Environment Causal Independence for Graph Out-of-Distribution Generalization" F.2 Interpretability visualization results "We provide interpretability [38, 98] visualization results on GOOD-Motif and CFP-Motif. As illustrated in Fig. 8..." or Snipaste_2024-01-21_10-43-21

Best regards

CM-BF commented 6 months ago

Hi @czstudio,

Hope you are doing well. These figures are draw only in synthetic datasets with causal subgraph ground truths (nodes in your examples). The overall visualization strategy is using the color of nodes to represent the causal and non-causal ground truth and using edges (different colors or bold) to illustrate the actual results.

Specifically, you can use the package networks to draw the figure. You may find this code in LECI useful.

I hope this is the answer you need. Please ask me if you have any questions.

Best, Shurui

czstudio commented 6 months ago

Thank you for your prompt reply. I discovered this code. Can you provide me with a complete example to show that a causal graph is obtained after training with an OOD algorithm such as LECI or GSAT, and the plot_graph function is used to show it?