[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"tool-benedekrozemberczki--pytorch_geometric_temporal":3,"similar-benedekrozemberczki--pytorch_geometric_temporal":201},{"id":4,"github_repo":5,"name":6,"description_en":7,"description_zh":8,"ai_summary_zh":9,"readme_en":10,"readme_zh":11,"quickstart_zh":12,"use_case_zh":13,"hero_image_url":14,"owner_login":15,"owner_name":16,"owner_avatar_url":17,"owner_bio":18,"owner_company":19,"owner_location":20,"owner_email":21,"owner_twitter":22,"owner_website":23,"owner_url":24,"languages":25,"stars":30,"forks":31,"last_commit_at":32,"license":33,"difficulty_score":34,"env_os":35,"env_gpu":36,"env_ram":37,"env_deps":38,"category_tags":44,"github_topics":48,"view_count":34,"oss_zip_url":23,"oss_zip_packed_at":23,"status":68,"created_at":69,"updated_at":70,"faqs":71,"releases":101},5089,"benedekrozemberczki\u002Fpytorch_geometric_temporal","pytorch_geometric_temporal","PyTorch Geometric Temporal: Spatiotemporal Signal Processing with Neural Machine Learning Models (CIKM 2021)","pytorch_geometric_temporal 是一个专为处理时空数据设计的深度学习扩展库，作为 PyTorch Geometric 的动态版本，它专注于利用神经网络模型进行时空信号处理。在现实世界中，许多数据（如交通流量、疫情传播、能源消耗）不仅包含复杂的节点关系，还随时间动态变化，传统静态图神经网络难以有效捕捉这类时序演化特征。该工具通过集成多种前沿的动态几何深度学习算法和时空回归方法，帮助开发者轻松构建能够同时理解“空间结构”与“时间趋势”的模型。\n\n它非常适合人工智能研究人员、数据科学家以及需要处理动态图数据的工程师使用。无论是进行流行病学预测、共享经济分析，还是网页流量管理，用户都能直接调用库中预置的基准数据集和模型，或利用其便捷的数据加载器、训练集分割器及时序快照迭代器快速搭建实验环境。\n\n技术层面，pytorch_geometric_temporal 具备显著的内存效率优势。其独有的“索引批处理”（index-batching）技术能在不牺牲精度的前提下大幅提升显存利用率，支持更大规模的数据训练。此外，它还原生支持 GPU 加速，并能与 PyTorch Lightn","pytorch_geometric_temporal 是一个专为处理时空数据设计的深度学习扩展库，作为 PyTorch Geometric 的动态版本，它专注于利用神经网络模型进行时空信号处理。在现实世界中，许多数据（如交通流量、疫情传播、能源消耗）不仅包含复杂的节点关系，还随时间动态变化，传统静态图神经网络难以有效捕捉这类时序演化特征。该工具通过集成多种前沿的动态几何深度学习算法和时空回归方法，帮助开发者轻松构建能够同时理解“空间结构”与“时间趋势”的模型。\n\n它非常适合人工智能研究人员、数据科学家以及需要处理动态图数据的工程师使用。无论是进行流行病学预测、共享经济分析，还是网页流量管理，用户都能直接调用库中预置的基准数据集和模型，或利用其便捷的数据加载器、训练集分割器及时序快照迭代器快速搭建实验环境。\n\n技术层面，pytorch_geometric_temporal 具备显著的内存效率优势。其独有的“索引批处理”（index-batching）技术能在不牺牲精度的前提下大幅提升显存利用率，支持更大规模的数据训练。此外，它还原生支持 GPU 加速，并能与 PyTorch Lightning 无缝协作，实现从单卡到多卡分布式训练的快速部署，让复杂的时空建模任务变得更加高效且易于上手。","[pypi-image]: https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Ftorch-geometric-temporal.svg\n[pypi-url]: https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Ftorch-geometric-temporal\n[size-image]: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frepo-size\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal.svg\n[size-url]: https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Farchive\u002Fmaster.zip\n[build-image]: https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fworkflows\u002FCI\u002Fbadge.svg\n[build-url]: https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Factions?query=workflow%3ACI\n[docs-image]: https:\u002F\u002Freadthedocs.org\u002Fprojects\u002Fpytorch-geometric-temporal\u002Fbadge\u002F?version=latest\n[docs-url]: https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest\n[coverage-image]: https:\u002F\u002Fcodecov.io\u002Fgh\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg\n[coverage-url]: https:\u002F\u002Fcodecov.io\u002Fgithub\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal?branch=master\n\n\n\n\u003Cp align=\"center\">\n  \u003Cimg width=\"90%\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbenedekrozemberczki_pytorch_geometric_temporal_readme_12b69ccb7edb.jpg\" \u002F>\n\u003C\u002Fp>\n\n-----------------------------------------------------\n\n[![PyPI Version][pypi-image]][pypi-url]\n[![Docs Status][docs-image]][docs-url]\n[![Build Status][build-image]][build-url]\n\n[![Arxiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FArXiv-2104.07788-orange.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2104.07788)\n[![Arxiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FArXiv-2507.11683-blue.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2507.11683)\n\n[![benedekrozemberczki](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Ffollow\u002Fbenrozemberczki?style=social&logo=twitter)](https:\u002F\u002Ftwitter.com\u002Fintent\u002Ffollow?screen_name=benrozemberczki)\n\n\u003C!-- [![Code Coverage][coverage-image]][coverage-url] -->\n**[Documentation](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io)** | **[External Resources](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fnotes\u002Fresources.html)** | **[Datasets](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fnotes\u002Fintroduction.html#discrete-time-datasets)**\n\n*PyTorch Geometric Temporal* is a temporal (dynamic) extension library for [PyTorch Geometric](https:\u002F\u002Fgithub.com\u002Frusty1s\u002Fpytorch_geometric).\n\n\u003Cp align=\"justify\">The library consists of various dynamic and temporal geometric deep learning, embedding, and spatio-temporal regression methods from a variety of published research papers. Moreover, it comes with an easy-to-use dataset loader, train-test splitter and temporal snaphot iterator for dynamic and temporal graphs. The framework naturally provides GPU support. It also comes with a number of benchmark datasets from the epidemological forecasting, sharing economy, energy production and web traffic management domains. Finally, you can also create your own datasets.\u003C\u002Fp>\n\nPyTorch Geometric Temporal now includes support for index-batching - a new batching technique that improves spatiotemporal memory efficiency without any impact on accuracy. Take a look at [the index-batching examples](https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Ftree\u002Fmaster\u002Fexamples\u002FindexBatching), which allow users to easily customize training to their needs and scale to larger datasets than previously possible. Additionally, PyTorch Geometric Temporal supports memory-efficient distributed data parallel training using Dask-DDP in combination with index-batching.\n\n\nThe package interfaces well with [Pytorch Lightning](https:\u002F\u002Fpytorch-lightning.readthedocs.io) which allows training on CPUs, single and multiple GPUs out-of-the-box. Take a look at this [introductory example](https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fblob\u002Fmaster\u002Fexamples\u002Frecurrent\u002Flightning_example.py) of using PyTorch Geometric Temporal with Pytorch Lightning.\n\nWe also provide detailed examples for each of the [recurrent](https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Ftree\u002Fmaster\u002Fexamples\u002Frecurrent) models and [notebooks](https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Ftree\u002Fmaster\u002Fnotebooks) for the attention based ones.\n\n\n--------------------------------------------------------------------------------\n\n**Case Study Tutorials**\n\nWe provide in-depth case study tutorials in the [Documentation](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002F), each covers an aspect of PyTorch Geometric Temporal’s functionality.\n\n**Incremental Training**: [Epidemiological Forecasting Case Study](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fnotes\u002Fintroduction.html#epidemiological-forecasting)\n\n**Cumulative Training**: [Web Traffic Management Case Study](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fnotes\u002Fintroduction.html#web-traffic-prediction)\n\n--------------------------------------------------------------------------------\n\n**Citing**\n\n\nIf you find *PyTorch Geometric Temporal* and the new datasets useful in your research, please consider adding the following citation of the orignal work and its more recent extension:\n\n```bibtex\n@inproceedings{rozemberczki2021pytorch,\n               author = {Benedek Rozemberczki and Paul Scherer and Yixuan He and George Panagopoulos and Alexander Riedel and Maria Astefanoaei and Oliver Kiss and Ferenc Beres and Guzman Lopez and Nicolas Collignon and Rik Sarkar},\n               title = {{PyTorch Geometric Temporal: Spatiotemporal Signal Processing with Neural Machine Learning Models}},\n               year = {2021},\n               booktitle={Proceedings of the 30th ACM International Conference on Information and Knowledge Management},\n               pages = {4564–4573},\n}\n\n```\n\n```bibtex\n@misc{ockerman2025pgtiscalingspatiotemporalgnns,\n      title={PGT-I: Scaling Spatiotemporal GNNs with Memory-Efficient Distributed Training}, \n      author={Seth Ockerman and Amal Gueroudji and Tanwi Mallick and Yixuan He and Line Pouchard and Robert Ross and Shivaram Venkataraman},\n      year={2025},\n      eprint={2507.11683},\n      archivePrefix={arXiv},\n      primaryClass={cs.DC},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2507.11683}, \n}\n\n```\n\n--------------------------------------------------------------------------------\n\n**A simple example**\n\nPyTorch Geometric Temporal makes implementing Dynamic and Temporal Graph Neural Networks quite easy - see the accompanying [tutorial](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fnotes\u002Fintroduction.html#applications). For example, this is all it takes to implement a recurrent graph convolutional network with two consecutive [graph convolutional GRU](https:\u002F\u002Farxiv.org\u002Fabs\u002F1612.07659) cells and a linear layer:\n\n```python\nimport torch\nimport torch.nn.functional as F\nfrom torch_geometric_temporal.nn.recurrent import GConvGRU\n\nclass RecurrentGCN(torch.nn.Module):\n\n    def __init__(self, node_features, num_classes):\n        super(RecurrentGCN, self).__init__()\n        self.recurrent_1 = GConvGRU(node_features, 32, 5)\n        self.recurrent_2 = GConvGRU(32, 16, 5)\n        self.linear = torch.nn.Linear(16, num_classes)\n\n    def forward(self, x, edge_index, edge_weight):\n        x = self.recurrent_1(x, edge_index, edge_weight)\n        x = F.relu(x)\n        x = F.dropout(x, training=self.training)\n        x = self.recurrent_2(x, edge_index, edge_weight)\n        x = F.relu(x)\n        x = F.dropout(x, training=self.training)\n        x = self.linear(x)\n        return F.log_softmax(x, dim=1)\n```\n--------------------------------------------------------------------------------\n\n**Methods Included**\n\nIn detail, the following temporal graph neural networks were implemented.\n\n\n**Recurrent Graph Convolutions**\n\n* **[DCRNN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.dcrnn.DCRNN)** from Li *et al.*: [Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting](https:\u002F\u002Farxiv.org\u002Fabs\u002F1707.01926) (ICLR 2018)\n\n* **[GConvGRU](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.gconv_gru.GConvGRU)** from Seo *et al.*: [Structured Sequence Modeling with Graph  Convolutional Recurrent Networks](https:\u002F\u002Farxiv.org\u002Fabs\u002F1612.07659) (ICONIP 2018)\n\n* **[GConvLSTM](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.gconv_lstm.GConvLSTM)** from Seo *et al.*: [Structured Sequence Modeling with Graph  Convolutional Recurrent Networks](https:\u002F\u002Farxiv.org\u002Fabs\u002F1612.07659) (ICONIP 2018)\n\n* **[GC-LSTM](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.gc_lstm.GCLSTM)** from Chen *et al.*: [GC-LSTM: Graph Convolution Embedded LSTM for Dynamic Link Prediction](https:\u002F\u002Farxiv.org\u002Fabs\u002F1812.04206) (CoRR 2018)\n\n* **[LRGCN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.lrgcn.LRGCN)** from Li *et al.*: [Predicting Path Failure In Time-Evolving Graphs](https:\u002F\u002Farxiv.org\u002Fabs\u002F1905.03994) (KDD 2019)\n\n* **[DyGrEncoder](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.dygrae.DyGrEncoder)** from Taheri *et al.*: [Learning to Represent the Evolution of Dynamic Graphs with Recurrent Models](https:\u002F\u002Fdl.acm.org\u002Fdoi\u002F10.1145\u002F3308560.3316581)\n\n* **[EvolveGCNH](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.evolvegcnh.EvolveGCNH)** from Pareja *et al.*: [EvolveGCN: Evolving Graph Convolutional Networks for Dynamic Graphs](https:\u002F\u002Farxiv.org\u002Fabs\u002F1902.10191)\n\n* **[EvolveGCNO](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.evolvegcno.EvolveGCNO)** from Pareja *et al.*: [EvolveGCN: Evolving Graph Convolutional Networks for Dynamic Graphs](https:\u002F\u002Farxiv.org\u002Fabs\u002F1902.10191)\n\n* **[T-GCN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.temporalgcn.TGCN)** from Zhao *et al.*: [T-GCN: A Temporal Graph Convolutional Network for Traffic Prediction](https:\u002F\u002Farxiv.org\u002Fabs\u002F1811.05320)\n\n* **[A3T-GCN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.attentiontemporalgcn.A3TGCN)** from Zhu *et al.*: [A3T-GCN: Attention Temporal Graph Convolutional Network for Traffic Forecasting](https:\u002F\u002Farxiv.org\u002Fabs\u002F2006.11583) \n\n* **[AGCRN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.agcrn.AGCRN)** from Bai *et al.*: [Adaptive Graph Convolutional Recurrent Network for Traffic Forecasting](https:\u002F\u002Farxiv.org\u002Fabs\u002F2007.02842) (NeurIPS 2020)\n\n* **[MPNN LSTM](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.mpnn_lstm.MPNNLSTM)** from Panagopoulos *et al.*: [Transfer Graph Neural Networks for Pandemic Forecasting](https:\u002F\u002Farxiv.org\u002Fabs\u002F2009.08388) (AAAI 2021)\n  \n**Attention Aggregated Temporal Graph Convolutions**\n\n* **[STGCN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.stgcn.STConv)** from Yu *et al.*: [Spatio-Temporal Graph Convolutional Networks: A Deep Learning Framework for Traffic Forecasting](https:\u002F\u002Farxiv.org\u002Fabs\u002F1709.04875) (IJCAI 2018)\n\n* **[ASTGCN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.astgcn.ASTGCN)** from Guo *et al.*: [Attention Based Spatial-Temporal Graph Convolutional Networks for Traffic Flow Forecasting](https:\u002F\u002Fojs.aaai.org\u002Findex.php\u002FAAAI\u002Farticle\u002Fview\u002F3881) (AAAI 2019)\n\n* **[MSTGCN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.mstgcn.MSTGCN)** from Guo *et al.*: [Attention Based Spatial-Temporal Graph Convolutional Networks for Traffic Flow Forecasting](https:\u002F\u002Fojs.aaai.org\u002Findex.php\u002FAAAI\u002Farticle\u002Fview\u002F3881) (AAAI 2019)\n\n* **[GMAN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.gman.GMAN)** from Zheng *et al.*: [GMAN: A Graph Multi-Attention Network for Traffic Prediction](https:\u002F\u002Farxiv.org\u002Fpdf\u002F1911.08415.pdf) (AAAI 2020)\n\n* **[MTGNN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.mtgnn.MTGNN)** from Wu *et al.*: [Connecting the Dots: Multivariate Time Series Forecasting with Graph Neural Networks](https:\u002F\u002Farxiv.org\u002Fabs\u002F2005.11650) (KDD 2020)\n\n* **[2S-AGCN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.tsagcn.AAGCN)** from Shi *et al.*: [Two-Stream Adaptive Graph Convolutional Networks for Skeleton-Based Action Recognition](https:\u002F\u002Farxiv.org\u002Fabs\u002F1805.07694) (CVPR 2019)\n\n* **[DNNTSP](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.dnntsp.DNNTSP)** from Yu *et al.*: [Predicting Temporal Sets with Deep Neural Networks](https:\u002F\u002Fdl.acm.org\u002Fdoi\u002Fabs\u002F10.1145\u002F3394486.3403152) (KDD 2020)\n\n**Auxiliary Graph Convolutions**\n\n* **[TemporalConv](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.stgcn.TemporalConv)** from Yu *et al.*: [Spatio-Temporal Graph Convolutional Networks: A Deep Learning Framework for Traffic Forecasting](https:\u002F\u002Farxiv.org\u002Fabs\u002F1709.04875) (IJCAI 2018)\n\n* **[DConv](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.dcrnn.DConv)** from Li *et al.*: [Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting](https:\u002F\u002Farxiv.org\u002Fabs\u002F1707.01926) (ICLR 2018)\n\n* **[ChebConvAttention](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.astgcn.ChebConvAttention)** from Guo *et al.*: [Attention Based Spatial-Temporal Graph Convolutional Networks for Traffic Flow Forecasting](https:\u002F\u002Fojs.aaai.org\u002Findex.php\u002FAAAI\u002Farticle\u002Fview\u002F3881) (AAAI 2019)\n\n* **[AVWGCN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.agcrn.AVWGCN)** from Bai *et al.*: [Adaptive Graph Convolutional Recurrent Network for Traffic Forecasting](https:\u002F\u002Farxiv.org\u002Fabs\u002F2007.02842) (NeurIPS 2020)\n  \n--------------------------------------------------------------------------------\n\n\nHead over to our [documentation](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io) to find out more about installation, creation of datasets and a full list of implemented methods and available datasets.\nFor a quick start, check out the [examples](https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Ftree\u002Fmaster\u002Fexamples) in the `examples\u002F` directory.\n\nIf you notice anything unexpected, please open an [issue](https:\u002F\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fissues). If you are missing a specific method, feel free to open a [feature request](https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fissues).\n\n\n--------------------------------------------------------------------------------\n\n**Installation**\n\nFirst install [pytorch][pytorch-install] and [pytorch-geometric][pyg-install]\nand then run\n\n```sh\npip install torch-geometric-temporal\n```\n\nTo install with index-batching support, run\n```\npip install torch-geometric-temporal[index]\n```\n\nTo install with both index-batching and DDP support, run\n```\npip install torch-geometric-temporal[ddp]\n```\n[pytorch-install]: https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F\n[pyg-install]: https:\u002F\u002Fpytorch-geometric.readthedocs.io\u002Fen\u002Flatest\u002Fnotes\u002Finstallation.html\n\n--------------------------------------------------------------------------------\n\n**Running tests**\n\n```\n$ python -m pytest test\n```\n--------------------------------------------------------------------------------\n\n**License**\n\n- [MIT License](https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fblob\u002Fmaster\u002FLICENSE)\n","[pypi-image]: https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Ftorch-geometric-temporal.svg\n[pypi-url]: https:\u002F\u002Fpypi.python.org\u002Fpypi\u002Ftorch-geometric-temporal\n[size-image]: https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Frepo-size\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal.svg\n[size-url]: https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Farchive\u002Fmaster.zip\n[build-image]: https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fworkflows\u002FCI\u002Fbadge.svg\n[build-url]: https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Factions?query=workflow%3ACI\n[docs-image]: https:\u002F\u002Freadthedocs.org\u002Fprojects\u002Fpytorch-geometric-temporal\u002Fbadge\u002F?version=latest\n[docs-url]: https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest\n[coverage-image]: https:\u002F\u002Fcodecov.io\u002Fgh\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fbranch\u002Fmaster\u002Fgraph\u002Fbadge.svg\n[coverage-url]: https:\u002F\u002Fcodecov.io\u002Fgithub\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal?branch=master\n\n\n\n\u003Cp align=\"center\">\n  \u003Cimg width=\"90%\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbenedekrozemberczki_pytorch_geometric_temporal_readme_12b69ccb7edb.jpg\" \u002F>\n\u003C\u002Fp>\n\n-----------------------------------------------------\n\n[![PyPI版本][pypi-image]][pypi-url]\n[![文档状态][docs-image]][docs-url]\n[![构建状态][build-image]][build-url]\n\n[![Arxiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FArXiv-2104.07788-orange.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2104.07788)\n[![Arxiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FArXiv-2507.11683-blue.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2507.11683)\n\n[![benedekrozemberczki](https:\u002F\u002Fimg.shields.io\u002Ftwitter\u002Ffollow\u002Fbenrozemberczki?style=social&logo=twitter)](https:\u002F\u002Ftwitter.com\u002Fintent\u002Ffollow?screen_name=benrozemberczki)\n\n\u003C!-- [![代码覆盖率][coverage-image]][coverage-url] -->\n**[文档](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io)** | **[外部资源](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fnotes\u002Fresources.html)** | **[数据集](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fnotes\u002Fintroduction.html#discrete-time-datasets)**\n\n*PyTorch Geometric Temporal* 是 [PyTorch Geometric](https:\u002F\u002Fgithub.com\u002Frusty1s\u002Fpytorch_geometric) 的一个时序（动态）扩展库。\n\n\u003Cp align=\"justify\">该库包含来自各类已发表研究论文中的多种动态与时序几何深度学习、嵌入以及时空回归方法。此外，它还配备了一个易于使用的数据集加载器、训练-测试分割工具和用于动态及时序图的时序快照迭代器。框架天然支持 GPU 加速，并附带了来自流行病预测、共享经济、能源生产和网络流量管理等领域的多个基准数据集。最后，用户也可以创建自己的数据集。\u003C\u002Fp>\n\nPyTorch Geometric Temporal 现在新增了索引批处理功能——一种新的批处理技术，可在不影响精度的情况下提升时空内存效率。请查看 [索引批处理示例](https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Ftree\u002Fmaster\u002Fexamples\u002FindexBatching)，这些示例让用户能够轻松地根据自身需求定制训练过程，并扩展到比以往更大的数据集。此外，PyTorch Geometric Temporal 还支持结合索引批处理使用 Dask-DDP 进行内存高效的分布式数据并行训练。\n\n\n该软件包可与 [Pytorch Lightning](https:\u002F\u002Fpytorch-lightning.readthedocs.io) 良好兼容，从而开箱即用地支持在 CPU、单 GPU 或多 GPU 上进行训练。请参阅此 [入门示例](https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fblob\u002Fmaster\u002Fexamples\u002Frecurrent\u002Flightning_example.py)，了解如何将 PyTorch Geometric Temporal 与 Pytorch Lightning 结合使用。\n\n我们还为每种 [循环模型](https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Ftree\u002Fmaster\u002Fexamples\u002Frecurrent) 提供了详细示例，并为基于注意力机制的模型准备了 [笔记本](https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Ftree\u002Fmaster\u002Fnotebooks)。\n\n\n--------------------------------------------------------------------------------\n\n**案例教程**\n\n我们在 [文档](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002F) 中提供了深入的案例教程，每个教程都涵盖了 PyTorch Geometric Temporal 功能的一个方面。\n\n**增量训练**：[流行病预测案例教程](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fnotes\u002Fintroduction.html#epidemiological-forecasting)\n\n**累积训练**：[网络流量管理案例教程](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fnotes\u002Fintroduction.html#web-traffic-prediction)\n\n--------------------------------------------------------------------------------\n\n**引用**\n\n\n如果您在研究中发现 *PyTorch Geometric Temporal* 及其新数据集很有帮助，请考虑添加以下对原始工作及其最新扩展的引用：\n\n```bibtex\n@inproceedings{rozemberczki2021pytorch,\n               author = {Benedek Rozemberczki 和 Paul Scherer、Yixuan He、George Panagopoulos、Alexander Riedel、Maria Astefanoaei、Oliver Kiss、Ferenc Beres、Guzman Lopez、Nicolas Collignon 和 Rik Sarkar},\n               title = {{PyTorch Geometric Temporal: 基于神经机器学习模型的时空信号处理}},\n               year = {2021},\n               booktitle={第30届 ACM 国际信息与知识管理会议论文集},\n               pages = {4564–4573},\n}\n\n```\n\n```bibtex\n@misc{ockerman2025pgtiscalingspatiotemporalgnns,\n      title={PGT-I：通过内存高效分布式训练扩展时空 GNN}， \n      author={Seth Ockerman、Amal Gueroudji、Tanwi Mallick、Yixuan He、Line Pouchard、Robert Ross 和 Shivaram Venkataraman},\n      year={2025},\n      eprint={2507.11683},\n      archivePrefix={arXiv},\n      primaryClass={cs.DC},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2507.11683}, \n}\n\n```\n\n--------------------------------------------------------------------------------\n\n**一个简单示例**\n\nPyTorch Geometric Temporal 使得实现动态与时序图神经网络变得相当容易——请参阅随附的 [教程](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fnotes\u002Fintroduction.html#applications)。例如，要实现一个包含两个连续的 [图卷积 GRU](https:\u002F\u002Farxiv.org\u002Fabs\u002F1612.07659) 单元和一个线性层的循环图卷积网络，只需如下代码：\n\n```python\nimport torch\nimport torch.nn.functional as F\nfrom torch_geometric_temporal.nn.recurrent import GConvGRU\n\nclass RecurrentGCN(torch.nn.Module):\n\ndef __init__(self, node_features, num_classes):\n        super(RecurrentGCN, self).__init__()\n        self.recurrent_1 = GConvGRU(node_features, 32, 5)\n        self.recurrent_2 = GConvGRU(32, 16, 5)\n        self.linear = torch.nn.Linear(16, num_classes)\n\n    def forward(self, x, edge_index, edge_weight):\n        x = self.recurrent_1(x, edge_index, edge_weight)\n        x = F.relu(x)\n        x = F.dropout(x, training=self.training)\n        x = self.recurrent_2(x, edge_index, edge_weight)\n        x = F.relu(x)\n        x = F.dropout(x, training=self.training)\n        x = self.linear(x)\n        return F.log_softmax(x, dim=1)\n```\n--------------------------------------------------------------------------------\n\n**包含的方法**\n\n具体而言，实现了以下几种时序图神经网络。\n\n\n**循环图卷积网络**\n\n* **[DCRNN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.dcrnn.DCRNN)** 来自 Li 等人：《扩散卷积递归神经网络：数据驱动的交通预测》（ICLR 2018）\n\n* **[GConvGRU](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.gconv_gru.GConvGRU)** 来自 Seo 等人：《基于图卷积递归网络的结构化序列建模》（ICONIP 2018）\n\n* **[GConvLSTM](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.gconv_lstm.GConvLSTM)** 来自 Seo 等人：《基于图卷积递归网络的结构化序列建模》（ICONIP 2018）\n\n* **[GC-LSTM](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.gc_lstm.GCLSTM)** 来自 Chen 等人：《GC-LSTM：用于动态链接预测的图卷积嵌入 LSTM》（CoRR 2018）\n\n* **[LRGCN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.lrgcn.LRGCN)** 来自 Li 等人：《在随时间演化的图中预测路径故障》（KDD 2019）\n\n* **[DyGrEncoder](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.dygrae.DyGrEncoder)** 来自 Taheri 等人：《利用递归模型学习动态图的演化表示》\n\n* **[EvolveGCNH](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.evolvegcnh.EvolveGCNH)** 来自 Pareja 等人：《EvolveGCN：面向动态图的演化图卷积网络》\n\n* **[EvolveGCNO](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.evolvegcno.EvolveGCNO)** 来自 Pareja 等人：《EvolveGCN：面向动态图的演化图卷积网络》\n\n* **[T-GCN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.temporalgcn.TGCN)** 来自 Zhao 等人：《T-GCN：用于交通预测的时序图卷积网络》\n\n* **[A3T-GCN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.attentiontemporalgcn.A3TGCN)** 来自 Zhu 等人：《A3T-GCN：用于交通预测的注意力时序图卷积网络》\n\n* **[AGCRN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.agcrn.AGCRN)** 来自 Bai 等人：《用于交通预测的自适应图卷积递归网络》（NeurIPS 2020）\n\n* **[MPNN LSTM](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.mpnn_lstm.MPNNLSTM)** 来自 Panagopoulos 等人：《用于疫情预测的迁移图神经网络》（AAAI 2021）\n  \n**注意力聚合型时序图卷积网络**\n\n* **[STGCN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.stgcn.STConv)** 来自 Yu 等人：《时空图卷积网络：一种用于交通预测的深度学习框架》（IJCAI 2018）\n\n* **[ASTGCN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.astgcn.ASTGCN)** 来自 Guo 等人：《基于注意力的时空图卷积网络用于交通流量预测》（AAAI 2019）\n\n* **[MSTGCN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.mstgcn.MSTGCN)** 来自 Guo 等人：《基于注意力的时空图卷积网络用于交通流量预测》（AAAI 2019）\n\n* **[GMAN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.gman.GMAN)** 来自 Zheng 等人：《GMAN：一种用于交通预测的图多注意力网络》（AAAI 2020）\n\n* **[MTGNN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.mtgnn.MTGNN)** 来自 Wu 等人：《连接各点：利用图神经网络进行多元时间序列预测》（KDD 2020）\n\n* **[2S-AGCN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.tsagcn.AAGCN)** 来自 Shi 等人：《用于基于骨骼的动作识别的双流自适应图卷积网络》（CVPR 2019）\n\n* **[DNNTSP](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.dnntsp.DNNTSP)** 来自 Yu 等人：《用深度神经网络预测时间序列集合》（KDD 2020）\n\n**辅助图卷积网络**\n\n* **[TemporalConv](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.stgcn.TemporalConv)** 来自 Yu 等人：《时空图卷积网络：一种用于交通预测的深度学习框架》（IJCAI 2018）\n\n* **[DConv](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.dcrnn.DConv)** 来自 Li 等人：《扩散卷积循环神经网络：数据驱动的交通流量预测》（ICLR 2018）\n\n* **[ChebConvAttention](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.attention.astgcn.ChebConvAttention)** 来自 Guo 等人：《基于注意力机制的时空图卷积网络用于交通流量预测》（AAAI 2019）\n\n* **[AVWGCN](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io\u002Fen\u002Flatest\u002Fmodules\u002Froot.html#torch_geometric_temporal.nn.recurrent.agcrn.AVWGCN)** 来自 Bai 等人：《用于交通预测的自适应图卷积循环网络》（NeurIPS 2020）\n  \n--------------------------------------------------------------------------------\n\n\n请前往我们的[文档](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io)了解更多关于安装、数据集创建以及已实现方法和可用数据集的完整列表。\n若想快速入门，可查看 `examples\u002F` 目录下的[示例](https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Ftree\u002Fmaster\u002Fexamples)。\n\n如果您发现任何异常情况，请提交一个[问题](https:\u002F\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fissues)。如果您希望添加某个特定的方法，也欢迎提出[功能请求](https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fissues)。\n\n\n--------------------------------------------------------------------------------\n\n**安装**\n\n首先安装 [PyTorch][pytorch-install] 和 [PyTorch Geometric][pyg-install]，然后运行：\n\n```sh\npip install torch-geometric-temporal\n```\n\n若需安装支持索引批处理的功能，可运行：\n```\npip install torch-geometric-temporal[index]\n```\n\n若需同时安装索引批处理和分布式数据并行（DDP）支持，可运行：\n```\npip install torch-geometric-temporal[ddp]\n```\n[pytorch-install]: https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F\n[pyg-install]: https:\u002F\u002Fpytorch-geometric.readthedocs.io\u002Fen\u002Flatest\u002Fnotes\u002Finstallation.html\n\n--------------------------------------------------------------------------------\n\n**运行测试**\n\n```\n$ python -m pytest test\n```\n--------------------------------------------------------------------------------\n\n**许可证**\n\n- [MIT 许可证](https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fblob\u002Fmaster\u002FLICENSE)","# PyTorch Geometric Temporal 快速上手指南\n\nPyTorch Geometric Temporal 是 [PyTorch Geometric](https:\u002F\u002Fgithub.com\u002Frusty1s\u002Fpytorch_geometric) 的时间（动态）扩展库，专为处理动态图、时空回归和时序嵌入任务设计。它内置了多种经典的时空图神经网络模型（如 DCRNN, GConvGRU, STGCN 等），并提供了高效的数据加载器和训练工具。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**: Linux, macOS 或 Windows\n*   **Python**: 3.7 及以上版本\n*   **核心依赖**:\n    *   `PyTorch` (建议安装最新稳定版)\n    *   `PyTorch Geometric` (必须预先安装，版本需兼容)\n    *   `CUDA` (可选，如需 GPU 加速请确保已正确配置)\n\n> **注意**：由于 `PyTorch Geometric` 的安装依赖于具体的 PyTorch 和 CUDA 版本，请务必先参考 [PyG 官方安装指南](https:\u002F\u002Fpytorch-geometric.readthedocs.io\u002Fen\u002Flatest\u002Finstall\u002Finstallation.html) 完成基础环境的搭建。\n\n## 安装步骤\n\n推荐使用 pip 进行安装。国内开发者可使用清华源或阿里源加速下载。\n\n### 1. 安装基础依赖 (PyTorch & PyG)\n如果您尚未安装 PyTorch 和 PyTorch Geometric，请先执行以下命令（以 CPU 版本为例，GPU 版本请替换对应的 wheel 地址）：\n\n```bash\npip install torch torchvision torchaudio --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcpu\npip install pyg-lib torch-scatter torch-sparse torch-cluster torch-spline-conv -f https:\u002F\u002Fdata.pyg.org\u002Fwhl\u002Ftorch-2.0.0+cpu.html\n```\n*(注：请将上述命令中的 `torch-2.0.0+cpu` 替换为您实际安装的 PyTorch 版本和计算平台)*\n\n### 2. 安装 PyTorch Geometric Temporal\n使用国内镜像源安装主包：\n\n```bash\npip install torch-geometric-temporal -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n或者直接从 GitHub 安装最新开发版：\n\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal.git\n```\n\n## 基本使用\n\n本库使得构建动态图神经网络变得非常简洁。以下是一个最简单的示例，展示如何定义一个包含两个 **GConvGRU** 层和一个线性层的循环图卷积网络。\n\n### 代码示例\n\n```python\nimport torch\nimport torch.nn.functional as F\nfrom torch_geometric_temporal.nn.recurrent import GConvGRU\n\nclass RecurrentGCN(torch.nn.Module):\n\n    def __init__(self, node_features, num_classes):\n        super(RecurrentGCN, self).__init__()\n        # 定义两个连续的 GConvGRU 层\n        self.recurrent_1 = GConvGRU(node_features, 32, 5)\n        self.recurrent_2 = GConvGRU(32, 16, 5)\n        self.linear = torch.nn.Linear(16, num_classes)\n\n    def forward(self, x, edge_index, edge_weight):\n        # 第一层递归卷积\n        x = self.recurrent_1(x, edge_index, edge_weight)\n        x = F.relu(x)\n        x = F.dropout(x, training=self.training)\n        \n        # 第二层递归卷积\n        x = self.recurrent_2(x, edge_index, edge_weight)\n        x = F.relu(x)\n        x = F.dropout(x, training=self.training)\n        \n        # 输出层\n        x = self.linear(x)\n        return F.log_softmax(x, dim=1)\n\n# 实例化模型\n# 假设节点特征维度为 4，分类任务类别数为 2\nmodel = RecurrentGCN(node_features=4, num_classes=2)\n\n# 模拟输入数据 (批次大小=1, 节点数=10, 特征数=4)\nx = torch.randn(10, 4)\nedge_index = torch.tensor([[0, 1, 1, 2], [1, 0, 2, 1]], dtype=torch.long)\nedge_weight = torch.ones(edge_index.size(1))\n\n# 前向传播\noutput = model(x, edge_index, edge_weight)\nprint(output.shape)\n```\n\n### 下一步\n*   **数据集加载**：库中内置了流行病学预测、共享经济、能源生产等领域的基准数据集，可直接通过 `torch_geometric_temporal.dataset` 调用。\n*   **高级特性**：支持索引批处理（Index-batching）以提升显存效率，以及结合 Dask-DDP 进行分布式训练。\n*   **文档资源**：更多详细教程和案例研究请访问 [官方文档](https:\u002F\u002Fpytorch-geometric-temporal.readthedocs.io)。","某智慧城市交通部门正利用路网传感器数据，构建模型以预测未来一小时的区域拥堵趋势。\n\n### 没有 pytorch_geometric_temporal 时\n- **数据结构割裂**：开发者需手动编写复杂代码将时间序列与图结构（路口连接关系）强行拼接，难以捕捉空间拓扑随时间的动态变化。\n- **模型复现困难**：想要尝试最新的时空回归算法（如 DCRNN 或 T-GCN），必须从零阅读论文并复现底层数学逻辑，研发周期长达数周。\n- **数据处理繁琐**：缺乏专用的时间快照迭代器，处理动态图数据时需自行设计滑动窗口和批次加载逻辑，极易出现内存溢出或索引错误。\n- **扩展性差**：当路网规模扩大或需要多卡训练时，原有的自定义脚本无法有效支持分布式并行计算，训练效率极低。\n\n### 使用 pytorch_geometric_temporal 后\n- **原生时空建模**：直接调用库内集成的动态几何深度学习模型，天然支持“图 + 时间”联合特征提取，精准捕捉拥堵在路网中的传播规律。\n- **算法即插即用**：内置了多种经学术界验证的时空算法接口，研究人员可在几小时内完成从基线模型到 SOTA 模型的切换与对比。\n- **高效数据流水线**：利用专用的时间快照迭代器和索引批处理技术，轻松管理动态图数据流，显著降低显存占用并提升数据加载速度。\n- **无缝分布式训练**：结合 PyTorch Lightning 和 Dask-DDP，无需修改核心代码即可实现多 GPU 并行训练，将大规模路网的模型训练时间缩短数倍。\n\npytorch_geometric_temporal 通过标准化时空图神经网络开发流程，让团队从繁琐的基础设施构建中解放出来，专注于解决真实的交通预测难题。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fbenedekrozemberczki_pytorch_geometric_temporal_12b69ccb.jpg","benedekrozemberczki","Benedek Rozemberczki","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fbenedekrozemberczki_4cc882ba.png","Machine Learning Research Scientist at Google| PhD from The University of Edinburgh.","@google","United Kingdom","benedek.rozemberczki@gmail.com","benrozemberczki",null,"https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki",[26],{"name":27,"color":28,"percentage":29},"Python","#3572A5",100,2974,403,"2026-04-07T06:56:30","MIT",2,"未说明","支持 GPU（非必需，但框架原生提供 GPU 支持以加速训练）；具体型号、显存大小及 CUDA 版本取决于底层 PyTorch 和 PyTorch Geometric 的安装环境，文中未明确指定最低要求。","未说明（提及了索引批处理技术可提高时空内存效率并支持更大规模数据集）",{"notes":39,"python":35,"dependencies":40},"该库是 PyTorch Geometric 的时间动态扩展库。支持使用 Dask-DDP 结合索引批处理进行内存高效的分布式数据并行训练。兼容 PyTorch Lightning，可轻松实现 CPU、单卡及多卡训练。安装前需确保已正确安装对应版本的 PyTorch 和 PyTorch Geometric。",[41,42,43],"torch","torch-geometric","pytorch-lightning (可选)",[45,46,47],"开发框架","数据工具","其他",[49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],"pytorch","graph-neural-networks","temporal-networks","temporal-graphs","gcn","graph-convolutional-networks","deep-learning","network-science","temporal-data","node-embedding","network-embedding","graph-embedding","spatial-data","spatial-analysis","spatio-temporal-data","spatio-temporal-analysis","gnn","graph-convolution","spatiotemporal","ready","2026-03-27T02:49:30.150509","2026-04-07T22:59:37.128355",[72,77,81,86,91,96],{"id":73,"question_zh":74,"answer_zh":75,"source_url":76},23128,"如何将多个动态图（例如 200 个实体，每个实体由 100 个时间步图组成）作为批次输入到模型中进行分类？","可以将数据打包成批次（batch）传递给模型。关键是要确保输入模型的张量维度为 `(Batch, F_in, T_in, N_nodes)`，分别代表批次大小、输入特征数、时间步数和节点数。如果原本使用了 `unsqueeze(0)` 来增加维度以适应非批次输入，在传入批次数据时需要移除该操作。注意，并非所有模型都直接支持这种 batching，部分模型可能需要使用“对角线 batching 技巧”（diagonal batching trick）来处理。","https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fissues\u002F93",{"id":78,"question_zh":79,"answer_zh":80,"source_url":76},23129,"如何修改模型以支持具有多个特征的边属性（而不仅仅是加权边）？","默认实现通常只处理单一的边权重（如 `snapshot.edge_attr[0]`）。若要支持多特征边属性（例如 3 个边特征），需要自定义模型的前向传播逻辑，修改消息传递机制以接受并处理多维的 `edge_attr`。这通常涉及更改底层 GNN 层的定义，使其能够接收形状为 `(E, num_edge_features)` 的边属性张量，并在聚合步骤中利用这些额外特征。",{"id":82,"question_zh":83,"answer_zh":84,"source_url":85},23130,"在使用 MPNNLSTM、GCLSTM 等模型时，MSE 损失值很低但预测结果不正确，可能的原因是什么？","MSE（均方误差）仅衡量预测值与目标值的平均平方差，低 MSE 并不总是意味着模型学到了正确的模式，特别是在数据随机性较高或模型过拟合噪声时。如果示例代码在随机数据集上表现正常（MSE 约 1），而在你的数据集上 MSE 很低但预测无效，可能说明你的数据集结构与模型假设不匹配，或者模型未能捕捉到有效的时空依赖关系。建议检查数据预处理是否正确（如归一化、图结构一致性），并尝试调整模型架构、增加数据量或进行更充分的超参数实验。","https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fissues\u002F87",{"id":87,"question_zh":88,"answer_zh":89,"source_url":90},23131,"是否有教程指导如何为多个动态图创建自定义数据集？","截至当前讨论，官方仓库尚未提供专门针对“多个动态图”自定义数据集的详细教程。用户通常需要参考现有的单动态图数据集实现（如 `ChickenpoxDatasetLoader`），然后扩展其逻辑以支持列表形式的多个图序列。核心步骤包括：1) 定义一个继承自 `torch.utils.data.Dataset` 的类；2) 在 `__getitem__` 中返回包含时间步序列的 `DynamicGraphTemporalSignal` 对象；3) 确保每个样本包含正确的 `edge_index`、`features` 和 `target`。社区用户正在期待官方发布相关示例。","https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fissues\u002F146",{"id":92,"question_zh":93,"answer_zh":94,"source_url":95},23132,"EvolveGCN 实现中是否存在梯度丢失的问题？原因是什么？","是的，EvolveGCN 的某些实现可能存在梯度丢失问题。主要原因是在前向传播中直接重新赋值模型权重（如 `self.toy_model.weight = torch.nn.parameter.Parameter(W)`），这会破坏 PyTorch 的计算图，导致 RNN（GRU\u002FLSTM）部分的梯度无法回传。即使将 `GCN.weight` 的 `requires_grad` 设为 `False`（因为其应由 RNN 更新而非梯度下降），若权重更新方式不当，仍会中断梯度流。正确做法是避免在 `forward` 中直接替换 `nn.Parameter`，而是通过函数式调用或将权重作为参数显式传递给卷积层，以保持计算图的完整性。","https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fissues\u002F80",{"id":97,"question_zh":98,"answer_zh":99,"source_url":100},23133,"构建多层循环图卷积模型时出现内存消耗急剧增长甚至溢出，如何解决？","多层循环图卷积网络（RGCN）会导致内存占用随层数近乎指数级增长，这是因为每个时间步都需要存储中间激活值和梯度用于反向传播。缓解方法包括：1) 减少时间步长度（T_in）或批次大小（Batch）；2) 使用梯度检查点（gradient checkpointing）技术，以计算换内存；3) 简化模型层数或隐藏层维度；4) 确保及时释放不再需要的张量（如使用 `del` 和 `torch.cuda.empty_cache()`）；5) 考虑使用更高效的架构变体或近似方法。目前仓库中尚无深层 RGCN 的官方示例，需谨慎设计网络深度。","https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fissues\u002F159",[102,107,112,117,122,127,132,137,142,147,152,157,162,167,172,177,182,187,191,196],{"id":103,"version":104,"summary_zh":105,"released_at":106},136806,"0.56.0","本次更新引入了索引批处理功能。索引批处理是一种在不影响模型准确性的前提下，降低时空图神经网络训练内存开销的技术，从而实现更强的可扩展性，并首次能够在不进行图分区的情况下，在完整的 PeMS 数据集上进行训练。借助这一技术显著减少的内存占用，我们还实现了 GPU 索引批处理——该技术将预处理完全置于 GPU 显存中进行，并在整个训练过程中用一次 CPU 到 GPU 的内存拷贝替代逐批次的 CPU-GPU 数据传输。\n\n此外，我们还重新编写了文档，改用 auto-api 而非 auto-doc。\n\n## 变更内容\n* @OckermanSethGVSU 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F294 中实现了索引批处理功能。\n* @OckermanSethGVSU 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F295 中更新了索引批处理的相关文档。\n* @OckermanSethGVSU 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F296 中对文档进行了全面重构。\n\n## 新贡献者\n* @OckermanSethGVSU 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F294 中完成了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fcompare\u002F0.55.0...0.56.0","2025-03-28T14:16:54",{"id":108,"version":109,"summary_zh":110,"released_at":111},136807,"0.55.0","1. 修复 #262 中的 SSL 导入问题\r\n2. 通过 #271 修复 tsgcn 中的 to_dense_adj 函数","2025-02-09T07:03:04",{"id":113,"version":114,"summary_zh":115,"released_at":116},136808,"v0.54.0","## 变更内容\n* 移除 setup.py 测试（已弃用），由 @jamesmyatt 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F182 中完成\n* 将 tqdm 设为可选依赖，由 @jamesmyatt 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F188 中完成\n* 从必选依赖中移除 torch-scatter，由 @jamesmyatt 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F191 中完成\n* 更新适用于 PyTorch 1.11.0 和最新版 PyG 的安装说明，由 @jamesmyatt 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F192 中完成\n* 从必选依赖中移除 scipy（未使用），由 @jamesmyatt 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F190 中完成\n* 对 _set_hidden_state() 方法的修改，由 @h3dema 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F187 中完成\n\n## 新贡献者\n* @jamesmyatt 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F182 中完成了首次贡献\n* @h3dema 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F187 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fcompare\u002Fv0.53.0...v0.54.0","2022-09-04T16:37:07",{"id":118,"version":119,"summary_zh":120,"released_at":121},136809,"v0.53.0","## 变更内容\n* @SherylHYX 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F154 中移除了 MPNNLSTM 中未使用的参数和变量。\n* @gfngoncalves 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F160 中增加了对信号切片的支持。\n* @xunil17 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F180 中将异构图卷积 LSTM 中的字典改为 nn.ParameterDict。\n* @xunil17 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F181 中优化了代码，以防止重复调用卷积算子。\n\n## 新贡献者\n* @gfngoncalves 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F160 中完成了首次贡献。\n* @xunil17 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F180 中完成了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fcompare\u002Fv0.52.0...v0.53.0","2022-07-12T16:35:40",{"id":123,"version":124,"summary_zh":125,"released_at":126},136810,"v0.52.0","## 变更内容\n* @doGregor 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F142 中添加了异构图支持\n* @dtortorella 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F147 中修复了蒙得维的亚公交数据集\n* @doGregor 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F148 中修复了矩阵乘法中的错误\n* @gravins 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F150 中修复了当归一化方式不为对称时 `lambda_max` 的错误\n\n## 新贡献者\n* @gravins 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F150 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fcompare\u002Fv0.51.0...v0.52.0","2022-04-04T19:21:59",{"id":128,"version":129,"summary_zh":130,"released_at":131},136811,"v0.51.0","## 变更内容\n* @tforgaard 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F129 中修复了时序信号拆分问题。\n* @josephenguehard 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F133 中重构了 __getitem__ 方法。\n* @doGregor 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F125 中提交了首个支持异构图的代码。\n* @BraveDistribution 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F136 中修复了 TGCN 单元文档中的错误。\n\n## 新贡献者\n* @tforgaard 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F129 中完成了首次贡献。\n* @josephenguehard 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F133 中完成了首次贡献。\n* @doGregor 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F125 中完成了首次贡献。\n* @BraveDistribution 在 https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fpull\u002F136 中完成了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fbenedekrozemberczki\u002Fpytorch_geometric_temporal\u002Fcompare\u002Fv0.50.0...v0.51.0","2022-02-10T23:10:21",{"id":133,"version":134,"summary_zh":135,"released_at":136},136812,"v0.50.0","- 移除了与 PyG 1.7.0 的耦合\n- 移除了与 PyTorch 1.7 的耦合\n- DevOps 工具链已更新\n- 文档和安装指南已更新","2022-01-19T22:38:53",{"id":138,"version":139,"summary_zh":140,"released_at":141},136813,"v_00042","## 变更内容\n* 功能扩展：Signal\u002FBatch 对象中新增命名属性，由 @Flunzmas 贡献 🤖\n* 修复了 EvolveGCN 的权重压缩问题，由 @dtortorella 完成 🌃 \n* 更新了 A3TGCN 示例，由 @poteman 完成 🎇\n* 在 A3TGCN 中使注意力机制可训练，并支持批量处理，由 @elmahyai 实现 🌄","2021-12-31T11:06:06",{"id":143,"version":144,"summary_zh":145,"released_at":146},136814,"v_00041","- GCN-O 权重更新修复 - GCN-H 权重更新修复","2021-09-11T12:03:52",{"id":148,"version":149,"summary_zh":150,"released_at":151},136815,"v_00040","- GMAN已移除 - 超参数不再固定。","2021-08-04T20:01:57",{"id":153,"version":154,"summary_zh":155,"released_at":156},136816,"v_00039","- Added DNNTSP from Predicting Temporal Sets with Deep Neural Networks (KDD 2020).\r\n- Added tests for DNNTSP.\r\n- DNNTSP Docs.\r\n- Updated the README.md.","2021-07-25T10:41:40",{"id":158,"version":159,"summary_zh":160,"released_at":161},136817,"v_00038","- LRGCN Case Study\r\n- A3TGCN Case Study\r\n- TGCN Case Study\r\n- DCRNN Case Study\r\n- GCLSTM Case Study\r\n- GConvGRU Case Study\r\n- GConvLSTM Case Study\r\n- AGCRN Case Study\r\n- MPNN LSTM Case Study\r\n- EvolveGCNO Case Study\r\n- EvolveGCNH Case Study\r\n","2021-07-13T21:33:19",{"id":163,"version":164,"summary_zh":165,"released_at":166},136818,"v_0037","- New windmill datasets (medium and large).\r\n- New MTM hand gesture dataset.\r\n- New 2S-AGCN dataset.","2021-06-12T16:27:44",{"id":168,"version":169,"summary_zh":170,"released_at":171},136819,"v_00035","AGCRN FIX.","2021-06-04T20:20:54",{"id":173,"version":174,"summary_zh":175,"released_at":176},136820,"v_00034","- Added the Montevideo Bus dataset - 11 spatial units and hundreds of time points.","2021-05-19T22:30:02",{"id":178,"version":179,"summary_zh":180,"released_at":181},136821,"v_00033","- Added a get item based snapshot indexing system.","2021-05-17T21:48:06",{"id":183,"version":184,"summary_zh":185,"released_at":186},136822,"v_00032","- DCRNN Op fix\r\n- STGCN typo fix","2021-05-10T21:46:21",{"id":188,"version":189,"summary_zh":23,"released_at":190},136823,"v_00030","2021-05-03T22:35:43",{"id":192,"version":193,"summary_zh":194,"released_at":195},136824,"v_00029","- Added Batching.","2021-04-25T21:53:29",{"id":197,"version":198,"summary_zh":199,"released_at":200},136825,"v_00028","- Added ARGCN from NeurIPS 2020","2021-04-24T19:51:04",[202,213,221,230,238,247],{"id":203,"name":204,"github_repo":205,"description_zh":206,"stars":207,"difficulty_score":208,"last_commit_at":209,"category_tags":210,"status":68},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",[211,45,212,46],"Agent","图像",{"id":214,"name":215,"github_repo":216,"description_zh":217,"stars":218,"difficulty_score":208,"last_commit_at":219,"category_tags":220,"status":68},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",[45,212,211],{"id":222,"name":223,"github_repo":224,"description_zh":225,"stars":226,"difficulty_score":34,"last_commit_at":227,"category_tags":228,"status":68},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 真正成长为懂上",143909,"2026-04-07T11:33:18",[45,211,229],"语言模型",{"id":231,"name":232,"github_repo":233,"description_zh":234,"stars":235,"difficulty_score":34,"last_commit_at":236,"category_tags":237,"status":68},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 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107888,"2026-04-06T11:32:50",[45,212,211],{"id":239,"name":240,"github_repo":241,"description_zh":242,"stars":243,"difficulty_score":34,"last_commit_at":244,"category_tags":245,"status":68},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",[246,45],"插件",{"id":248,"name":249,"github_repo":250,"description_zh":251,"stars":252,"difficulty_score":208,"last_commit_at":253,"category_tags":254,"status":68},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[229,212,211,45]]