[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-pygod-team--pygod":3,"tool-pygod-team--pygod":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 真正成长为懂上",159636,2,"2026-04-17T23:33:34",[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":77,"owner_twitter":76,"owner_website":78,"owner_url":79,"languages":80,"stars":85,"forks":86,"last_commit_at":87,"license":88,"difficulty_score":10,"env_os":89,"env_gpu":90,"env_ram":91,"env_deps":92,"category_tags":102,"github_topics":103,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":117,"updated_at":118,"faqs":119,"releases":155},8839,"pygod-team\u002Fpygod","pygod","A Python Library for Graph Outlier Detection (Anomaly Detection)","pygod 是一个专为图数据异常检测设计的 Python 开源库，旨在帮助开发者高效识别社交网络、安全系统等复杂图结构中的可疑节点、边或整图异常。面对图数据中难以察觉的离群点，pygod 提供了超过 10 种主流检测算法，统一了不同模型的调用接口，让用户仅需几行代码即可完成从模型训练到异常评分的全过程。\n\n该工具特别适合人工智能研究人员、数据科学家以及需要处理图结构数据的后端开发者使用。无论是学术探索还是工业级应用，pygod 都能提供坚实支持。其核心亮点在于深度集成了 PyTorch Geometric (PyG) 生态，完美兼容现有的图数据对象，同时支持节点级、边级和图级的多层次检测任务。此外，pygod 采用了模块化设计，具备出色的可扩展性，能够通过小批量处理和采样技术轻松应对大规模图数据的计算挑战。对于希望快速复现前沿算法或构建稳健异常检测系统的用户而言，pygod 提供了一个文档详尽、示例丰富且易于上手的专业平台。",".. image:: https:\u002F\u002Fraw.githubusercontent.com\u002Fpygod-team\u002Fpygod\u002Fmain\u002Fdocs\u002Fpygod_logo.png\n   :width: 1050\n   :alt: PyGOD Logo\n   :align: center\n\n|badge_pypi| |badge_docs| |badge_stars| |badge_forks| |badge_downloads| |badge_testing| |badge_coverage| |badge_license|\n\n.. |badge_pypi| image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fpygod.svg?color=brightgreen\n   :target: https:\u002F\u002Fpypi.org\u002Fproject\u002Fpygod\u002F\n   :alt: PyPI version\n\n.. |badge_docs| image:: https:\u002F\u002Freadthedocs.org\u002Fprojects\u002Fpy-god\u002Fbadge\u002F?version=latest\n   :target: https:\u002F\u002Fdocs.pygod.org\u002Fen\u002Flatest\u002F?badge=latest\n   :alt: Documentation status\n\n.. |badge_stars| image:: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fpygod-team\u002Fpygod?style=flat\n   :target: https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fstargazers\n   :alt: GitHub stars\n\n.. |badge_forks| image:: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002Fpygod-team\u002Fpygod?style=flat\n   :target: https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fnetwork\n   :alt: GitHub forks\n\n.. |badge_downloads| image:: https:\u002F\u002Fstatic.pepy.tech\u002Fpersonalized-badge\u002Fpygod?period=total&units=international_system&left_color=grey&right_color=blue&left_text=Downloads\n   :target: https:\u002F\u002Fpepy.tech\u002Fproject\u002Fpygod\n   :alt: PyPI downloads\n\n.. |badge_testing| image:: https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Factions\u002Fworkflows\u002Ftesting.yml\u002Fbadge.svg\n   :target: https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Factions\u002Fworkflows\u002Ftesting.yml\n   :alt: testing\n\n.. |badge_coverage| image:: https:\u002F\u002Fcoveralls.io\u002Frepos\u002Fgithub\u002Fpygod-team\u002Fpygod\u002Fbadge.svg?branch=main\n   :target: https:\u002F\u002Fcoveralls.io\u002Fgithub\u002Fpygod-team\u002Fpygod?branch=main\n   :alt: Coverage Status\n\n.. |badge_license| image:: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fpygod-team\u002Fpygod.svg\n   :target: https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fblob\u002Fmaster\u002FLICENSE\n   :alt: License\n\n\n-----\n\nPyGOD is a **Python library** for **graph outlier detection** (anomaly detection).\nThis exciting yet challenging field has many key applications, e.g., detecting\nsuspicious activities in social networks [#Dou2020Enhancing]_  and security systems [#Cai2021Structural]_.\n\nPyGOD includes **10+** graph outlier detection algorithms.\nFor consistency and accessibility, PyGOD is developed on top of `PyTorch Geometric (PyG) \u003Chttps:\u002F\u002Fwww.pyg.org\u002F>`_\nand `PyTorch \u003Chttps:\u002F\u002Fpytorch.org\u002F>`_, and follows the API design of `PyOD \u003Chttps:\u002F\u002Fgithub.com\u002Fyzhao062\u002Fpyod>`_.\nSee examples below for detecting outliers with PyGOD in 5 lines!\n\n\n**PyGOD is featured for**:\n\n* **Unified APIs, detailed documentation, and interactive examples** across various graph-based algorithms.\n* **Comprehensive coverage** of 10+ graph outlier detectors.\n* **Full support of detections at multiple levels**, such as node-, edge-, and graph-level tasks.\n* **Scalable design for processing large graphs** via mini-batch and sampling.\n* **Streamline data processing with PyG**--fully compatible with PyG data objects.\n\n**Outlier Detection Using PyGOD with 5 Lines of Code**\\ :\n\n.. code-block:: python\n\n\n    # train a dominant detector\n    from pygod.detector import DOMINANT\n\n    model = DOMINANT(num_layers=4, epoch=20)  # hyperparameters can be set here\n    model.fit(train_data)  # input data is a PyG data object\n\n    # get outlier scores on the training data (transductive setting)\n    score = model.decision_score_\n\n    # predict labels and scores on the testing data (inductive setting)\n    pred, score = model.predict(test_data, return_score=True)\n\n\n**Citing PyGOD**\\ :\n\nOur `software paper \u003Chttps:\u002F\u002Fjmlr.org\u002Fpapers\u002Fv25\u002F23-0963.html>`_ and `benchmark paper \u003Chttps:\u002F\u002Fproceedings.neurips.cc\u002Fpaper_files\u002Fpaper\u002F2022\u002Fhash\u002Facc1ec4a9c780006c9aafd595104816b-Abstract-Datasets_and_Benchmarks.html>`_ are publicly available.\nIf you use PyGOD or BOND in a scientific publication, we would appreciate citations to the following papers::\n\n    @article{JMLR:v25:23-0963,\n      author  = {Kay Liu and Yingtong Dou and Xueying Ding and Xiyang Hu and Ruitong Zhang and Hao Peng and Lichao Sun and Philip S. Yu},\n      title   = {{PyGOD}: A {Python} Library for Graph Outlier Detection},\n      journal = {Journal of Machine Learning Research},\n      year    = {2024},\n      volume  = {25},\n      number  = {141},\n      pages   = {1--9},\n      url     = {http:\u002F\u002Fjmlr.org\u002Fpapers\u002Fv25\u002F23-0963.html}\n    }\n    @inproceedings{NEURIPS2022_acc1ec4a,\n     author = {Liu, Kay and Dou, Yingtong and Zhao, Yue and Ding, Xueying and Hu, Xiyang and Zhang, Ruitong and Ding, Kaize and Chen, Canyu and Peng, Hao and Shu, Kai and Sun, Lichao and Li, Jundong and Chen, George H and Jia, Zhihao and Yu, Philip S},\n     booktitle = {Advances in Neural Information Processing Systems},\n     editor = {S. Koyejo and S. Mohamed and A. Agarwal and D. Belgrave and K. Cho and A. Oh},\n     pages = {27021--27035},\n     publisher = {Curran Associates, Inc.},\n     title = {{BOND}: Benchmarking Unsupervised Outlier Node Detection on Static Attributed Graphs},\n     url = {https:\u002F\u002Fproceedings.neurips.cc\u002Fpaper_files\u002Fpaper\u002F2022\u002Ffile\u002Facc1ec4a9c780006c9aafd595104816b-Paper-Datasets_and_Benchmarks.pdf},\n     volume = {35},\n     year = {2022}\n    }\n\nor::\n\n    Liu, K., Dou, Y., Ding, X., Hu, X., Zhang, R., Peng, H., Sun, L. and Yu, P.S., 2024. PyGOD: A Python library for graph outlier detection. Journal of Machine Learning Research, 25(141), pp.1-9.\n    Liu, K., Dou, Y., Zhao, Y., Ding, X., Hu, X., Zhang, R., Ding, K., Chen, C., Peng, H., Shu, K., Sun, L., Li, J., Chen, G.H., Jia, Z., and Yu, P.S., 2022. BOND: Benchmarking unsupervised outlier node detection on static attributed graphs. Advances in Neural Information Processing Systems, 35, pp.27021-27035.\n\n----\n\nInstallation\n^^^^^^^^^^^^\n\n**Note on PyG and PyTorch Installation**\\ :\nPyGOD depends on `torch \u003Chttps:\u002F\u002Fhttps:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F>`_ and `torch_geometric (including its optional dependencies) \u003Chttps:\u002F\u002Fpytorch-geometric.readthedocs.io\u002Fen\u002Flatest\u002Finstall\u002Finstallation.html#>`_.\nTo streamline the installation, PyGOD does **NOT** install these libraries for you.\nPlease install them from the above links for running PyGOD:\n\n* torch>=2.0.0\n* torch_geometric>=2.3.0\n\nIt is recommended to use **pip** for installation.\nPlease make sure **the latest version** is installed, as PyGOD is updated frequently:\n\n.. code-block:: bash\n\n   pip install pygod            # normal install\n   pip install --upgrade pygod  # or update if needed\n\nAlternatively, you could clone and run setup.py file:\n\n.. code-block:: bash\n\n   git clone https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod.git\n   cd pygod\n   pip install .\n\n**Required Dependencies**\\ :\n\n* python>=3.8\n* numpy>=1.24.3\n* scikit-learn>=1.2.2\n* scipy>=1.10.1\n* networkx>=3.1\n\n\n----\n\n\nQuick Start for Outlier Detection with PyGOD\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n`\"A Blitz Introduction\" \u003Chttps:\u002F\u002Fdocs.pygod.org\u002Fen\u002Flatest\u002Ftutorials\u002F1_intro.html#sphx-glr-tutorials-1-intro-py>`_\ndemonstrates the basic API of PyGOD using the DOMINANT detector. **It is noted that the API across all other algorithms are consistent\u002Fsimilar**.\n\n\n----\n\n\nAPI Cheatsheet & Reference\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nFull API Reference: (https:\u002F\u002Fdocs.pygod.org). API cheatsheet for all detectors:\n\n* **fit(data)**\\ : Fit the detector with train data.\n* **predict(data)**\\ : Predict on test data (train data if not provided) using the fitted detector.\n\nKey Attributes of a fitted detector:\n\n* **decision_score_**\\ : The outlier scores of the input data. Outliers tend to have higher scores.\n* **label_**\\ : The binary labels of the input data. 0 stands for inliers and 1 for outliers.\n* **threshold_**\\ : The determined threshold for binary classification. Scores above the threshold are outliers.\n\n**Input of PyGOD**: Please pass in a `PyG Data object \u003Chttps:\u002F\u002Fpytorch-geometric.readthedocs.io\u002Fen\u002Flatest\u002Fgenerated\u002Ftorch_geometric.data.Data.html#torch_geometric.data.Data>`_.\nSee `PyG data processing examples \u003Chttps:\u002F\u002Fpytorch-geometric.readthedocs.io\u002Fen\u002Flatest\u002Fnotes\u002Fintroduction.html#data-handling-of-graphs>`_.\n\n\nImplemented Algorithms\n^^^^^^^^^^^^^^^^^^^^^^\n\n==================  =====  ===========  ===========  ========================================\nAbbr                Year   Backbone     Sampling      Ref\n==================  =====  ===========  ===========  ========================================\nSCAN                2007   Clustering   No           [#Xu2007Scan]_\nGAE                 2016   GNN+AE       Yes          [#Kipf2016Variational]_\nRadar               2017   MF           No           [#Li2017Radar]_\nANOMALOUS           2018   MF           No           [#Peng2018Anomalous]_\nONE                 2019   MF           No           [#Bandyopadhyay2019Outlier]_\nDOMINANT            2019   GNN+AE       Yes          [#Ding2019Deep]_\nDONE                2020   MLP+AE       Yes          [#Bandyopadhyay2020Outlier]_\nAdONE               2020   MLP+AE       Yes          [#Bandyopadhyay2020Outlier]_\nAnomalyDAE          2020   GNN+AE       Yes          [#Fan2020AnomalyDAE]_\nGAAN                2020   GAN          Yes          [#Chen2020Generative]_\nDMGD                2020   GNN+AE       Yes          [#Bandyopadhyay2020Integrating]_\nOCGNN               2021   GNN          Yes          [#Wang2021One]_\nCoLA                2021   GNN+AE+SSL   Yes          [#Liu2021Anomaly]_\nGUIDE               2021   GNN+AE       Yes          [#Yuan2021Higher]_\nCONAD               2022   GNN+AE+SSL   Yes          [#Xu2022Contrastive]_\nGADNR               2024   GNN+AE       Yes          [#Roy2024Gadnr]_\nCARD                2024   GNN+SSL+AE   Yes          [#Wang2024Card]_\n==================  =====  ===========  ===========  ========================================\n\n\n----\n\nHow to Contribute\n^^^^^^^^^^^^^^^^^\n\nYou are welcome to contribute to this exciting project:\n\nSee `contribution guide \u003Chttps:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fblob\u002Fmain\u002FCONTRIBUTING.rst>`_ for more information.\n\n\n----\n\nPyGOD Team\n^^^^^^^^^^\n\nPyGOD is a great team effort by researchers from UIC, IIT, BUAA, ASU, and CMU.\nOur core team members include:\n\n`Kay Liu (UIC) \u003Chttps:\u002F\u002Fkayzliu.com\u002F>`_,\n`Yingtong Dou (UIC) \u003Chttp:\u002F\u002Fytongdou.com\u002F>`_,\n`Yue Zhao (CMU) \u003Chttps:\u002F\u002Fwww.andrew.cmu.edu\u002Fuser\u002Fyuezhao2\u002F>`_,\n`Xueying Ding (CMU) \u003Chttps:\u002F\u002Fscholar.google.com\u002Fcitations?user=U9CMsh0AAAAJ&hl=en>`_,\n`Xiyang Hu (CMU) \u003Chttps:\u002F\u002Fwww.andrew.cmu.edu\u002Fuser\u002Fxiyanghu\u002F>`_,\n`Ruitong Zhang (BUAA) \u003Chttps:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod>`_,\n`Kaize Ding (ASU) \u003Chttps:\u002F\u002Fwww.public.asu.edu\u002F~kding9\u002F>`_,\n`Canyu Chen (IIT) \u003Chttps:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod>`_,\n\nReach out us by submitting an issue report or send an email to dev@pygod.org.\n\n----\n\nReference\n^^^^^^^^^\n\n.. [#Dou2020Enhancing] Dou, Y., Liu, Z., Sun, L., Deng, Y., Peng, H. and Yu, P.S., 2020, October. Enhancing graph neural network-based fraud detectors against camouflaged fraudsters. In Proceedings of the 29th ACM International Conference on Information & Knowledge Management (CIKM).\n\n.. [#Cai2021Structural] Cai, L., Chen, Z., Luo, C., Gui, J., Ni, J., Li, D. and Chen, H., 2021, October. Structural temporal graph neural networks for anomaly detection in dynamic graphs. In Proceedings of the 30th ACM International Conference on Information & Knowledge Management (CIKM).\n\n.. [#Xu2007Scan] Xu, X., Yuruk, N., Feng, Z. and Schweiger, T.A., 2007, August. Scan: a structural clustering algorithm for networks. In Proceedings of the 13th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD).\n\n.. [#Kipf2016Variational] Kipf, T.N. and Welling, M., 2016. Variational graph auto-encoders. arXiv preprint arXiv:1611.07308.\n\n.. [#Li2017Radar] Li, J., Dani, H., Hu, X. and Liu, H., 2017, August. Radar: Residual Analysis for Anomaly Detection in Attributed Networks. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence (IJCAI).\n\n.. [#Peng2018Anomalous] Peng, Z., Luo, M., Li, J., Liu, H. and Zheng, Q., 2018, July. ANOMALOUS: A Joint Modeling Approach for Anomaly Detection on Attributed Networks. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence (IJCAI).\n\n.. [#Bandyopadhyay2019Outlier] Bandyopadhyay, S., Lokesh, N. and Murty, M.N., 2019, July. Outlier aware network embedding for attributed networks. In Proceedings of the AAAI conference on artificial intelligence (AAAI).\n\n.. [#Ding2019Deep] Ding, K., Li, J., Bhanushali, R. and Liu, H., 2019, May. Deep anomaly detection on attributed networks. In Proceedings of the SIAM International Conference on Data Mining (SDM).\n\n.. [#Bandyopadhyay2020Outlier] Bandyopadhyay, S., Vivek, S.V. and Murty, M.N., 2020, January. Outlier resistant unsupervised deep architectures for attributed network embedding. In Proceedings of the International Conference on Web Search and Data Mining (WSDM).\n\n.. [#Fan2020AnomalyDAE] Fan, H., Zhang, F. and Li, Z., 2020, May. AnomalyDAE: Dual autoencoder for anomaly detection on attributed networks. In Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP).\n\n.. [#Chen2020Generative] Chen, Z., Liu, B., Wang, M., Dai, P., Lv, J. and Bo, L., 2020, October. Generative adversarial attributed network anomaly detection. In Proceedings of the 29th ACM International Conference on Information & Knowledge Management (CIKM).\n\n.. [#Bandyopadhyay2020Integrating] Bandyopadhyay, S., Vishal Vivek, S. and Murty, M.N., 2020. Integrating network embedding and community outlier detection via multiclass graph description. Frontiers in Artificial Intelligence and Applications, (FAIA).\n\n.. [#Wang2021One] Wang, X., Jin, B., Du, Y., Cui, P., Tan, Y. and Yang, Y., 2021. One-class graph neural networks for anomaly detection in attributed networks. Neural computing and applications.\n\n.. [#Liu2021Anomaly] Liu, Y., Li, Z., Pan, S., Gong, C., Zhou, C. and Karypis, G., 2021. Anomaly detection on attributed networks via contrastive self-supervised learning. IEEE transactions on neural networks and learning systems (TNNLS).\n\n.. [#Yuan2021Higher] Yuan, X., Zhou, N., Yu, S., Huang, H., Chen, Z. and Xia, F., 2021, December. Higher-order Structure Based Anomaly Detection on Attributed Networks. In 2021 IEEE International Conference on Big Data (Big Data).\n\n.. [#Xu2022Contrastive] Xu, Z., Huang, X., Zhao, Y., Dong, Y., and Li, J., 2022. Contrastive Attributed Network Anomaly Detection with Data Augmentation. In Proceedings of the 26th Pacific-Asia Conference on Knowledge Discovery and Data Mining (PAKDD).\n\n.. [#Roy2024Gadnr] Roy, A., Shu, J., Li, J., Yang, C., Elshocht, O., Smeets, J. and Li, P., 2024. GAD-NR: Graph Anomaly Detection via Neighborhood Reconstruction. In Proceedings of the 17th ACM International Conference on Web Search and Data Mining (WSDM).\n\n.. [#Wang2024Card] Wang Y., Wang X., He C., Chen X., Luo Z., Duan L., Zuo J., 2024. Community-Guided Contrastive Learning with Anomaly-Aware Reconstruction for Anomaly Detection on Attributed Networks. Database Systems for Advanced Applications (DASFAA).",".. image:: https:\u002F\u002Fraw.githubusercontent.com\u002Fpygod-team\u002Fpygod\u002Fmain\u002Fdocs\u002Fpygod_logo.png\n   :width: 1050\n   :alt: PyGOD Logo\n   :align: center\n\n|badge_pypi| |badge_docs| |badge_stars| |badge_forks| |badge_downloads| |badge_testing| |badge_coverage| |badge_license|\n\n.. |badge_pypi| image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fpygod.svg?color=brightgreen\n   :target: https:\u002F\u002Fpypi.org\u002Fproject\u002Fpygod\u002F\n   :alt: PyPI版本\n\n.. |badge_docs| image:: https:\u002F\u002Freadthedocs.org\u002Fprojects\u002Fpy-god\u002Fbadge\u002F?version=latest\n   :target: https:\u002F\u002Fdocs.pygod.org\u002Fen\u002Flatest\u002F?badge=latest\n   :alt: 文档状态\n\n.. |badge_stars| image:: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fpygod-team\u002Fpygod?style=flat\n   :target: https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fstargazers\n   :alt: GitHub星标\n\n.. |badge_forks| image:: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fforks\u002Fpygod-team\u002Fpygod?style=flat\n   :target: https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fnetwork\n   :alt: GitHub叉子\n\n.. |badge_downloads| image:: https:\u002F\u002Fstatic.pepy.tech\u002Fpersonalized-badge\u002Fpygod?period=total&units=international_system&left_color=grey&right_color=blue&left_text=Downloads\n   :target: https:\u002F\u002Fpepy.tech\u002Fproject\u002Fpygod\n   :alt: PyPI下载量\n\n.. |badge_testing| image:: https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Factions\u002Fworkflows\u002Ftesting.yml\u002Fbadge.svg\n   :target: https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Factions\u002Fworkflows\u002Ftesting.yml\n   :alt: 测试\n\n.. |badge_coverage| image:: https:\u002F\u002Fcoveralls.io\u002Frepos\u002Fgithub\u002Fpygod-team\u002Fpygod\u002Fbadge.svg?branch=main\n   :target: https:\u002F\u002Fcoveralls.io\u002Fgithub\u002Fpygod-team\u002Fpygod?branch=main\n   :alt: 覆盖率状态\n\n.. |badge_license| image:: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fpygod-team\u002Fpygod.svg\n   :target: https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fblob\u002Fmaster\u002FLICENSE\n   :alt: 许可证\n\n\n-----\n\nPyGOD是一个用于**图异常检测**（离群点检测）的**Python库**。\n这一充满挑战又极具吸引力的研究领域有着广泛的应用，例如在社交网络[#Dou2020Enhancing]_ 和安全系统[#Cai2021Structural]_ 中检测可疑活动。\n\nPyGOD包含**10多种**图异常检测算法。\n为保持一致性和易用性，PyGOD基于`PyTorch Geometric (PyG) \u003Chttps:\u002F\u002Fwww.pyg.org\u002F>`_ 和 `PyTorch \u003Chttps:\u002F\u002Fpytorch.org\u002F>`_ 开发，并遵循 `PyOD \u003Chttps:\u002F\u002Fgithub.com\u002Fyzhao062\u002Fpyod>`_ 的API设计。\n下面通过示例展示如何仅用5行代码使用PyGOD进行异常检测！\n\n\n**PyGOD的特点包括**：\n\n* **统一的API、详尽的文档和交互式示例**，覆盖多种基于图的算法。\n* **全面的算法覆盖**，支持10余种图异常检测器。\n* **多层级检测支持**，涵盖节点级、边级和图级任务。\n* **大规模图处理的可扩展设计**，通过小批量处理和采样实现高效计算。\n* **与PyG数据对象完全兼容**，可无缝集成到PyG的数据处理流程中。\n\n**使用PyGOD进行异常检测：只需5行代码**\\ :\n\n.. code-block:: python\n\n\n    # 训练一个DOMINANT检测器\n    from pygod.detector import DOMINANT\n\n    model = DOMINANT(num_layers=4, epoch=20)  # 可在此设置超参数\n    model.fit(train_data)  # 输入数据为PyG数据对象\n\n    # 在训练数据上获取异常分数（直推式设置）\n    score = model.decision_score_\n\n    # 在测试数据上预测标签和分数（归纳式设置）\n    pred, score = model.predict(test_data, return_score=True)\n\n\n**引用PyGOD**\\ :\n\n我们的`软件论文 \u003Chttps:\u002F\u002Fjmlr.org\u002Fpapers\u002Fv25\u002F23-0963.html>`_ 和 `基准论文 \u003Chttps:\u002F\u002Fproceedings.neurips.cc\u002Fpaper_files\u002Fpaper\u002F2022\u002Fhash\u002Facc1ec4a9c780006c9aafd595104816b-Abstract-Datasets_and_Benchmarks.html>`_ 已公开发布。\n如果您在科学出版物中使用了PyGOD或BOND，我们非常感谢您引用以下论文：\n\n    @article{JMLR:v25:23-0963,\n      author  = {Kay Liu and Yingtong Dou and Xueying Ding and Xiyang Hu and Ruitong Zhang and Hao Peng and Lichao Sun and Philip S. Yu},\n      title   = {{PyGOD}: A {Python} Library for Graph Outlier Detection},\n      journal = {Journal of Machine Learning Research},\n      year    = {2024},\n      volume  = {25},\n      number  = {141},\n      pages   = {1--9},\n      url     = {http:\u002F\u002Fjmlr.org\u002Fpapers\u002Fv25\u002F23-0963.html}\n    }\n    @inproceedings{NEURIPS2022_acc1ec4a,\n     author = {Liu, Kay and Dou, Yingtong and Zhao, Yue and Ding, Xueying and Hu, Xiyang and Zhang, Ruitong and Ding, Kaize and Chen, Canyu and Peng, Hao and Shu, Kai and Sun, Lichao and Li, Jundong and Chen, George H and Jia, Zhihao and Yu, Philip S},\n     booktitle = {Advances in Neural Information Processing Systems},\n     editor = {S. Koyejo and S. Mohamed and A. Agarwal and D. Belgrave and K. Cho and A. Oh},\n     pages = {27021--27035},\n     publisher = {Curran Associates, Inc.},\n     title = {{BOND}: Benchmarking Unsupervised Outlier Node Detection on Static Attributed Graphs},\n     url = {https:\u002F\u002Fproceedings.neurips.cc\u002Fpaper_files\u002Fpaper\u002F2022\u002Ffile\u002Facc1ec4a9c780006c9aafd595104816b-Paper-Datasets_and_Benchmarks.pdf},\n     volume = {35},\n     year = {2022}\n    }\n\n或者：\n\n    刘凯、窦英彤、丁雪莹、胡西阳、张瑞通、彭浩、孙立超、于Philip S., 2024. PyGOD：用于图异常检测的Python库。机器学习研究期刊，第25卷，第141期，第1–9页。\n    刘凯、窦英彤、赵悦、丁雪莹、胡西阳、张瑞通、丁凯泽、陈灿宇、彭浩、舒凯、孙立超、李俊东、陈乔治H、贾志豪、于Philip S., 2022. BOND：静态属性图上无监督节点异常检测的基准测试。神经信息处理系统进展，第35卷，第27021–27035页。\n\n----\n\n安装\n^^^^^^^^\n\n**关于PyG和PyTorch的安装说明**\\ :\nPyGOD依赖于`torch \u003Chttps:\u002F\u002Fhttps:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F>`_ 和 `torch_geometric（包括其可选依赖项） \u003Chttps:\u002F\u002Fpytorch-geometric.readthedocs.io\u002Fen\u002Flatest\u002Finstall\u002Finstallation.html#>`_。\n为简化安装过程，PyGOD**不会自动为您安装这些库**。\n请务必从上述链接安装以下库以运行PyGOD：\n\n* torch>=2.0.0\n* torch_geometric>=2.3.0\n\n建议使用**pip**进行安装。\n请确保安装的是**最新版本**，因为PyGOD会频繁更新：\n\n.. code-block:: bash\n\n   pip install pygod            # 普通安装\n   pip install --upgrade pygod  # 或根据需要更新\n\n此外，您也可以克隆仓库并运行setup.py文件：\n\n.. code-block:: bash\n\n   git clone https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod.git\n   cd pygod\n   pip install .\n\n**所需依赖**\\ :\n\n* python>=3.8\n* numpy>=1.24.3\n* scikit-learn>=1.2.2\n* scipy>=1.10.1\n* networkx>=3.1\n\n\n----\n\n\n使用PyGOD快速开始异常检测\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n`“闪电入门” \u003Chttps:\u002F\u002Fdocs.pygod.org\u002Fen\u002Flatest\u002Ftutorials\u002F1_intro.html#sphx-glr-tutorials-1-intro-py>`_\n通过DOMINANT检测器展示了PyGOD的基本API。**需要注意的是，所有其他算法的API都保持一致或相似**。\n\n\n----\n\n\nAPI速查表及参考\n^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n完整的 API 参考：(https:\u002F\u002Fdocs.pygod.org)。所有检测器的 API 备忘录：\n\n* **fit(data)**\\ ：使用训练数据拟合检测器。\n* **predict(data)**\\ ：使用已拟合的检测器对测试数据进行预测（如果未提供测试数据，则使用训练数据）。\n\n已拟合检测器的关键属性：\n\n* **decision_score_**\\ ：输入数据的异常分数。异常值通常具有较高的分数。\n* **label_**\\ ：输入数据的二元标签。0 表示内点，1 表示异常点。\n* **threshold_**\\ ：确定的二分类阈值。高于该阈值的分数被视为异常值。\n\n**PyGOD 的输入**：请传入一个 `PyG Data 对象 \u003Chttps:\u002F\u002Fpytorch-geometric.readthedocs.io\u002Fen\u002Flatest\u002Fgenerated\u002Ftorch_geometric.data.Data.html#torch_geometric.data.Data>`_。\n请参阅 `PyG 数据处理示例 \u003Chttps:\u002F\u002Fpytorch-geometric.readthedocs.io\u002Fen\u002Flatest\u002Fnotes\u002Fintroduction.html#data-handling-of-graphs>`_。\n\n\n已实现的算法\n^^^^^^^^^^^^^^\n\n==================  =====  ===========  ===========  ========================================\n缩写                年份   主干网络     采样策略      参考文献\n==================  =====  ===========  ===========  ========================================\nSCAN                2007   聚类         无           [#Xu2007Scan]_\nGAE                 2016   GNN+AE       是          [#Kipf2016Variational]_\nRadar               2017   矩阵分解     无           [#Li2017Radar]_\nANOMALOUS           2018   矩阵分解     无           [#Peng2018Anomalous]_\nONE                 2019   矩阵分解     无           [#Bandyopadhyay2019Outlier]_\nDOMINANT            2019   GNN+AE       是          [#Ding2019Deep]_\nDONE                2020   MLP+AE       是          [#Bandyopadhyay2020Outlier]_\nAdONE               2020   MLP+AE       是          [#Bandyopadhyay2020Outlier]_\nAnomalyDAE          2020   GNN+AE       是          [#Fan2020AnomalyDAE]_\nGAAN                2020   GAN          是          [#Chen2020Generative]_\nDMGD                2020   GNN+AE       是          [#Bandyopadhyay2020Integrating]_\nOCGNN               2021   GNN          是          [#Wang2021One]_\nCoLA                2021   GNN+AE+SSL   是          [#Liu2021Anomaly]_\nGUIDE               2021   GNN+AE       是          [#Yuan2021Higher]_\nCONAD               2022   GNN+AE+SSL   是          [#Xu2022Contrastive]_\nGADNR               2024   GNN+AE       是          [#Roy2024Gadnr]_\nCARD                2024   GNN+SSL+AE   是          [#Wang2024Card]_\n==================  =====  ===========  ===========  ========================================\n\n\n----\n\n如何贡献\n^^^^^^^^^\n\n欢迎为这个令人兴奋的项目做出贡献：\n\n更多信息请参阅 `贡献指南 \u003Chttps:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fblob\u002Fmain\u002FCONTRIBUTING.rst>`_。\n\n\n----\n\nPyGOD 团队\n^^^^^^^^^^\n\nPyGOD 是由来自 UIC、IIT、BUAA、ASU 和 CMU 的研究人员共同完成的一项杰出团队合作成果。\n我们的核心团队成员包括：\n\n`Kay Liu (UIC) \u003Chttps:\u002F\u002Fkayzliu.com\u002F>`_,\n`Yingtong Dou (UIC) \u003Chttp:\u002F\u002Fytongdou.com\u002F>`_,\n`Yue Zhao (CMU) \u003Chttps:\u002F\u002Fwww.andrew.cmu.edu\u002Fuser\u002Fyuezhao2\u002F>`_,\n`Xueying Ding (CMU) \u003Chttps:\u002F\u002Fscholar.google.com\u002Fcitations?user=U9CMsh0AAAAJ&hl=en>`_,\n`Xiyang Hu (CMU) \u003Chttps:\u002F\u002Fwww.andrew.cmu.edu\u002Fuser\u002Fxiyanghu\u002F>`_,\n`Ruitong Zhang (BUAA) \u003Chttps:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod>`_,\n`Kaize Ding (ASU) \u003Chttps:\u002F\u002Fwww.public.asu.edu\u002F~kding9\u002F>`_,\n`Canyu Chen (IIT) \u003Chttps:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod>`_，\n\n您可以通过提交问题报告或发送电子邮件至 dev@pygod.org 与我们联系。\n\n----\n\n参考文献\n^^^^^^^^^\n\n.. [#Dou2020Enhancing] Dou, Y., Liu, Z., Sun, L., Deng, Y., Peng, H. and Yu, P.S., 2020年10月. 增强基于图神经网络的欺诈检测器以应对伪装欺诈者. 在第29届ACM国际信息与知识管理会议(CIKM)论文集中.\n\n.. [#Cai2021Structural] Cai, L., Chen, Z., Luo, C., Gui, J., Ni, J., Li, D. and Chen, H., 2021年10月. 用于动态图异常检测的结构化时序图神经网络. 在第30届ACM国际信息与知识管理会议(CIKM)论文集中.\n\n.. [#Xu2007Scan] Xu, X., Yuruk, N., Feng, Z. and Schweiger, T.A., 2007年8月. SCAN：一种用于网络的结构化聚类算法. 在第13届ACM SIGKDD国际知识发现与数据挖掘会议(KDD)论文集中.\n\n.. [#Kipf2016Variational] Kipf, T.N. and Welling, M., 2016. 变分图自编码器. arXiv预印本arXiv:1611.07308.\n\n.. [#Li2017Radar] Li, J., Dani, H., Hu, X. and Liu, H., 2017年8月. Radar：用于属性网络异常检测的残差分析. 在第二十六届国际人工智能联合会议(IJCAI)论文集中.\n\n.. [#Peng2018Anomalous] Peng, Z., Luo, M., Li, J., Liu, H. and Zheng, Q., 2018年7月. ANOMALOUS：一种用于属性网络异常检测的联合建模方法. 在第二十七届国际人工智能联合会议(IJCAI)论文集中.\n\n.. [#Bandyopadhyay2019Outlier] Bandyopadhyay, S., Lokesh, N. and Murty, M.N., 2019年7月. 面向属性网络的异常感知网络嵌入. 在AAAI人工智能会议论文集中.\n\n.. [#Ding2019Deep] Ding, K., Li, J., Bhanushali, R. and Liu, H., 2019年5月. 属性网络上的深度异常检测. 在SIAM国际数据挖掘会议(SDM)论文集中.\n\n.. [#Bandyopadhyay2020Outlier] Bandyopadhyay, S., Vivek, S.V. and Murty, M.N., 2020年1月. 抗异常的无监督深度架构用于属性网络嵌入. 在国际网络搜索与数据挖掘会议(WSDM)论文集中.\n\n.. [#Fan2020AnomalyDAE] Fan, H., Zhang, F. and Li, Z., 2020年5月. AnomalyDAE：用于属性网络异常检测的双自编码器. 在IEEE国际声学、语音和信号处理会议(ICASSP)论文集中.\n\n.. [#Chen2020Generative] Chen, Z., Liu, B., Wang, M., Dai, P., Lv, J. and Bo, L., 2020年10月. 生成对抗网络在属性网络异常检测中的应用. 在第29届ACM国际信息与知识管理会议(CIKM)论文集中.\n\n.. [#Bandyopadhyay2020Integrating] Bandyopadhyay, S., Vishal Vivek, S. and Murty, M.N., 2020. 通过多类别图描述整合网络嵌入与社区异常检测. 《人工智能与应用前沿》(FAIA).\n\n.. [#Wang2021One] Wang, X., Jin, B., Du, Y., Cui, P., Tan, Y. and Yang, Y., 2021. 单类图神经网络用于属性网络的异常检测. 《神经计算与应用》杂志.\n\n.. [#Liu2021Anomaly] Liu, Y., Li, Z., Pan, S., Gong, C., Zhou, C. and Karypis, G., 2021. 通过对比自监督学习在属性网络上进行异常检测. IEEE神经网络与学习系统汇刊(TNNLS).\n\n.. [#Yuan2021Higher] Yuan, X., Zhou, N., Yu, S., Huang, H., Chen, Z. 和 Xia, F., 2021年12月. 基于高阶结构的属性网络异常检测. 载于2021年IEEE大数据国际会议（Big Data）.\n\n.. [#Xu2022Contrastive] Xu, Z., Huang, X., Zhao, Y., Dong, Y. 和 Li, J., 2022年. 基于数据增强的对比式属性网络异常检测. 载于第26届亚太知识发现与数据挖掘大会（PAKDD）论文集.\n\n.. [#Roy2024Gadnr] Roy, A., Shu, J., Li, J., Yang, C., Elshocht, O., Smeets, J. 和 Li, P., 2024年. GAD-NR：基于邻居重构的图异常检测. 载于第17届ACM国际网络搜索与数据挖掘大会（WSDM）论文集.\n\n.. [#Wang2024Card] Wang Y., Wang X., He C., Chen X., Luo Z., Duan L., Zuo J., 2024年. 面向属性网络异常检测的社区引导对比学习与异常感知重建. 载于高级应用数据库系统会议（DASFAA）.","# PyGOD 快速上手指南\n\nPyGOD 是一个基于 Python 的**图异常检测**（Graph Outlier Detection）库，内置了 10+ 种主流算法。它构建于 PyTorch Geometric (PyG) 之上，API 设计遵循 PyOD 风格，支持节点、边和图级别的异常检测任务。\n\n## 环境准备\n\n在安装 PyGOD 之前，请确保满足以下系统要求和前置依赖。**注意：PyGOD 不会自动安装 PyTorch 和 PyG，需手动预先安装。**\n\n### 系统要求\n*   **Python**: >= 3.8\n*   **核心依赖**:\n    *   `torch` >= 2.0.0\n    *   `torch_geometric` >= 2.3.0\n    *   `numpy` >= 1.24.3\n    *   `scikit-learn` >= 1.2.2\n    *   `scipy` >= 1.10.1\n    *   `networkx` >= 3.1\n\n### 前置依赖安装建议\n由于 PyTorch 和 PyG 的版本匹配较为严格，建议先访问 [PyTorch 官网](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F) 获取适合你环境的安装命令。\n\n**国内加速方案**：\n推荐使用清华或阿里镜像源加速安装：\n```bash\npip install torch torchvision torchaudio --index-url https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\npip install torch_geometric -f https:\u002F\u002Fdata.pyg.org\u002Fwhl\u002Ftorch-2.0.0+cpu.html\n# 请将上述命令中的 torch 版本替换为你实际安装的版本\n```\n\n## 安装步骤\n\n确保前置依赖安装完成后，使用 pip 安装 PyGOD。\n\n**标准安装：**\n```bash\npip install pygod\n```\n\n**升级安装（如果已安装旧版）：**\n```bash\npip install --upgrade pygod\n```\n\n**源码安装（可选）：**\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod.git\ncd pygod\npip install .\n```\n\n## 基本使用\n\nPyGOD 的 API 设计非常简洁，所有检测器均遵循统一的 `fit` -> `predict` 流程。输入数据需为 **PyG Data 对象**。\n\n以下示例展示了如何使用 `DOMINANT` 算法在 5 行代码内完成异常检测：\n\n```python\n# 导入检测器\nfrom pygod.detector import DOMINANT\n\n# 初始化模型并设置超参数\nmodel = DOMINANT(num_layers=4, epoch=20)\n\n# 训练模型 (输入数据为 PyG Data 对象)\nmodel.fit(train_data)\n\n# 获取训练数据的异常分数 (直推式设置)\nscore = model.decision_score_\n\n# 预测测试数据的标签和分数 (归纳式设置)\npred, score = model.predict(test_data, return_score=True)\n```\n\n### 关键属性说明\n模型拟合后，可通过以下属性获取结果：\n*   `decision_score_`: 输入数据的异常分数（分数越高越可能是异常点）。\n*   `label_`: 二分类标签（0 代表正常点，1 代表异常点）。\n*   `threshold_`: 判定异常的二分类阈值。\n\n> **提示**：PyGOD 内置了包括 SCAN, GAE, Radar, ANOMALOUS, ONE, DONE, AdONE, AnomalyDAE, GAAN, DMGD, OCGNN, CoLA, GUIDE, CONAD, GADNR, CARD 等在内的多种算法，只需将 `DOMINANT` 替换为其他算法类名即可切换模型。","某大型电商平台的反欺诈团队正致力于从复杂的用户 - 商品交互网络中，实时识别隐蔽的刷单团伙和异常交易行为。\n\n### 没有 pygod 时\n- **算法复现成本极高**：团队需手动从零编写图神经网络代码来复现 DOMINANT 等前沿算法，耗时数周且极易出错。\n- **多粒度检测支持缺失**：现有工具仅支持节点级分析，难以同时覆盖“异常边”（虚假交易）和“异常子图”（团伙作案）的检测需求。\n- **大规模数据处理瓶颈**：面对亿级用户关系图，缺乏内置的迷你批（mini-batch）和采样机制，导致内存溢出或训练停滞。\n- **技术栈割裂严重**：图数据处理格式与深度学习框架不兼容，需编写大量胶水代码进行数据转换，维护困难。\n\n### 使用 pygod 后\n- **开箱即用的算法库**：直接调用 pygod 内置的 10+ 种检测器，仅需 5 行代码即可完成模型训练与异常评分，研发周期缩短 90%。\n- **全层级异常捕捉**：原生支持节点、边及图级别的检测任务，能精准定位单个作弊账号、虚假交易链路及有组织团伙。\n- **原生可扩展性**：依托 PyTorch Geometric 架构，轻松通过采样策略处理超大规模图谱，实现高效分布式训练。\n- **无缝生态集成**：完全兼容 PyG 数据对象，统一了数据预处理到模型部署的 API 标准，大幅降低工程复杂度。\n\npygod 将原本需要数月攻坚的图异常检测工程，转化为标准化的快速迭代流程，让团队能专注于业务策略而非底层算法实现。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fpygod-team_pygod_5c55c8d3.png","pygod-team","PyGOD Team","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fpygod-team_34efd5f9.png","Maintaining A Python Library for Graph Outlier Detection (Anomaly Detection)",null,"dev@pygod.org","https:\u002F\u002Fpygod.org","https:\u002F\u002Fgithub.com\u002Fpygod-team",[81],{"name":82,"color":83,"percentage":84},"Python","#3572A5",100,1490,139,"2026-04-15T19:43:39","BSD-2-Clause","","未说明（基于 PyTorch 和 PyG，通常支持 CPU 及可选 GPU 加速）","未说明",{"notes":93,"python":94,"dependencies":95},"PyGOD 不会自动安装 PyTorch (torch) 和 PyTorch Geometric (torch_geometric)，用户需先手动安装这两个库。输入数据必须为 PyG Data 对象。该库专注于图异常检测，包含 10+ 种算法，支持节点、边和图级别的检测任务。","3.8+",[96,97,98,99,100,101],"torch>=2.0.0","torch_geometric>=2.3.0","numpy>=1.24.3","scikit-learn>=1.2.2","scipy>=1.10.1","networkx>=3.1",[14],[104,105,106,107,108,109,110,111,112,113,114,115,116],"outlier-detection","anomaly-detection","graph-anomaly-detection","machine-learning","security-tools","opensource","deeplearning","python","graphmining","pytorch","graph-neural-networks","fraud-detection","toolkit","2026-03-27T02:49:30.150509","2026-04-18T14:15:04.921184",[120,125,130,135,140,145,150],{"id":121,"question_zh":122,"answer_zh":123,"source_url":124},39649,"运行 AdONE 模型时，为什么损失值（loss）有时会变成 'nan'？","这通常是由于之前的实现缺少“对抗”部分或损失函数中的除法操作导致的。解决方案包括：\n1. 更新到主分支（main branch），维护者已修复了缺失的对抗部分。\n2. 如果问题仍然存在，可能是损失函数中的 `mean` 和 `sum` 操作导致的。建议在本地文件中将 `AdONEBase` 的 `loss_func` 里的所有 `mean` 和 `sum` 替换为 PyTorch 的 `nanmean` 和 `nansum`。\n参考代码位置：pygod\u002Fnn\u002Fadone.py 中的 loss_func 部分。","https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fissues\u002F99",{"id":126,"question_zh":127,"answer_zh":128,"source_url":129},39650,"DOMINANT 模型的预测输出中，outlier_labels 数组的含义是什么？","outlier_labels 是一个形状为 (n_samples,) 的 numpy 数组，用于指示图中每个节点的状态。数组中的每个值对应图中的一个节点：\n- 0 表示该节点是正常的（normal）。\n- 1 表示该节点是异常的（anomalous\u002Foutlier）。\n例如，标签 [0, 0, 0, ..., 1] 表示前几个节点正常，最后一个节点异常。","https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fissues\u002F24",{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},39651,"为什么无法复现 BOND 论文中 DOMINANT 模型在 inj_cora 和 inj_amazon 数据集上的结果？","结果不一致可能由以下原因导致：\n1. 代码中存在拼写错误（如 'wight'），已在后续 PR 中修复。\n2. 版本差异：若要精确复现论文 Table 3 的结果，可能需要降级到 v0.3.1 版本。\n3. 超参数设置：在 v1.0.0 版本中，移除启发式选择逻辑（去掉 if-else 块，直接将 alpha 设置为 [0.8, 0.5, 0.2]）可能有助于提升效果，但仍可能与旧版本结果有差异。建议检查 dropout, lr, weight_decay, hid_dim 等超参数的组合。","https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fissues\u002F83",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},39652,"使用 1080ti GPU 运行时，除 Cora 外的数据集出现显存不足（Out of Memory）错误怎么办？","这是一个已知问题，通常与批次大小或模型配置有关。虽然具体解决步骤在讨论中未完全公开（用户通过私下联系解决），但通用的排查建议包括：\n1. 减小 batch_size。\n2. 降低隐藏层维度（hid_dim）。\n3. 确保使用的是最新版本的库，因为内存优化可能在更新中已包含。\n如果遇到此问题，建议检查显存占用并适当调整上述超参数。","https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fissues\u002F42",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},39653,"为什么代码中的 DOMINANT 模型包含结构解码器（struct decoder），而论文中似乎只提到了属性解码器？","代码实现与论文描述确实存在细节差异。虽然论文主要强调属性解码器，但在实际代码实现中，为了更全面地重构图结构，加入了基于 GCN 的结构解码器（使用 sigmoid 激活函数）。这种实现是为了增强模型对结构异常的检测能力，是对原始论文方法的工程化扩展和改进。","https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fissues\u002F74",{"id":146,"question_zh":147,"answer_zh":148,"source_url":149},39654,"PyGOD 中的 'inj_flickr' 数据集与 PyTorch Geometric (PyG) 中的 'Flickr' 数据集有什么区别？","这两个数据集是不同的，设计目的也不同：\n1. **规模与特征**：PyG 中的 Flickr 数据集节点和边数量更大，特征维度为 12407；而 PyGOD 中的 inj_flickr 特征维度为 500，平均节点度也不同。\n2. **用途**：PyGOD 提供 inj_flickr 并非为了直接与 PyG 的 Flickr 进行对比，而是为了提供不同规模的数据集以评估模型。\n3. **异常注入**：inj_flickr 对结构异常进行了特殊处理（如添加边丢弃概率），使得全连接簇中的结构异常不那么明显，从而增加检测难度，避免基线模型过于容易地检测到异常。","https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fissues\u002F48",{"id":151,"question_zh":152,"answer_zh":153,"source_url":154},39655,"安装 PyGOD 时是否需要单独安装 `argparse` 库？","不需要。`argparse` 是 Python 3 的标准库的一部分，无需通过 pip 单独安装。如果在依赖列表中看到它，可以忽略或直接移除，安装外部版本的 `argparse` 是多余的且该外部库已不再维护。","https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fissues\u002F28",[156,161,166,171,176,181,186],{"id":157,"version":158,"summary_zh":159,"released_at":160},315578,"v1.1.0","## 变更内容\n* 新增两个检测器：@YingtongDou 提供的 [`GADNR`](https:\u002F\u002Fdocs.pygod.org\u002Fen\u002Flatest\u002Fgenerated\u002Fpygod.detector.GADNR.html) 和 @kayzliu 提供的 [`DMGD`](https:\u002F\u002Fdocs.pygod.org\u002Fen\u002Flatest\u002Fgenerated\u002Fpygod.detector.DMGD.html)\n* 新增关于[分数转换](https:\u002F\u002Fdocs.pygod.org\u002Fen\u002Flatest\u002Ftutorials\u002F2_convert.html#sphx-glr-tutorials-2-convert-py)的教程\n* 新增关于[GPU训练](https:\u002F\u002Fdocs.pygod.org\u002Fen\u002Flatest\u002Fminibatch.html)的教程\n* 修复了多个 bug\n\n非常感谢社区贡献者对 PyGOD 的改进：@OldPanda、@ParthaPratimBanik、@ahmed3amerai\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fcompare\u002Fv1.0.0...v1.1.0","2024-02-04T21:24:35",{"id":162,"version":163,"summary_zh":164,"released_at":165},315579,"v1.0.0","我们非常高兴地发布 PyGOD v1.0.0，这是 PyG 生态中一个功能全面的开源图异常检测库。\n\nPyGOD 包含超过 10 种最新的图异常检测算法，这些算法基于 PyTorch 和 PyG 构建。它具有以下特点：\n- 统一且简洁的 API：```detector.fit```、```detector.predict```\n- 完整的文档和示例，详见 [docs.pygod.org](docs.pygod.org)\n- 您只需准备一个 PyG 的 Data 对象即可开始使用\n\n近期版本中的新特性包括：\n- 内置数据集和基准测试：```utils.load_data```\n- 模块化组件：```nn.encoder```、```nn.decoder```、```nn.functional``` 等\n- 丰富的工具函数：```metric```、```generator```、```utils``` 等\n\n如果您遇到任何问题或有任何建议，请提交 issue，或通过电子邮件 dev@pygod.org 与我们联系。同时，也欢迎您在自己的项目中试用！我们非常感谢每一份 star、fork 和关注。","2023-07-20T01:35:47",{"id":167,"version":168,"summary_zh":169,"released_at":170},315580,"v0.4.0","我们很高兴地宣布最终的准 Alpha 版本 PyGOD v0.4，这标志着我们在开发过程中迈出了重要的一步。在修复了一些 bug 并进行了一些小改进之后，我们计划发布 v1.0 版本。非常感谢您的反馈和建议！⚠️ 请注意，此版本不向后兼容，部分 API 已经发生了变化。以下是本次发布的重大变更：\n\n## 增强的基类\n- `Detector`：所有检测器的基类。\n- `DeepDetector`：所有基于深度学习的检测器的基类。\n\n## 简化后的 API\n- 移除了 `predict_proba` 和 `predict_confidence` 方法。\n- 改为使用 `predict(return_prob=True, return_conf=True)`。\n\n## 模块化的检测器\n我们现在引入了多个模块，以提高代码的可重用性和扩展性。\n- `nn`：所有基础模型都继承自 `torch.nn.Module`。\n- `nn.encoder`：\n- `nn.decoder`：\n- `nn.functional`：包含损失函数等。\n此外，我们还更改了几处模块名称，以提升清晰度。\n- `models` → `detector`\n- `metrics` → `metric`\n\n## 更多实用函数\n- `to_edge_score`：边异常分数转换器\n- `to_graph_score`：图异常分数转换器\n- `init_detector`：检测器初始化器\n- `init_nn`：神经网络初始化器\n\n## 更新的依赖要求\n- PyGOD 现在需要 Python 3.8 及以上版本。\n- 支持 PyTorch 2.0 和 PyG 2.3.0。\n- 通过 `detector(compile_model=True)` 启用模型编译功能（测试版）。\n\n## 还有更多改进\n- 测试覆盖率更加全面（接近 100%）。\n- 重新组织了文档，提升了可读性。\n- 将 `MLPAE` 和 `GCNAE` 合并为 `GAE`。\n- 大多数深度检测器支持从 PyG 中指定不同的骨干网络。\n- 通过设置 `save_emb=True`，可以从已拟合的深度检测器中获取学习到的嵌入，访问路径为 `detector.emb`。","2023-05-16T06:52:55",{"id":172,"version":173,"summary_zh":174,"released_at":175},315581,"v0.3.1","## 变更内容\n* 在结构异常点注入中添加了边丢弃概率\n* 更新了基准测试脚本，增加了更多数据集\n* @cshjin、@YingtongDou 和 @kayzliu 进行了多项小修复\n\n## 新贡献者\n* @cshjin 在 https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fpull\u002F40 中完成了首次贡献\n","2022-09-06T20:51:52",{"id":177,"version":178,"summary_zh":179,"released_at":180},315582,"v0.3.0","## 新增内容\n\n- 我们发布了首个全面的节点级图异常检测基准，相关论文已在 [arXiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F2206.10071) 上公开。更多详情请参阅 [基准测试](https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Ftree\u002Fmain\u002Fbenchmark) 和 [数据集](https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fdata)。\n- 新增模型 [```SCAN```](https:\u002F\u002Fdocs.pygod.org\u002Fen\u002Flatest\u002Fpygod.models.html#scan)、[```Radar```](https:\u002F\u002Fdocs.pygod.org\u002Fen\u002Flatest\u002Fpygod.models.html#radar) 和 [```ANOMALOUS```](https:\u002F\u002Fdocs.pygod.org\u002Fen\u002Flatest\u002Fpygod.models.html#anomalous)。\n- 通过向量化加速了 ```GAAN``` 和 ```CONAD```，速度最高可提升至原来的40倍。\n- 新增指标 [```eval_ndcg```](https:\u002F\u002Fdocs.pygod.org\u002Fen\u002Flatest\u002Fpygod.metrics.html#pygod.metrics.eval_ndcg)。","2022-06-25T08:47:55",{"id":182,"version":183,"summary_zh":184,"released_at":185},315583,"v0.2.0","## 新增内容\n* 我们的论文已在 [arXiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F2204.12095) 上发布。\n* 我们使大多数模型支持小批量训练，支持的模型列表请参见 [模型列表](https:\u002F\u002Fdocs.pygod.org\u002Fen\u002Flatest\u002F#implemented-algorithms)。@kayzliu @xyvivian @aha12345678\n* @harvardchen 新增了两个模型 [```CoLA```](https:\u002F\u002Fdocs.pygod.org\u002Fen\u002Flatest\u002Fpygod.models.html#cola)（测试版）和 ```ANEMONE```（测试版）。\n* 首位社区贡献者 @zhiming-xu 新增了一个模型 [```CONAD```](https:\u002F\u002Fdocs.pygod.org\u002Fen\u002Flatest\u002Fpygod.models.html#conad)。\n* @YingtongDou 新增了一个指标 [```eval_average_precision```](https:\u002F\u002Fdocs.pygod.org\u002Fen\u002Flatest\u002Fpygod.utils.html#pygod.utils.metric.eval_average_precision)。\n* @yzhao062 改进了设备设置。","2022-04-30T02:29:12",{"id":187,"version":188,"summary_zh":189,"released_at":190},315584,"v0.1.1","许多关键应用都依赖图数据。为了满足这一需求，我们开源了首个全面的图异常检测库——PyGOD。\n\nPyGOD 包含超过 10 种最新的图异常检测算法，基于 [PyTorch](https:\u002F\u002Fpytorch.org) 和 [PyG](https:\u002F\u002Fwww.pyg.org) 构建。其特点包括：\n- 提供与 [PyOD](https:\u002F\u002Fgithub.com\u002Fyzhao062\u002Fpyod) 一致且简洁的统一 API：仅需 5 行代码即可利用图神经网络进行异常检测；\n- 完整的文档和示例；\n- 无论用于学术研究还是工业应用，您只需准备符合 PyG 格式的图数据即可。\n\nPyGOD 是由伊利诺伊大学芝加哥分校、卡内基梅隆大学、亚利桑那州立大学、印度理工学院和北京航空航天大学共同协作完成的成果。我们承诺将持续维护该库，并不断添加新模型。同时，我们的目标是将图异常检测方法推广至更广泛的受众。如果您遇到任何问题或有任何建议，请[提交 issue](https:\u002F\u002Fgithub.com\u002Fpygod-team\u002Fpygod\u002Fissues) 或通过电子邮件 dev@pygod.org 与我们联系。也欢迎您将其集成到自己的项目中进行尝试！\n\n我们非常感谢每一位给予 Star、Fork 和关注的朋友！","2022-04-04T22:30:00"]