[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-divelab--DIG":3,"tool-divelab--DIG":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",157379,2,"2026-04-15T23:32:42",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":76,"owner_email":76,"owner_twitter":76,"owner_website":77,"owner_url":78,"languages":79,"stars":103,"forks":104,"last_commit_at":105,"license":106,"difficulty_score":32,"env_os":107,"env_gpu":108,"env_ram":107,"env_deps":109,"category_tags":115,"github_topics":117,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":124,"updated_at":125,"faqs":126,"releases":152},7908,"divelab\u002FDIG","DIG","A library for graph deep learning research","DIG（Dive into Graphs）是一个专为图深度学习研究打造的开源工具库。与 PyTorch Geometric 或 DGL 等侧重基础操作的框架不同，DIG 致力于解决高阶科研任务中环境搭建繁琐、基准测试不统一的痛点。它为图生成、自监督学习、模型可解释性、3D 图处理、分布外泛化（OOD）、图增强及公平性学习等前沿方向，提供了统一的数据接口、算法实现和评估指标。\n\n研究人员只需几行代码，即可在 DIG 提供的可扩展框架内复现经典算法或开发新方法，并直接利用内置的标准数据集与评价体系进行公平对比，从而将精力集中于核心创新而非重复造轮子。该工具已升级适配 PyG 2.0.0，拥有完善的文档、教程及 Colab 演示示例。无论是希望快速验证想法的学术研究者，还是致力于探索图神经网络边界的开发者，DIG 都能提供一个高效、规范且社区活跃的科研试验床，助力图深度学习领域的探索与突破。","\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fdivelab_DIG_readme_57018555413b.jpg\" width=\"500\" class=\"center\" alt=\"logo\"\u002F>\n    \u003Cbr\u002F>\n\u003C\u002Fp>\n\n\n\n\n\n[pypi-image]:https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fdive-into-graphs.svg\n[pypi-url]:https:\u002F\u002Fpypi.org\u002Fproject\u002Fdive-into-graphs\u002F\n[docs-image]: https:\u002F\u002Freadthedocs.org\u002Fprojects\u002Fdiveintographs\u002Fbadge\u002F?version=latest\n[docs-url]: https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest\n[license-image]:https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-GPL3.0-green.svg\n[license-url]:https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fmain\u002FLICENSE\n[contributor-image]:https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcontributors\u002Fdivelab\u002FDIG\n[contributor-url]:https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fgraphs\u002Fcontributors \n[contributing-image]:https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcontributions-welcome-brightgreen.svg?style=flat\n[contributing-url]:https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Fcontribution\u002Finstruction.html\n\n\n[![PyPI Version][pypi-image]][pypi-url]\n[![Docs Status][docs-image]][docs-url]\n[![Build Status](https:\u002F\u002Ftravis-ci.com\u002Fdivelab\u002FDIG.svg?branch=dig-stable)](https:\u002F\u002Ftravis-ci.com\u002Fdivelab\u002FDIG)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fdivelab\u002FDIG\u002Fbranch\u002Fdig-stable\u002Fgraph\u002Fbadge.svg?token=KBJ1P31VCH)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fdivelab\u002FDIG)\n![Last Commit](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flast-commit\u002Fdivelab\u002FDIG)\n[![Contributing][contributing-image]][contributing-url]\n[![License][license-image]][license-url]\n![visitors](https:\u002F\u002Fvisitor-badge.glitch.me\u002Fbadge?page_id=jwenjian.visitor-badge)\n[![Downloads](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fdivelab_DIG_readme_7ae11847d0dd.png)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fdive-into-graphs)\n\u003C!--- [![Contributors][contributor-image]][contributor-url] -->\n\n\n**[Documentation](https:\u002F\u002Fdiveintographs.readthedocs.io)** | **[Paper [JMLR]](https:\u002F\u002Fwww.jmlr.org\u002Fpapers\u002Fv22\u002F21-0343.html)** | **[Tutorials](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fgraphdf.html#)** | **[Benchmarks](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fbenchmarks)** |  **[Examples](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples)** | **[Colab Demo](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1eM1vcjcMLbT9om15Env8F-s265GSm4qI?usp=sharing)** | **[slack community:fire:](https:\u002F\u002Fjoin.slack.com\u002Ft\u002Fdive-into-graphs\u002Fshared_invite\u002Fzt-1i9kn731c-RhLA1zcEGHXbIToxdVqo0g)**\n\n*DIG: Dive into Graphs* is a turnkey library for graph deep learning research.\n\n:fire:**Update (2022\u002F07): We have upgraded our DIG library based on PyG 2.0.0. We recommend installing our latest version.**\n\n## Why DIG?\n\nThe key difference with current graph deep learning libraries, such as PyTorch Geometric (PyG) and Deep Graph Library (DGL), is that, while PyG and DGL support basic graph deep learning operations, DIG provides a unified testbed for higher-level, research-oriented graph deep learning tasks, such as graph generation, self-supervised learning, explainability, 3D graphs, and graph out-of-distribution.\n\nIf you are working or plan to work on research in graph deep learning, DIG enables you to develop your own methods within our extensible framework, and compare with current baseline methods using common datasets and evaluation metrics without extra effort.\n\n## Overview\n\nIt includes unified implementations of **data interfaces**, **common algorithms**, and **evaluation metrics** for several advanced tasks. Our goal is to enable researchers to easily implement and benchmark algorithms. Currently, we consider the following research directions.\n\n* **Graph Generation**: `dig.ggraph`\n* **Self-supervised Learning on Graphs**: `dig.sslgraph`\n* **Explainability of Graph Neural Networks**: `dig.xgraph`\n* **Deep Learning on 3D Graphs**: `dig.threedgraph`\n* **Graph OOD**: `dig.oodgraph`\n* **Graph Augmentation**: `dig.auggraph`\n* **Fair Graph Learning**: `dig.fairgraph`\n\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fdivelab_DIG_readme_47dd69c3bdf3.png\" width=\"700\" class=\"center\" alt=\"logo\"\u002F>\n    \u003Cbr\u002F>\n\u003C\u002Fp>\n\n\n## Usage\n\nExample: a few lines of code to run [SphereNet](https:\u002F\u002Fopenreview.net\u002Fforum?id=givsRXsOt9r) on [QM9](https:\u002F\u002Fwww.nature.com\u002Farticles\u002Fsdata201422) to incorporate 3D information of molecules.\n\n\n```python\nfrom dig.threedgraph.dataset import QM93D\nfrom dig.threedgraph.method import SphereNet\nfrom dig.threedgraph.evaluation import ThreeDEvaluator\nfrom dig.threedgraph.method import run\n\n# Load the dataset and split\ndataset = QM93D(root='dataset\u002F')\ntarget = 'U0'\ndataset.data.y = dataset.data[target]\nsplit_idx = dataset.get_idx_split(len(dataset.data.y), train_size=110000, valid_size=10000, seed=42)\ntrain_dataset, valid_dataset, test_dataset = dataset[split_idx['train']], dataset[split_idx['valid']], dataset[split_idx['test']]\n\n# Define model, loss, and evaluation\nmodel = SphereNet(energy_and_force=False, cutoff=5.0, num_layers=4,\n                  hidden_channels=128, out_channels=1, int_emb_size=64,\n                  basis_emb_size_dist=8, basis_emb_size_angle=8, basis_emb_size_torsion=8, out_emb_channels=256,\n                  num_spherical=3, num_radial=6, envelope_exponent=5,\n                  num_before_skip=1, num_after_skip=2, num_output_layers=3)                 \nloss_func = torch.nn.L1Loss()\nevaluation = ThreeDEvaluator()\n\n# Train and evaluate\nrun3d = run()\nrun3d.run(device, train_dataset, valid_dataset, test_dataset, model, loss_func, evaluation,\n          epochs=20, batch_size=32, vt_batch_size=32, lr=0.0005, lr_decay_factor=0.5, lr_decay_step_size=15)\n\n```\n\n\n1. For details of all included APIs, please refer to the [documentation](https:\u002F\u002Fdiveintographs.readthedocs.io\u002F). \n2. We provide a hands-on tutorial for each direction to help you to get started with *DIG*: [Graph Generation](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fgraphdf.html), [Self-supervised Learning on Graphs](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fsslgraph.html), [Explainability of Graph Neural Networks](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fsubgraphx.html), [Deep Learning on 3D Graphs](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fthreedgraph.html), [Graph OOD (GOOD) datasets](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Foodgraph.html).\n3. We also provide [examples](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples) to use APIs provided in *DIG*. You can get started with your interested directions by clicking the following links.\n\n* [Graph Generation](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Fggraph): [`JT-VAE`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Fggraph\u002FJTVAE), [`GraphAF`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Fggraph\u002FGraphAF), [`GraphDF`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Fggraph\u002FGraphDF), [`GraphEBM`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Fggraph\u002FGraphEBM).\n* [Self-supervised Learning on Graphs](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Fsslgraph): [`InfoGraph`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fsslgraph\u002Fexample_infograph.ipynb), [`GRACE`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fsslgraph\u002Fexample_grace.ipynb), [`MVGRL`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fsslgraph\u002Fexample_mvgrl.ipynb), [`GraphCL`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fsslgraph\u002Fexample_graphcl.ipynb), [`LaGraph (v1 supported)`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig\u002Fexamples\u002Fsslgraph\u002FLaGraph).\n* [Explainability of Graph Neural Networks](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Fxgraph): [`DeepLIFT`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fxgraph\u002Fdeeplift.ipynb), [`GNN-LRP`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fxgraph\u002Fgnn_lrp.ipynb), [`FlowX`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fxgraph\u002Fflowx.ipynb), [`GNNExplainer`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fxgraph\u002Fgnnexplainer.ipynb), [`GradCAM`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fxgraph\u002Fgradcam.ipynb), [`PGExplainer`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fxgraph\u002Fpgexplainer.ipynb), [`SubgraphX`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fxgraph\u002Fsubgraphx.ipynb).\n* [Deep Learning on 3D Graphs](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Fthreedgraph): [`SchNet`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fthreedgraph\u002Fthreedgraph.ipynb), [`DimeNet++`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fthreedgraph\u002Fthreedgraph.ipynb), [`SphereNet`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fthreedgraph\u002Fthreedgraph.ipynb).\n* [Graph OOD (GOOD) datasets](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Foodgraph): `GOODHIV`, `GOODPCBA`, `GOODZINC`, `GOODCMNIST`, `GOODMotif`, `GOODCora`, `GOODArxiv`, `GOODCBAS`.\n\n\n## Installation\n\n### Install from pip\nThe key dependencies of DIG: Dive into Graphs are PyTorch (>=1.10.0), PyTorch Geometric (>=2.0.0), and RDKit.\n\n1. Install [PyTorch](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F) (>=1.10.0)\n\n```shell script\n$ python -c \"import torch; print(torch.__version__)\"\n>>> 1.10.0\n```\n\n\n\n\n2. Install [PyG](https:\u002F\u002Fpytorch-geometric.readthedocs.io\u002Fen\u002Flatest\u002Fnotes\u002Finstallation.html#) (>=2.0.0)\n\n```shell script\n$ python -c \"import torch_geometric; print(torch_geometric.__version__)\"\n>>> 2.0.0\n```\n    \n3. Install DIG: Dive into Graphs.\n\n```shell script\npip install dive-into-graphs\n```\n\n\nAfter installation, you can check the version. You have successfully installed DIG: Dive into Graphs if no error occurs.\n\n``` shell script\n$ python\n>>> from dig.version import __version__\n>>> print(__version__)\n```\n\n### Install from source\nIf you want to try the latest features that have not been released yet, you can install dig from source.\n\n```shell script\ngit clone https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG.git\ncd DIG\npip install .\n```\n\n\n## Contributing\n\nWe welcome any forms of contributions, such as reporting bugs and adding new features. Please refer to our [contributing guidelines](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Fcontribution\u002Finstruction.html) for details.\n\n\n## Citing DIG\n\nPlease cite our [paper](https:\u002F\u002Fjmlr.org\u002Fpapers\u002Fv22\u002F21-0343.html) if you find *DIG* useful in your work:\n```\n@article{JMLR:v22:21-0343,\n  author  = {Meng Liu and Youzhi Luo and Limei Wang and Yaochen Xie and Hao Yuan and Shurui Gui and Haiyang Yu and Zhao Xu and Jingtun Zhang and Yi Liu and Keqiang Yan and Haoran Liu and Cong Fu and Bora M Oztekin and Xuan Zhang and Shuiwang Ji},\n  title   = {{DIG}: A Turnkey Library for Diving into Graph Deep Learning Research},\n  journal = {Journal of Machine Learning Research},\n  year    = {2021},\n  volume  = {22},\n  number  = {240},\n  pages   = {1-9},\n  url     = {http:\u002F\u002Fjmlr.org\u002Fpapers\u002Fv22\u002F21-0343.html}\n}\n```\n\n## The Team\n\n*DIG: Dive into Graphs* is developed by [DIVE](https:\u002F\u002Fgithub.com\u002Fdivelab\u002F)@TAMU. Contributors are Meng Liu*, Youzhi Luo*, Limei Wang*, Yaochen Xie*, Hao Yuan*, Shurui Gui*, Haiyang Yu*, Zhao Xu, Jingtun Zhang, Yi Liu, Keqiang Yan, Haoran Liu, Cong Fu, Bora Oztekin, Xuan Zhang, and Shuiwang Ji.\n\n## Acknowledgments\n\nThis work was supported in part by National Science Foundation grants IIS-2006861, IIS-1955189, IIS-1908220, IIS-1908198, DBI-2028361, and DBI-1922969.\n\n\n## Contact\n\nIf you have any technical questions, please submit new issues or raise it in our [DIG slack community:fire:](https:\u002F\u002Fjoin.slack.com\u002Ft\u002Fdive-into-graphs\u002Fshared_invite\u002Fzt-1i9kn731c-RhLA1zcEGHXbIToxdVqo0g).\n\nIf you have any other questions, please contact us: Meng Liu [mengliu@tamu.edu] and Shuiwang Ji [sji@tamu.edu].\n\n\n","\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fdivelab_DIG_readme_57018555413b.jpg\" width=\"500\" class=\"center\" alt=\"logo\"\u002F>\n    \u003Cbr\u002F>\n\u003C\u002Fp>\n\n\n\n\n\n[pypi-image]:https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fdive-into-graphs.svg\n[pypi-url]:https:\u002F\u002Fpypi.org\u002Fproject\u002Fdive-into-graphs\u002F\n[docs-image]: https:\u002F\u002Freadthedocs.org\u002Fprojects\u002Fdiveintographs\u002Fbadge\u002F?version=latest\n[docs-url]:https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest\n[license-image]:https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-GPL3.0-green.svg\n[license-url]:https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fmain\u002FLICENSE\n[contributor-image]:https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcontributors\u002Fdivelab\u002FDIG\n[contributor-url]:https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fgraphs\u002Fcontributors \n[contributing-image]:https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcontributions-welcome-brightgreen.svg?style=flat\n[contributing-url]:https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Fcontribution\u002Finstruction.html\n\n\n[![PyPI Version][pypi-image]][pypi-url]\n[![Docs Status][docs-image]][docs-url]\n[![Build Status](https:\u002F\u002Ftravis-ci.com\u002Fdivelab\u002FDIG.svg?branch=dig-stable)](https:\u002F\u002Ftravis-ci.com\u002Fdivelab\u002FDIG)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fdivelab\u002FDIG\u002Fbranch\u002Fdig-stable\u002Fgraph\u002Fbadge.svg?token=KBJ1P31VCH)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fdivelab\u002FDIG)\n![Last Commit](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flast-commit\u002Fdivelab\u002FDIG)\n[![Contributing][contributing-image]][contributing-url]\n[![License][license-image]][license-url]\n![visitors](https:\u002F\u002Fvisitor-badge.glitch.me\u002Fbadge?page_id=jwenjian.visitor-badge)\n[![Downloads](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fdivelab_DIG_readme_7ae11847d0dd.png)](https:\u002F\u002Fpepy.tech\u002Fproject\u002Fdive-into-graphs)\n\u003C!--- [![Contributors][contributor-image]][contributor-url] -->\n\n\n**[文档](https:\u002F\u002Fdiveintographs.readthedocs.io)** | **[论文 [JMLR]](https:\u002F\u002Fwww.jmlr.org\u002Fpapers\u002Fv22\u002F21-0343.html)** | **[教程](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fgraphdf.html#)** | **[基准测试](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fbenchmarks)** |  **[示例](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples)** | **[Colab 演示](https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F1eM1vcjcMLbT9om15Env8F-s265GSm4qI?usp=sharing)** | **[Slack 社区:fire:](https:\u002F\u002Fjoin.slack.com\u002Ft\u002Fdive-into-graphs\u002Fshared_invite\u002Fzt-1i9kn731c-RhLA1zcEGHXbIToxdVqo0g)**\n\n*DIG：深入图学习* 是一个用于图深度学习研究的开箱即用型库。\n\n:fire:**更新（2022年7月）：我们已基于 PyG 2.0.0 升级了 DIG 库。建议安装最新版本。**\n\n## 为什么选择 DIG？\n\n与当前主流的图深度学习库，如 PyTorch Geometric (PyG) 和 Deep Graph Library (DGL) 相比，关键区别在于：虽然 PyG 和 DGL 主要支持基础的图深度学习操作，但 DIG 提供了一个统一的实验平台，专门针对更高层次、面向研究的图深度学习任务，例如图生成、自监督学习、可解释性、三维图以及图的分布外检测等。\n\n如果你正在从事或计划从事图深度学习相关的研究，DIG 能够让你在我们扩展性强的框架内开发自己的方法，并使用通用的数据集和评估指标，轻松地与现有基线方法进行对比，而无需额外的工作量。\n\n## 概述\n\nDIG 包含多个高级任务的统一实现，涵盖 **数据接口**、**常用算法**和**评估指标**。我们的目标是让研究人员能够便捷地实现和评估各种算法。目前，我们重点关注以下研究方向：\n\n* **图生成**：`dig.ggraph`\n* **图上的自监督学习**：`dig.sslgraph`\n* **图神经网络的可解释性**：`dig.xgraph`\n* **三维图上的深度学习**：`dig.threedgraph`\n* **图的分布外检测**：`dig.oodgraph`\n* **图增强**：`dig.auggraph`\n* **公平图学习**：`dig.fairgraph`\n\n\n\u003Cp align=\"center\">\n\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fdivelab_DIG_readme_47dd69c3bdf3.png\" width=\"700\" class=\"center\" alt=\"logo\"\u002F>\n    \u003Cbr\u002F>\n\u003C\u002Fp>\n\n\n## 使用方法\n\n示例：只需几行代码即可在 [QM9](https:\u002F\u002Fwww.nature.com\u002Farticles\u002Fsdata201422) 数据集上运行 [SphereNet](https:\u002F\u002Fopenreview.net\u002Fforum?id=givsRXsOt9r)，从而融入分子的三维信息。\n\n\n```python\nfrom dig.threedgraph.dataset import QM93D\nfrom dig.threedgraph.method import SphereNet\nfrom dig.threedgraph.evaluation import ThreeDEvaluator\nfrom dig.threedgraph.method import run\n\n# 加载数据集并划分训练集、验证集和测试集\ndataset = QM93D(root='dataset\u002F')\ntarget = 'U0'\ndataset.data.y = dataset.data[target]\nsplit_idx = dataset.get_idx_split(len(dataset.data.y), train_size=110000, valid_size=10000, seed=42)\ntrain_dataset, valid_dataset, test_dataset = dataset[split_idx['train']], dataset[split_idx['valid']], dataset[split_idx['test']]\n\n# 定义模型、损失函数和评估指标\nmodel = SphereNet(energy_and_force=False, cutoff=5.0, num_layers=4,\n                  hidden_channels=128, out_channels=1, int_emb_size=64,\n                  basis_emb_size_dist=8, basis_emb_size_angle=8, basis_emb_size_torsion=8, out_emb_channels=256,\n                  num_spherical=3, num_radial=6, envelope_exponent=5,\n                  num_before_skip=1, num_after_skip=2, num_output_layers=3)                 \nloss_func = torch.nn.L1Loss()\nevaluation = ThreeDEvaluator()\n\n# 训练和评估\nrun3d = run()\nrun3d.run(device, train_dataset, valid_dataset, test_dataset, model, loss_func, evaluation,\n          epochs=20, batch_size=32, vt_batch_size=32, lr=0.0005, lr_decay_factor=0.5, lr_decay_step_size=15)\n\n```\n\n\n1. 有关所有包含 API 的详细信息，请参阅 [文档](https:\u002F\u002Fdiveintographs.readthedocs.io\u002F)。\n2. 我们为每个方向提供了实践教程，帮助您快速上手 *DIG*：[图生成](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fgraphdf.html)、[图上的自监督学习](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fsslgraph.html)、[图神经网络的可解释性](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fsubgraphx.html)、[三维图上的深度学习](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fthreedgraph.html)、[图OOD（GOOD）数据集](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Foodgraph.html)。\n3. 我们还提供了 [示例](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples)，以展示如何使用 *DIG* 中提供的 API。您可以通过点击以下链接开始您感兴趣的领域。\n\n* [图生成](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Fggraph)：[`JT-VAE`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Fggraph\u002FJTVAE)、[`GraphAF`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Fggraph\u002FGraphAF)、[`GraphDF`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Fggraph\u002FGraphDF)、[`GraphEBM`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Fggraph\u002FGraphEBM)。\n* [图上的自监督学习](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Fsslgraph)：[`InfoGraph`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fsslgraph\u002Fexample_infograph.ipynb)、[`GRACE`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fsslgraph\u002Fexample_grace.ipynb)、[`MVGRL`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fsslgraph\u002Fexample_mvgrl.ipynb)、[`GraphCL`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fsslgraph\u002Fexample_graphcl.ipynb)、[`LaGraph (v1 支持)`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig\u002Fexamples\u002Fsslgraph\u002FLaGraph)。\n* [图神经网络的可解释性](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Fxgraph)：[`DeepLIFT`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fxgraph\u002Fdeeplift.ipynb)、[`GNN-LRP`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fxgraph\u002Fgnn_lrp.ipynb)、[`FlowX`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fxgraph\u002Fflowx.ipynb)、[`GNNExplainer`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fxgraph\u002Fgnnexplainer.ipynb)、[`GradCAM`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fxgraph\u002Fgradcam.ipynb)、[`PGExplainer`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fxgraph\u002Fpgexplainer.ipynb)、[`SubgraphX`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fxgraph\u002Fsubgraphx.ipynb)。\n* [三维图上的深度学习](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Fthreedgraph)：[`SchNet`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fthreedgraph\u002Fthreedgraph.ipynb)、[`DimeNet++`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fthreedgraph\u002Fthreedgraph.ipynb)、[`SphereNet`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fblob\u002Fdig-stable\u002Fexamples\u002Fthreedgraph\u002Fthreedgraph.ipynb)。\n* [图OOD（GOOD）数据集](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples\u002Foodgraph)：`GOODHIV`、`GOODPCBA`、`GOODZINC`、`GOODCMNIST`、`GOODMotif`、`GOODCora`、`GOODArxiv`、`GOODCBAS`。\n\n\n## 安装\n\n### 通过 pip 安装\nDIG: Dive into Graphs 的关键依赖包括 PyTorch（>=1.10.0）、PyTorch Geometric（>=2.0.0）和 RDKit。\n\n1. 安装 [PyTorch](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F)（>=1.10.0）\n\n```shell script\n$ python -c \"import torch; print(torch.__version__)\"\n>>> 1.10.0\n```\n\n\n\n\n2. 安装 [PyG](https:\u002F\u002Fpytorch-geometric.readthedocs.io\u002Fen\u002Flatest\u002Fnotes\u002Finstallation.html#)（>=2.0.0）\n\n```shell script\n$ python -c \"import torch_geometric; print(torch_geometric.__version__)\"\n>>> 2.0.0\n```\n    \n3. 安装 DIG: Dive into Graphs。\n\n```shell script\npip install dive-into-graphs\n```\n\n\n安装完成后，您可以检查版本。如果没有出现错误，则表示您已成功安装 DIG: Dive into Graphs。\n\n``` shell script\n$ python\n>>> from dig.version import __version__\n>>> print(__version__)\n```\n\n### 从源代码安装\n如果您想尝试尚未发布的最新功能，可以从源代码安装 DIG。\n\n```shell script\ngit clone https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG.git\ncd DIG\npip install .\n```\n\n\n## 贡献\n我们欢迎任何形式的贡献，例如报告错误或添加新功能。有关详细信息，请参阅我们的 [贡献指南](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Fcontribution\u002Finstruction.html)。\n\n\n## 引用 DIG\n如果您在工作中发现 *DIG* 有用，请引用我们的 [论文](https:\u002F\u002Fjmlr.org\u002Fpapers\u002Fv22\u002F21-0343.html)：\n```\n@article{JMLR:v22:21-0343,\n  author  = {Meng Liu and Youzhi Luo and Limei Wang and Yaochen Xie and Hao Yuan and Shurui Gui and Haiyang Yu and Zhao Xu and Jingtun Zhang and Yi Liu and Keqiang Yan and Haoran Liu and Cong Fu and Bora M Oztekin and Xuan Zhang and Shuiwang Ji},\n  title   = {{DIG}: A Turnkey Library for Diving into Graph Deep Learning Research},\n  journal = {Journal of Machine Learning Research},\n  year    = {2021},\n  volume  = {22},\n  number  = {240},\n  pages   = {1-9},\n  url     = {http:\u002F\u002Fjmlr.org\u002Fpapers\u002Fv22\u002F21-0343.html}\n}\n```\n\n## 团队\n*DIG: Dive into Graphs* 由 [DIVE](https:\u002F\u002Fgithub.com\u002Fdivelab\u002F)@TAMU 开发。贡献者包括 Meng Liu*、Youzhi Luo*、Limei Wang*、Yaochen Xie*、Hao Yuan*、Shurui Gui*、Haiyang Yu*、Zhao Xu、Jingtun Zhang、Yi Liu、Keqiang Yan、Haoran Liu、Cong Fu、Bora Oztekin、Xuan Zhang 和 Shuiwang Ji。\n\n## 致谢\n本研究部分得到了美国国家科学基金会资助，项目编号分别为 IIS-2006861、IIS-1955189、IIS-1908220、IIS-1908198、DBI-2028361 和 DBI-1922969。\n\n\n## 联系方式\n如果您有任何技术问题，请提交新的问题或在我们的 [DIG Slack 社区:fire:](https:\u002F\u002Fjoin.slack.com\u002Ft\u002Fdive-into-graphs\u002Fshared_invite\u002Fzt-1i9kn731c-RhLA1zcEGHXbIToxdVqo0g) 中提出。\n\n如果您有其他问题，请联系：Meng Liu [mengliu@tamu.edu] 和 Shuiwang Ji [sji@tamu.edu]。","# DIG (Dive into Graphs) 快速上手指南\n\nDIG 是一个专为图深度学习研究设计的开箱即用库。与 PyG 和 DGL 等基础库不同，DIG 提供了更高级的研究任务统一测试平台，涵盖图生成、自监督学习、可解释性、3D 图以及分布外（OOD）图等方向。\n\n## 1. 环境准备\n\n在开始之前，请确保您的系统满足以下前置依赖要求：\n\n*   **Python**: 建议 Python 3.7+\n*   **PyTorch**: 版本 >= 1.10.0\n*   **PyTorch Geometric (PyG)**: 版本 >= 2.0.0\n*   **RDKit**: 用于处理化学分子数据（特别是 3D 图任务）\n\n> **注意**：DIG 强依赖于特定版本的 PyTorch 和 PyG。请务必先根据您的 CUDA 版本安装对应的 PyTorch 和 PyG。\n\n## 2. 安装步骤\n\n### 第一步：安装 PyTorch\n请访问 [PyTorch 官网](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F) 获取适合您环境的安装命令。例如：\n```shell\npip install torch>=1.10.0\n```\n安装后验证版本：\n```shell\npython -c \"import torch; print(torch.__version__)\"\n```\n\n### 第二步：安装 PyTorch Geometric (PyG)\n根据官方文档安装 PyG 2.0.0 及以上版本：\n```shell\npip install torch-geometric>=2.0.0\n```\n安装后验证版本：\n```shell\npython -c \"import torch_geometric; print(torch_geometric.__version__)\"\n```\n\n### 第三步：安装 DIG\n通过 pip 直接安装稳定版：\n```shell\npip install dive-into-graphs\n```\n\n或者，如果您想体验最新的未发布功能，可以从源码安装：\n```shell\ngit clone https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG.git\ncd DIG\npip install .\n```\n\n### 验证安装\n运行以下代码，若无报错并输出版本号，则安装成功：\n```python\nfrom dig.version import __version__\nprint(__version__)\n```\n\n## 3. 基本使用\n\n以下示例演示了如何在 **QM9** 数据集上运行 **SphereNet** 模型，以利用分子的 3D 信息进行训练和评估。这是 `dig.threedgraph` 模块的典型用法。\n\n```python\nimport torch\nfrom dig.threedgraph.dataset import QM93D\nfrom dig.threedgraph.method import SphereNet\nfrom dig.threedgraph.evaluation import ThreeDEvaluator\nfrom dig.threedgraph.method import run\n\n# 1. 加载数据集并划分\ndataset = QM93D(root='dataset\u002F')\ntarget = 'U0'\ndataset.data.y = dataset.data[target]\n# 划分训练集、验证集和测试集\nsplit_idx = dataset.get_idx_split(len(dataset.data.y), train_size=110000, valid_size=10000, seed=42)\ntrain_dataset, valid_dataset, test_dataset = dataset[split_idx['train']], dataset[split_idx['valid']], dataset[split_idx['test']]\n\n# 2. 定义模型、损失函数和评估器\nmodel = SphereNet(energy_and_force=False, cutoff=5.0, num_layers=4,\n                  hidden_channels=128, out_channels=1, int_emb_size=64,\n                  basis_emb_size_dist=8, basis_emb_size_angle=8, basis_emb_size_torsion=8, out_emb_channels=256,\n                  num_spherical=3, num_radial=6, envelope_exponent=5,\n                  num_before_skip=1, num_after_skip=2, num_output_layers=3)                 \nloss_func = torch.nn.L1Loss()\nevaluation = ThreeDEvaluator()\n\n# 3. 执行训练和评估\nrun3d = run()\ndevice = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n\nrun3d.run(device, train_dataset, valid_dataset, test_dataset, model, loss_func, evaluation,\n          epochs=20, batch_size=32, vt_batch_size=32, lr=0.0005, lr_decay_factor=0.5, lr_decay_step_size=15)\n```\n\n### 更多资源\nDIG 涵盖了多个研究方向，您可以参考以下模块进行探索：\n*   **图生成**: `dig.ggraph`\n*   **图自监督学习**: `dig.sslgraph`\n*   **图神经网络可解释性**: `dig.xgraph`\n*   **3D 图深度学习**: `dig.threedgraph`\n*   **图分布外学习 (OOD)**: `dig.oodgraph`\n\n详细 API 文档和更多示例代码请访问 [DIG 官方文档](https:\u002F\u002Fdiveintographs.readthedocs.io\u002F) 或 GitHub [Examples 目录](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fexamples)。","某高校实验室的研究团队正致力于开发一种新的分子生成算法，旨在设计具有特定药效的新型药物分子，并需要验证其在三维空间结构上的有效性。\n\n### 没有 DIG 时\n- **重复造轮子**：研究人员需手动复现 SphereNet 等复杂的 3D 图神经网络基线模型，耗费数周时间处理数据接口和模型架构细节。\n- **评估标准不一**：缺乏统一的 3D 分子生成评估指标，不同实验间的生成质量（如稳定性、多样性）难以横向对比，导致论文审稿受阻。\n- **数据预处理繁琐**：QM9 等常用数据集的 3D 坐标清洗与格式转换代码分散且不兼容，每次实验前都要花费大量精力整理数据。\n- **扩展性差**：想要引入自监督学习或可解释性模块时，原有代码耦合度高，修改一处往往引发多处报错，迭代效率极低。\n\n### 使用 DIG 后\n- **开箱即用基线**：直接调用 `dig.threedgraph` 模块中预实现的 SphereNet 等 SOTA 模型，几行代码即可在 QM9 数据集上启动训练，将环境搭建时间从数周缩短至数小时。\n- **统一评测体系**：利用 DIG 内置的标准评估指标自动计算生成分子的物理化学属性，确保实验结果可与社区最新研究直接对标，提升论文说服力。\n- **标准化数据流**：通过统一的数据接口无缝加载已清洗好的 3D 图数据，彻底告别繁琐的格式转换脚本，让研究者专注于算法核心逻辑。\n- **灵活模块化扩展**：基于 DIG 的高层抽象框架，轻松组合图增强、公平性学习等模块进行创新实验，无需担心底层兼容性，大幅加速科研迭代。\n\nDIG 将研究人员从繁琐的工程实现中解放出来，使其能专注于图深度学习的前沿算法创新与高效验证。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fdivelab_DIG_258b7e69.png","divelab","DIVE Lab, Texas A&M University","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fdivelab_ea9fb98f.jpg","Data Integration, Visualization, and Exploration",null,"http:\u002F\u002Fpeople.tamu.edu\u002F~sji\u002F","https:\u002F\u002Fgithub.com\u002Fdivelab",[80,84,88,92,96,100],{"name":81,"color":82,"percentage":83},"Python","#3572A5",88,{"name":85,"color":86,"percentage":87},"Jupyter Notebook","#DA5B0B",11.3,{"name":89,"color":90,"percentage":91},"C++","#f34b7d",0.4,{"name":93,"color":94,"percentage":95},"Cuda","#3A4E3A",0.3,{"name":97,"color":98,"percentage":99},"C","#555555",0,{"name":101,"color":102,"percentage":99},"Shell","#89e051",2002,292,"2026-04-09T20:56:42","GPL-3.0","未说明","未说明（依赖 PyTorch 和 PyG，通常图深度学习任务建议配备 NVIDIA GPU）",{"notes":110,"python":107,"dependencies":111},"该工具是基于 PyTorch Geometric (PyG) 的高级研究库，专注于图生成、自监督学习、可解释性、3D 图等任务。安装前需先手动配置好 PyTorch (>=1.10.0) 和 PyG (>=2.0.0) 环境，因为 README 中未提供自动安装这些底层依赖的命令。此外，部分功能（如 3D 图处理）依赖 RDKit 库。",[112,113,114],"torch>=1.10.0","torch-geometric>=2.0.0","rdkit",[14,116],"其他",[118,119,120,121,122,123],"deep-learning","graph-neural-network","graph-generation","explainable-ml","self-supervised-learning","3d-graph","2026-03-27T02:49:30.150509","2026-04-16T08:11:54.558294",[127,132,137,142,147],{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},35416,"运行 subgraphx.ipynb 时遇到 'GCNConv' object has no attribute 'weight' 错误怎么办？","该问题通常由版本不兼容引起。解决方案是将 pytorch-geometric 降级到 1.7.2 版本。注意不要降级到 1.6.0，否则在导入 `dig.xgraph.dataset` 时会引发新的 `ImportError: cannot import name 'container_abcs' from 'torch._six'` 错误。此外，也可以尝试删除 `processed` 目录下的缓存数据后重试。","https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fissues\u002F54",{"id":133,"question_zh":134,"answer_zh":135,"source_url":136},35417,"如何在 GradCAM 或 GNNExplainer 示例中正确可视化图结构？","应调用具体解释器实例的 `visualize_graph` 方法（例如 `explainer.visualize_graph`），而不是基类方法。参考代码如下：\n```python\nax, G = explainer.visualize_graph(\n    node_idx=0 if node_idx is None else node_idx,\n    edge_index=data.edge_index,\n    edge_mask=masks[target_label],\n    y=data.x[:, 0] if node_idx is None else data.y,\n    num_nodes=data.x.shape[0],\n    data=data\n)\nplt.show()\n```\n其中 `node_idx` 仅用于节点分类任务；`y` 用作颜色参考（节点分类时为节点类别，分子图为原子序数）。","https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fissues\u002F55",{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},35418,"运行 QM9 和 SphereNet 示例时出现 'leaf Variable that requires grad is being used in an in-place operation' 运行时错误如何解决？","这是因为代码中不必要的参数重置操作导致的。解决方法是修改 `spherenet.py` 文件，移除第 21 至 24 行中的 `self.dist_emb.reset_parameters()` 调用，因为该函数不需要重置参数。如果使用的是 PyPI 安装的旧版本（如 0.1.2），建议直接从 GitHub 克隆最新代码以获取修复后的版本。","https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fissues\u002F77",{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},35419,"哪里可以找到复现 SphereNet 论文结果的最佳参数集和预训练模型？","维护者已在 DIG_storage 仓库中提供了训练好的模型和最佳超参数。您可以访问以下链接获取资源：https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG_storage\u002Ftree\u002Fmain\u002F3dgraph\u002Fqm9。如果链接失效，可手动在该仓库的 3dgraph\u002Fqm9 目录下查找相关文件。","https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fissues\u002F39",{"id":148,"question_zh":149,"answer_zh":150,"source_url":151},35420,"如何使用 GNNExplainer 获取节点特征重要性、边掩码以及生成类似原论文的可视化结果？","在 GNNExplainer 类中，可以通过属性 `self.node_feat_mask` 提取节点特征掩码，通过 `self.edge_mask` 提取边掩码。若要解释节点特征的重要性，请在初始化或调用时设置 `mask_features=True`。对于图级别预测，可以使用命令行工具运行，例如：\n`python -m benchmark.kernel.pipeline --task explain --model_name GCN_3l --dataset_name tox21 --target_idx 2 --explainer GNNExplainer --sparsity 0.3 --vis`\n这将生成相应的可视化结果和掩码数据。","https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fissues\u002F24",[153,158,163,168,173,178,183,188,193,198],{"id":154,"version":155,"summary_zh":156,"released_at":157},280482,"1.1.0","更多方向和错误修复\n---------\n* 添加新的方向图OOD [`dig.oodgraph`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Fdig\u002Foodgraph)。\n* 修复了错误","2023-04-07T20:33:15",{"id":159,"version":160,"summary_zh":161,"released_at":162},280483,"1.0.0","基于 PyG 2.0.0 更新 DIG\n---------\n* 鉴于 PyG 2.0.0 相较于 PyG 1.x.x 有重大更新，我们已基于 PyG 2.0.0 升级了 DIG，以提升易用性。\n* 我们将在 KDD 2022 上举办一场关于使用 DIG 进行图深度学习研究的实践教程。相关资料将收录于此 [文件夹](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig-stable\u002Ftutorials\u002FKDD2022) 中。","2022-07-14T07:05:26",{"id":164,"version":165,"summary_zh":166,"released_at":167},280484,"0.2.0","更多方向和方法\n---------\n* 添加一个新的方向 [ggraph3D](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig\u002Fdig\u002Fggraph3D)，并上传其初步代码。\n* 添加 [LaGraph](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig\u002Fexamples\u002Fsslgraph\u002FLaGraph) 的代码。","2022-06-27T05:15:24",{"id":169,"version":170,"summary_zh":171,"released_at":172},280485,"0.1.2","论文已接受\r\n---------\n* DIG 的论文已被 [JMLR](https:\u002F\u002Fwww.jmlr.org\u002Fpapers\u002Fv22\u002F21-0343.html) 接受。\r\n\r\n\r\n示例与基准测试组织\r\n---------\n* 重新组织 [`examples`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig\u002Fexamples) 目录中的示例实现。\r\n* 添加一个用于基准测试实现的 [`benchmark`](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Ftree\u002Fdig\u002Fbenchmarks) 目录。目前，我们提供了 `xgraph` 的基准测试实现。","2021-10-13T00:38:18",{"id":174,"version":175,"summary_zh":176,"released_at":177},280486,"0.1.1","添加测试\n---------\n* 添加更全面的测试用例。\n\n代码改进\n--------\n* 更新 `threedgraph` 中 SphereNet 的最优超参数集。[[#39](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fissues\u002F39)]（感谢 @kexinhuang12345 和 @chao1224）\n* 修复 `xgraph` 中 fidelity_inv 描述中的 Fidelity 符号，将其改为 Fidelity-。[[#43]](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fpull\u002F43)（感谢 @joaquincabezas）\n\n文档改进\n--------\n* 更新[贡献指南](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Fcontribution\u002Finstruction.html#reporting-issues)，增加更详细的说明。\n","2021-08-12T15:18:20",{"id":179,"version":180,"summary_zh":181,"released_at":182},280487,"0.1.0","安装\n------\n* 将 RDKit 依赖替换为 RDKit-pypi，从而简化安装流程。\n\n\n教程\n------\n* 为每个方向新增实践教程：[图生成](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fgraphdf.html)、[图上的自监督学习](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fsslgraph.html)、[图神经网络的可解释性](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fsubgraphx.html)，以及 [三维图上的深度学习](https:\u002F\u002Fdiveintographs.readthedocs.io\u002Fen\u002Flatest\u002Ftutorials\u002Fthreedgraph.html)。\n\n\n\n代码质量\n------\n* 运行代码分析工具，并据此提升代码质量。\n\n\n错误修复\n------\n* 修复 `xgraph` 中“局部变量在赋值前被引用”的问题。[[#27](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fissues\u002F27)]（感谢 @gui-li）\n* 在 `xgraph` 中禁用 `pin_memory` 标志。[[#28](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fissues\u002F28)]（感谢 @gui-li）\n* 修复 `ggraph` 中的“torch.fft 错误”。[[#34](https:\u002F\u002Fgithub.com\u002Fdivelab\u002FDIG\u002Fissues\u002F34)]（感谢 @GRAPH-0）","2021-07-27T16:21:03",{"id":184,"version":185,"summary_zh":186,"released_at":187},280488,"0.0.4","错误修复\n------\n\n* 修复在 MD17 数据集上训练时的梯度错误。\n* 修复 PGExplainer 中的维度错误。\n","2021-05-20T23:53:44",{"id":189,"version":190,"summary_zh":191,"released_at":192},280489,"0.0.3","添加测试\n------\n\n* 通过 Travis CI 部署单元测试。\n","2021-05-10T19:20:37",{"id":194,"version":195,"summary_zh":196,"released_at":197},280490,"0.0.2","错误修复\n------\n\n* 在已安装的软件包中添加非代码文件（例如：dig\u002Fggraph\u002Fdataset\u002Fconfig.csv 和 dig\u002Fggraph\u002Futils\u002Ffpscores.pkl.gz）。","2021-05-06T17:09:43",{"id":199,"version":200,"summary_zh":201,"released_at":202},280491,"0.0.1","作为 Python 包的首次发布\n------\n\nDIG 包含针对多项前沿任务的统一数据接口、通用算法和评估指标实现。\n\n目前，我们重点关注以下研究方向：\n\n* 图生成\n* 图上的自监督学习\n* 图神经网络的可解释性\n* 三维图上的深度学习","2021-05-04T01:35:03"]