NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #3990 most downloaded on PyPI
Graph Neural Network Library for PyTorch
Last release 2 months ago
20 Jul 2026
Release timing varies
gaps range from 8 days to 13 months
Most releases are documented
notes for 41 of 46 stable releases
1 version withdrawn
withdrawn after publishing
8 years old
47 releases · first in 2018
A new minor PyG version release, including a variety of new features and bugfixes:
A new minor PyG version release, including a variety of new features and bugfixes:
GLNN: Graph-less Neural Networks [Example] (#3572)LINKX: Large Scale Learning on Non-Homophilous Graphs [Example] (#3654)HANConv: The Heterogenous Graph Attention operator [Example] (#3444, #3577, #3581) - thanks to @rishubhkhurana and @wsad1LGConv and LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation (#3685) - thanks to @LukasHaas and @KathyFeiyangDataModule wrappers for PyG+PL multi-GPU training/inference without replicating datasets across processes :
torch_geometric.data.LightningDataset for multi-GPU training via PL on graph-level tasks [Example] (#3596, #3634)torch_geometric.data.LightningNodeData for multi-GPU training via PL on node-level tasks [Example] (#3613, #3634)NeighborLoader: Added CUDA support leading to major runtime improvements [Example] (#3736)MessagePassing: Added the edge_updater/edge_update interface for updating edge features (#3450) - thanks to @PadarnGNNExplainer: Added an example that reproduces the official BA-Shapes experiment (#3386) - thanks to @RBendiastorch_geometric.graphgym: Support for heterogeneous graphs and lazy initialization (#3460) - thanks to @JiaxuanYouMLP: Added a basic MLP implementation (#3553)PointTransformer: Classification and segmentation examples (#3344) - thanks to @QuanticDisaster and @wsad1ShaDowKHopSampler: Added an example (#3411) - thanks to @SubhajitDuttaChowdhuryData.subgraph(...) implementation (#3521)HGBDataset benchmark suite (#3454)MalNetTiny dataset (#3472) - thanks to @rampasekOMDB: Organic Materials Database (#3506)BAShapes: The BA-Shapes dataset (#3386) - thanks to @RBendiasPolBlogs and EmailEUCore datasets (#3534) - thanks to @AlexDuvalinhoStochasticBlockModel and RandomPartition graph datasets (#3586) - thanks to @dongkwan-kimLINKXDataset: A subset of the non-homophilous benchmark datasets from LINKXFakeDataset and FakeHeteroDataset for testing purposes (#3741) - thanks to @levulinhtorch_geometric.nn.norm: Improved the runtimes of normalization layers - thanks to @johnpeterflynnDataLoader and NeighborLoader: Output tensors are now written to shared memory to avoid an extra copy in case num_workers > 0 (#3401 and #3734) - thanks to @johnpeterflynnGATv2Conv: Support for edge features (#3421) - thanks to @Kenneth-SchroederBatch.from_data_list: Runtime improvementsTransformerConv: Runtime and memory consumption improvements (#3392) - thanks to @wsad1mean_iou: Added IoU computation via omitting NaNs (#3464) - thanks to @GericoViDataLoader: follow_batch and exclude_keys are now optional argumentsNeighborLoader and HGTLoader: Removed the persistent_workers=True defaultvoxel_grid: The batch argument is now optional (#3533) - thanks to @QuanticDisasterTransformerConv: JIT support (#3538) - thanks to @RobMcHstate_dict() and load_state_dict() (#3651) - thanks to @shubham-gupta-iitrfrom_networkx: Support for nx.MultiDiGraph (#3646) - thanks to @max-zipfl-fziGATv2Conv: Support for lazy initialization (#3678) - thanks to @richcmwangtorch_geometric.graphgym: register_* functions can now be used as decorators (#3684)AddSelfLoops: Now supports the full argument set of torch_geometric.utils.add_self_loops (#3702) - thanks to @dongkwan-kimGATConv or ChebConv (#3697) - thanks to @saiden89GATv2Conv and HEATConv: Removed unnecessary size argument in forward (#3744) - thanks to @saiden89GNNExplainer: Fixed a bug in the GCN example normalization coefficients were wrongly calculated (#3508) - thanks to @RBendiasHGTConv: Fixed a bug in the residual connection formulation - thanks to @zzhnobugtorch_geometric.grapghym: Fixed a bug in the creation of MLP (#3431) - thanks to @JiaxuanYoutorch_geometric.graphgym: Fixed a bug in the dimensionality of GeneralMultiLayer (#3456) - thanks to @JiaxuanYouRandomLinkSplit: Fixed a bug in negative edge sampling for undirected graphs (#3440) - thanks to @panissonadd_self_loops: Fixed a bug in adding self-loops with scalar-valued weightsSchNet: Fixed a bug in which a bias vector was not correctly initialized as zero - thanks to @nec4Batch.from_data_list: Replaced the torch.repeat_interleave call due to errors in forked processes (#3566) - thanks to @EnolerobottiNeighborLoader: Fixed a bug in conjunction with PyTorch Lightning (#3602) - thanks to @pbielakNeighborLoader and ToSparseTensor: Fixed a bug in case num_nodes == num_edges (#3683) - thanks to @WuliangHuangToUndirected: Fixed a bug in case num_nodes == 2 (#3627) - thanks to @aur3l14noFiLMConv: Fixed a bug in the backward pass due to the usage of in-place operations - thanks to @JokerenGDC: Fixed a bug in case K > num_nodes - thanks to @Misterion777LabelPropagation: Fixed a bug in the order of transformations (#3639) - thanks to @Riyer01negative_sampling: Fixed execution for GPU input tensors - thanks to @Sticksword and @lmy86263HeteroData: Fixed a bug in which node types were interpreted as edge types in case they were described by two characters (#3692)FastRGCNConv: Fixed a bug in which weights were indexed on destination node index rather than source node index (#3690) - thanks to @JokerenWikipediaNetwork: Fixed a bug in downloading due to a change in URLs - thanks to @csbobby and @Kousaka-HonokaOne column per quarter.
A new minor version release, including further bugfixes, official PyTorch 1.10 support, as well as additional features and operators:
A new minor version release, including further bugfixes, official PyTorch 1.10 support, as well as additional features and operators:
GraphMultisetTransformer operator (thanks to @JinheonBaek)PointTransformerConv operator (thanks to @QuanticDisaster)HEATConv operator (thanks to @Xiaoyu006)PNA GNN model (thanks to @RBendias)AddMetaPaths transform, which will add additional edge types to a HeteroData object based on a list of metapaths (thanks to @wsad1)Data.to_heterogeneous method to allow for the conversion from Data to HeteroData objectsAttributedGraphDataset, containing a variety of attributes graphsAirports datasetsstructured_negative_sampling_feasible method, which checks if structured_negative_sampling is feasible (thanks to @WuliangHuang)GATConv can now make use of multi-dimensional edge features to compute attention scores (thanks to @dongkwan-kim)RandomNodeSplit and RandomLinkSplit now support HeteroData as inputMessagePassing inference can now be sped up via the decomposed_layers argument (thanks to @ZhouAo-ZA)negative_sampling and batched_negative_sampling now support negative sampling in bipartite graphsHeteroConv now supports the inclusion of arbitrary node-level or edge-level information for the underlying MessagePassing operatorsGNNExplainer now supports multiple node-level masks and explaining regression problems (thanks to @gregorkrz)Data.to_homogeneous will now add node_type information to the homogeneous Data objectGINEConv now allows to transform edge features automatically in case their dimensionalities do not match (thanks to @CaypoH)OGB_MAG will now add node_year information to paper nodesEntities datasets do now allow the processing of HeteroData objects via the hetero=True optionBatch objects can now be batched together to form super batchesCenter, Constant and LinearTransformation transformationsHeteroConv now allows to return "stacked" embeddingsbatch vector of a Batch object will now be initialized on the GPU in case other attributes are held in GPU memorynum_neighbors argument of NeighborLoader in order to specify an edge-type specific number of neighborscollate policy of lists of integers/strings to return nested listsDelaunay transformation in case the face attribute is not present in the dataTGNMemory module to only read from the latest update (thanks to @cwh104504)pickle.PicklingError when Batch objects are used in a torch.multiprocessing.manager.Queue() (thanks to @RasmusOrsoe)_parent state changing after pickling of Data objects (thanks to @zepx)ToUndirected transformation in case the number of edges and nodes are equal (thanks to @lmkmkrcc)from_networkx routine in case node-level and edge-level features share the same namesnum_nodes warning when creating PairData objectsGeneralMultiLayer module in GraphGym (thanks to @fjulian)run_dir naming of GraphGym (thanks to @fjulian)Batch.from_data_list routine on dataset slices (thanks to @dtortorella)MetaPath2Vec model in case there exists isolated nodestorch_geometric.utils.coalesce with CUDA tensorsThis is a minor release, bringing some emergency fixes to PyG 2.0.
This is a minor release, bringing some emergency fixes to PyG 2.0.
loader.DataLoader that raised a PicklingError for num_workers > 0 (thanks to @r-echeveste, @arglog and @RishabhPandit-00)data.Batch objects in case customized data.Data objects expect non-default arguments (thanks to @Emiyalzn)SparseTensor attributes could not be batched along single dimensions (thanks to @rubenwiersma)`nn.conv.PointConv` is deprecated in favour of `nn.conv.PointNetConv` (thanks to @lelouedec and @QuanticDisaster)
PyG (PyTorch Geometric) has been moved from my own personal account rusty1s to its own organization account pyg-team to emphasize the ongoing collaboration between TU Dortmund University, Stanford University and many great external contributors. With this, we are releasing PyG 2.0, a new major release that brings sophisticated heterogeneous graph support, GraphGym integration and many other exciting features to PyG.
<p align="center"> <img height="150" src="https://raw.githubusercontent.com/pyg-team/pytorch_geometric/master/docs/source/_static/img/pyg1.svg?sanitize=true" /> </p>
If you encounter any bugs in this new release, please do not hesitate to create an issue.
We finally provide full heterogeneous graph support in PyG 2.0. See here for the accompanying tutorial.
Heterogeneous Graph Storage: Heterogeneous graphs can now be stored in their own dedicated data.HeteroData class (thanks to @yaoyaowd):
from torch_geometric.data import HeteroData
data = HeteroData()
# Create two node types "paper" and "author" holding a single feature matrix:
data['paper'].x = torch.randn(num_papers, num_paper_features)
data['author'].x = torch.randn(num_authors, num_authors_features)
# Create an edge type ("paper", "written_by", "author") holding its graph connectivity:
data['paper', 'written_by', 'author'].edge_index = ... # [2, num_edges]
data.HeteroData behaves similar to a regular homgeneous data.Data object:
print(data['paper'].num_nodes)
print(data['paper', 'written_by', 'author'].num_edges)
data = data.to('cuda')
Heterogeneous Mini-Batch Loading: Heterogeneous graphs can be converted to mini-batches for many small and single giant graphs via the loader.DataLoader and loader.NeighborLoader loaders, respectively. These loaders can now handle both homogeneous and heterogeneous graphs:
from torch_geometric.loader import DataLoader
loader = DataLoader(heterogeneous_graph_dataset, batch_size=32, shuffle=True)
from torch_geometric.loader import NeighborLoader
loader = NeighborLoader(heterogeneous_graph, num_neighbors=[30, 30], batch_size=128,
input_nodes=('paper', data['paper'].train_mask), shuffle=True)
Heterogeneous Graph Neural Networks: Heterogeneous GNNs can now easily be created from homogeneous ones via nn.to_hetero and nn.to_hetero_with_bases. These processes take an existing GNN model and duplicate their message functions to account for different node and edge types:
from torch_geometric.nn import SAGEConv, to_hetero
class GNN(torch.nn.Module):
def __init__(hidden_channels, out_channels):
super().__init__()
self.conv1 = SAGEConv((-1, -1), hidden_channels)
self.conv2 = SAGEConv((-1, -1), out_channels)
def forward(self, x, edge_index):
x = self.conv1(x, edge_index).relu()
x = self.conv2(x, edge_index)
return x
model = GNN(hidden_channels=64, out_channels=dataset.num_classes)
model = to_hetero(model, data.metadata(), aggr='sum')
<p align="center"> <img height="400px" src="https://raw.githubusercontent.com/pyg-team/pytorch_geometric/master/docs/source/_figures/to_hetero.svg?sanitize=true" /> </p>
-1 to the in_channels argument (implemented via nn.dense.Linear).
This allows to avoid calculating and keeping track of input tensor sizes, simplyfing the creation of heterogeneous graph models with varying feature dimensionalities across different node and edge types. Lazy initialization is supported for all existing PyG operators (thanks to @yaoyaowd):from torch_geometric.nn import GATConv
conv = GATConv(-1, 64)
# We can initialize the model’s parameters by calling it once:
conv(x, edge_index)
nn.conv.HeteroConv: A generic wrapper for computing graph convolution on heterogeneous graphs (thanks to @RexYing)nn.conv.HGTConv: The heterogeneous graph transformer operator from the "Heterogeneous Graph Transformer" paperloader.HGTLoader: The heterogeneous graph sampler from the "Heterogeneous Graph Transformer" paper for learning on large-scale heterogeneous graphs (thanks to @chantat)transforms.AddSelfLoops, transforms.ToSparseTensor, transforms.NormalizeFeatures and transforms.ToUndirecteddatasets.OGB_MAG, datasets.IMDB, datasets.DBLP and datasets.LastFMdata.HeteroData.to_homogeneous (thanks to @yzhao062)data.HeteroData object from raw *.csv files (thanks to @yaoyaowd and @mrjel)GraphGym is now officially supported in PyG 2.0 via torch_geometric.graphgym. See here for the accompanying tutorial. Overall, GraphGym is a platform for designing and evaluating Graph Neural Networks from configuration files via a highly modularized pipeline (thanks to @JiaxuanYou):
<img width=100% src="https://raw.githubusercontent.com/pyg-team/pytorch_geometric/master/docs/source/_figures/graphgym_results.png" />
datasets.AMiner dataset now returns a data.HeteroData object. See here for our updated MetaPath2Vec example on AMiner.transforms.AddTrainValTestMask has been replaced in favour of transforms.RandomNodeSplitdata.Data significantly changed in order to support heterogenous graphs, already processed datasets need to be re-processed by deleting the root/processed folder.data.Data.__cat_dim__ and data.Data.__inc__ now expect additional input arguments:def __cat_dim__(self, key, value, *args, **kwargs):
pass
def __inc__(self, key, value, *args, **kwargs):
pass
In case you modified __cat_dim__ or __inc__ functionality in a customized data.Data object, please ensure to apply the above changes.nn.conv.PointConv is deprecated in favour of nn.conv.PointNetConv (thanks to @lelouedec and @QuanticDisaster)utils.train_test_split_edges is deprecated in favour of the new transforms.RandomLinkSplit transformtorch_geometric.data to torch_geometric.loader, e.g.:from torch_geometric.loader import DataLoader
loader.NeighborSampler is deprecated in favour of loader.NeighborLoader in order to simplify the application of neighbor sampling and to support both neighbor sampling in homogeneous and heterogeneous graphsData.contains_isolated_nodes and Data.contains_self_loops are deprecated in favour of Data.has_isolated_nodes and Data.has_self_loops, respectivelytorch-scatter and torch-sparse now support half-precision computation via torch.half, bringing half-precision support to PyGtransforms.RandomLinkSplit transform to easily perform a random edge-level split (thanks to @RexYing)torch_geometric.profile package which provides a variety of utility functions for benchmarking runtimes and memory consumptions of GNN models (thanks to @yzhao062)nn.conv.MessagePassing now supports hooks for propagate, message, aggregate and update functions, e.g. via nn.conv.MessagePassing.register_propagate_forward_hooknn.conv.GeneralConv operator that can handle most GNN use-cases (e.g., w/ or w/o edge features, ...) and has enough design options to be tuned (e.g., attention, skip-connections, ...) (thanks to @JiaxuanYou)nn.models.RECT_L model for learning with completely-imbalanced labels (thanks to @Fizyhsp)nn.conv.PDNConv (thanks to @benedekrozemberczki)nn.models package, e.g., nn.model.GCN, nn.models.GraphSAGE, nn.models.GAT and nn.models.GIN. Pre-defined models support customizing hidden feature dimensionality, number of layers, activation, normalization and jumping knowledge (thanks to @PabloAMC)datasets.MD17 datasets (thanks to @M-R-Schaefer)nn.conv.RGCNConv (thanks to @moritzblum)nn.pool.MemPooling (thanks to @wsad1)return_attention_weights argument for nn.conv.TransformerConv (thanks to @wsad1)utils.homophily (thanks to @wsad1)batch_size argument to utils.to_dense_batch (thanks to @jimmiebtlr)import torch_geometricnn.Sequential is now fully jittablenn.conv.LEConv is now fully jittable (thanks to @lucagrementieri)nn.conv.GENConv can now make use of "add", "mean" or "max" aggregations (thanks to @riskiem)torch.nn.utils.rnn.PackedSequence are now correctly handled by data.Data and data.HeteroData (thanks to @WuliangHuang)data.record_stream() in order to allow for data prefetching (thanks to @FarzanT)max_num_neighbors attribute to nn.models.SchNet and nn.models.DimeNet (thanks to @nec4)nn.conv.MessagePassing is now jittable in case message, aggregate and update return multiple arguments (thanks to @PhilippThoelke)utils.from_networkx now supports grouping of node-level and edge-level features (thanks to @PabloAMC)transforms.BaseTransform to ease type checking (thanks to @CCInc)del data[key] (thanks to @Linux-cpp-lisp)transforms.LinearTransformation transform now correctly transposes the input matrix before applying the transformation (thanks to @beneisner)benchmark/kernel that prevented the application of DiffPool on the IMDB-BINARY dataset (thanks to @dongZheX)datasets.WikipediaNetwork do now match which the official reported ones in case geom_gcn_preprocess=True (thanks to @ZhuYun97 and @GitEventhandler)datasets.DynamicFAUST dataset in which data.num_nodes was undefined (thanks to @koustav123)nn.models.GNNExplainer could not handle GNN operators that add self-loops to the graph in case self-loops were already present (thanks to @tw200464tw and @NithyaBhasker)nn.norm.LayerNorm may no longer produce NaN gradients (thanks to @fbragman)networkx drawing arguments in nn.models.GNNExplainer.visualize_subgraph() (thanks to @jvansan)transforms.RemoveIsolatedNodes now correctly removes isolated nodes in case data.num_nodes is explicitely set (thanks to @blakechi)The `GitHub` Web and ML developer dataset (thanks to @benedekrozemberczki)
GitHub Web and ML developer dataset (thanks to @benedekrozemberczki)FacebookPagePage dataset (thanks to @benedekrozemberczki)Twitch gamer datasets (thanks to @benedekrozemberczki)DeezerEurope dataset (thanks to @benedekrozemberczki)GemsecDeezer dataset (thanks to @benedekrozemberczki)LastFMAsia dataset (thanks to @benedekrozemberczki)WikipediaNetwork datasets does now allow usage of the raw dataset as introduced in Multi-scale Attributed Node Embedding (thanks to @benedekrozemberczki)DeepGCNLayer in case no normalization layer is provided (thanks to @lukasfolle)GNNExplainer which mixed the loss computation for graph-level and node-level predictions (thanks to @panisson and @wsad1)A minor release that brings PyTorch 1.9.0 and Python 3.9 support to PyTorch Geometric. In case you are in the process of updating to PyTorch 1.9.0, pl
A minor release that brings PyTorch 1.9.0 and Python 3.9 support to PyTorch Geometric. In case you are in the process of updating to PyTorch 1.9.0, please re-install the external dependencies for PyTorch 1.9.0 as well (torch-scatter and torch-sparse).
EGConv (thanks to @shyam196)GATv2Conv (thanks to @shakedbr)GraphNorm normalization layerGNNExplainer now supports explaining graph-level predictions (thanks to @wsad1)bro and gini regularization (thanks to @rhsimplex)train_test_split_edges() and to_undirected() can now edge features (thanks to @saiden89 and @SherylHYX)np.ndarray as well (thanks to @josephenguehard)dense_to_sparse can now handle batched adjacency matricesnumba is now an optional dependencyUPFD dataset (thanks to @YingtongDou)AmazonProducts graph from the GraphSAINT paperSNAPDataset benchmark suite (thanks to @SherylHYX)SuperGATConv used all positive edges for computing the auxiliary loss (thanks to @anniekmyatt)MemPooling produced NaN gradients (thanks to @wsad1)schnetpack package was required for training SchNet (thanks to @mshuaibii)XConv to sample without replacement in case dilation > 1 (thanks to @mayur-ag)GraphSAINTSampler can now be used in combination with PyTorch LightningHypergraphConv in case num_nodes > num_edges (thanks to @THinnerichs)[Temporal Graph Network](https://pytorch-geometric.readthedocs.io/en/latest/modules/nn.html#torch_geometric.nn.models.TGNMemory) and an example utiliz
ogbn-productsSequential API, see here for the accompanying examplePPI (thanks to @ldv1)Cora (thanks to @dongkwan-kim)ESOL (thanks to @thegodone)Shadow k-hop Sampler (currently requires torch-sparse from master)AddTrainValTestMask transform for creating various splitting strategies (thanks to @dongkwan-kim)homophily measurement (thanks to @ldv1)to_cugraph conversionGCN2ConvTransformerConv with the beta argument being input and message dependent (thanks to @ldv1)NeighborSampler now works with SparseTensor and supports an additional transform argumentBatch.from_data_list now supports batching along a new dimension via returning None in Data.__cat_dim__, see here for the accompanying tutorial (thanks to @Linux-cpp-lisp)MetaLayer is now "jittable"torch_geometric.nn and torch_geometric.datasets, leading to faster imports (thanks to @Linux-cpp-lisp)GNNExplainer now supports various output formats of the underlying GNN model (thanks to @wsad1)JODIE datasets for temporal graph learningWordNet18RR (thanks to @minhtriet)Reddit2MixHopSyntheticDataset (thanks to @ldv1)NELLSparseAdam usage in examples/metapath2vec.py (thanks to @declanmillar)from_networkx to support empty edge lists (thanks to @shakedbr)softmaxDenseGraphConv with aggr="max" (thanks to @quqixun)Cartesian and LocalCartesian now compute Cartesian coordinates from target to source nodes (thanks to @ldv1)Fixed a crucial bug in which InMemoryDatasets with the usage of pre_transform led to an error
InMemoryDatasets with the usage of pre_transform led to an errorWikipediaNetwork and Actortorch_geometric.utils.homophily_ratio`GCN2Conv` [Cora example, PPI example]
GCN2Conv [Cora example, PPI example]TransformerConvWebKBNode2Vec can now handle different p and q values other than 1 (torch-cluster update required)GraphSAGE unsupervised training example (thanks to @yuanx749)GAE example (thanks to @GuillaumeSalha)SIGN example now operates on mini-batches of nodesInMemoryDatasetsNeighborSampler does now work with SparseTensor as inputToUndirected transform in order to convert directed graphs to undirected onesGNNExplainer does now allow for customizable edge and node feature loss reductionaggr can now passed to any GNN based on the MessagePassing interface (thanks to @m30m)SEAL (thanks to @muhanzhang)torch_geometric.utils.softmax (thanks to @Book1996)GAE.recon_loss now supports custom negative edge indices (thanks to @reshinthadithyan)spmm computation and random_walk sampling on CPU (torch-sparse and torch-cluster updates required)DataParallel does now support the follow_batch argumentGDC transform (thanks to @klicperajo)GATConv when computing attention coefficients in bipartite graphsGraphSAINTSampler that led to wrong edge feature samplingDimeNet pretraining linkego-twitter and ego-gplus of the SNAPDataset collectionICEWS18, QM9, QM7b, MoleculeNet, Entities, PPI, Reddit, MNISTSuperpixels, ShapeNet)MessagePassing.jittable() tried to write to a file without permission (thanks to @twoertwein)GCNConv does not require edge_weight in case normalize=FalseBatch.num_graphs will now report the correct amount of graphs in case of zero-sized graphsThis is a minor release, mostly focusing on PyTorch 1.6.0 support. All external wheels are now also available for PyTorch 1.6.0.
This is a minor release, mostly focusing on PyTorch 1.6.0 support. All external wheels are now also available for PyTorch 1.6.0.
WikiCS datasetGENConv and DeepGCNLayer (thanks to @lightaime)PairNorm (thanks to @gupta-abhay)LayerNorm (thanks to @aluo-x)GNNExplainer to work with GATConvMessagePassing.jittable call when installing PyG via piptorch-sparse where reduce functions with dim=0 did not yield the correct resulttorch-sparse which suppressed all warningsA new major release, introducing TorchScript support, memory-efficient aggregations, bipartite GNN modules, static graphs and much more!
A new major release, introducing TorchScript support, memory-efficient aggregations, bipartite GNN modules, static graphs and much more!
torch_sparse.SparseTensor, see here for the accompanying tutorialconv = SAGEConv(in_channels=(32, 64), out_channels=64)
out = conv((x_src, x_dst), edge_index)
conv = GCNConv(in_channels=32, out_channels=64)
x = torch.randn(batch_size, num_nodes, in_channels)
out = conv(x, edge_index)
print(out.size())
>>> torch.Size([batch_size, num_nodes, out_channels])
PNAConv (thanks to @lukecavabarrett and @gcorso)DimeNet on QM9ClusterGCNConvWeightedEdgeSampler for GraphSAINT (thanks to @KiddoZhu)num_workers support for GraphSAINTadd_self_loops argument, e.g., for GCNConvRGCNConv: The old RGCNConv implementation has been moved to FastRGCNConvGNNBenchmarkDataset suite from the Benchmarking Graph Neural Networks paperWordNet18VGAE KL-loss computation (thanks to @GuillaumeSalha)This release is a big one thanks to many wonderful contributors. You guys are awesome!
This release is a big one thanks to many wonderful contributors. You guys are awesome!
NeighborSampler got completely revamped: it's now much faster, allows for parallel sampling, and allows to easily apply skip-connections or self-loops. See examples/reddit.py or the newly introduced OGB examples (examples/ogbn_products_sage.py and examples/ogbn_products_gat.py). The latter also sets a new SOTA on the OGB leaderboards (reaching 0.7945 ± 0.0059 test accuracy)SAGEConv now uses concat=True by default, and there is no option to disable it anymoreNode2Vec got enhanced by a parallel sampling mechanism, and as a result, its API slightly changedMetaPath2Vec: The first model in PyG that is able to operate on heteregenous graphsGNNExplainer: Generating explanations for graph neural networksGraphSAINT: A graph sampling based inductive learning methodSchNet model for learning on molecular graphs, comes with pre-trained weights for each target of the QM9 dataset (thanks to @Nyuten)ASAPooling: Adaptive structure aware pooling for learning hierarchical graph representations (thanks to @ekagra-ranjan)ARGVA node clustering example, see examples/argva_node_clustering.py (thanks to @gsoosk)MFConv: Molecular fingerprint graph convolution operator (thanks to @rhsimplex)GIN-E-Conv that extends the GINConv to also account for edge featuresDimeNet: Directional message passing for molecular graphsSIGN: Scalable inception graph neural networksGravNetConv (thanks to @jkiesele)GATConv can now return attention weights via the return_attention_weights argument (thanks to @douglasrizzo)InMemoryDataset now has a copy method that converts sliced datasets back into a contiguous memory layoutPlanetoid got enhanced by the ability to let users choose between different splitting methods (thanks to @dongkwan-kim)k_hop_subgraph: Computes the k-hop subgraph around a subset of nodesgeodesic_distance: Geodesic distances can now be computed in parallel (thanks to @jannessm)tree_decomposition: The tree decompostion algorithm for generating junction trees from moleculesSortPool benchmark script now uses 1-D convolutions after pooling, leading to better performance (thanks to @muhanzhang)write_offGEDDataset datasetto_networkx conversion can now also properly handle non-tensor attributesread_obj (thanks to @mwussow)Cluster-GCN via `ClusterData` and `ClusterLoader` for operating on large-scale graphs, see `examples/cluster_gcn.py` for an example on how to use
ClusterData and ClusterLoader for operating on large-scale graphs, see examples/cluster_gcn.py for an example on how to usetensorboard logging exampleCitationFull: The full citation network dataset suiteSNAPDataset: A subset of graph datasets from the SNAP dataset collectionSuiteSparseMatrixCollectionTrackMLParticleTrackingDatasetconcat argument to SAGEConvtrain_test_split_edges method of the graph autoencoder GAE class to torch_geometric.utilsSplineConv compatibility with latest torch-spline-conv packagetrimesh conversion utilities do not longer result in a permutation of the input dataThere are now Python wheels available for torch-scatter and torch-sparse which should make the installation procedure much more user-friendly. Simply
torch-scatter and torch-sparse which should make the installation procedure much more user-friendly. Simply runpip install torch-scatter==latest+${CUDA} torch-sparse==latest+${CUDA} -f https://pytorch-geometric.com/whl/torch-1.4.0.html
pip install torch-geometric
where ${CUDA} should be replaced by either cpu, cu92, cu100 or cu101 depending on your PyTorch installation.
torch-cluster is now an optional dependency. All methods that rely on torch-cluster will result in an error requesting you to install torch-cluster.torch_geometric.data.Dataset can now also be indexed and shuffled:dataset.shuffle()[:50]
MessagePassing modules.RGCNConv when using root_weight=False.This release mainly focuses on torch-scatter=2.0 support. As a result, PyTorch Geometric now requires PyTorch 1.4. If you are in the process of updati
This release mainly focuses on torch-scatter=2.0 support. As a result, PyTorch Geometric now requires PyTorch 1.4. If you are in the process of updating to PyTorch 1.4, please ensure that you also re-install all related external packages.
TUDataset cleaned versions, containing only non-isomorphic graphsGridSampling transformShapeNet dataset now comes with normals and better split optionsToSLIC transform for superpixel generation from imagesMessagePassing interface with custom aggregate methods (no API changes)from_networkx.This release focuses on Pytorch 1.2 support and removes all torch.bool deprecation warnings. As a result, this release now requires PyTorch 1.2. If yo…
This release focuses on Pytorch 1.2 support and removes all torch.bool deprecation warnings. As a result, this release now requires PyTorch 1.2. If you are in the process of updating to PyTorch 1.2, please ensure that you also re-install all related external packages.
Overall, this release brings the following new features/bugfixes:
pre_transform and pre_filter arguments differ from an already processed versiontorch.bool deprecation warningsARGA initialization bugQM9This is a minor release which is mostly distributed for official PyTorch 1.2 support. In addition, it provides minor bugfixes and the following new fe
This is a minor release which is mostly distributed for official PyTorch 1.2 support. In addition, it provides minor bugfixes and the following new features:
ChebConv in combination with a largest eigenvalue transformTAGCNNode2VecEdgePoolingGMMConv formulation with separate kernelsCOLORS and TRIANGLES datasetsPascalVOCKeypoints)DBP15K datasetWILLOWObjectClass datasetPlease also update related external packages via, e.g.:
$ pip install --upgrade torch-cluster
Support for giant graph handling using NeighborSampler and bipartite message passing operators
NeighborSampler and bipartite message passing operatorsdebug APITUDataset download errorsFeasStConv modulenetworkx conversion functionalityData and DataLoader handling with customizable number_of_nodes (e.g. for holding two graphs in a single Data object)GeniePath exampleSAGPool modulegdist (optional)PointNet and DGCNN classification and segmentation examplessubgraph functionalityGMMConvloop APIThanks to all contributors!
More convenient self-loop API (including addition of edge weights)
GEDDatasetDynamicFAUSTTOSCASHREC2016New models and operators, e.g., RENet, Signed Graph Convolution, Deep Graph Infomax, PPFNet, ...
bugfixes for bipartite message passing API
PointConv bugfix for bipartite graphs.
PointConv bugfix for bipartite graphs.
All Variants of Graph Autoencoders
This release includes:
DataParallel bugfixesNothing published for this version
Added remove_faces parameter for face transforms
remove_faces parameter for face transformsFinally completed documentation
We made a bunch of improvements to PyTorch Geometric and added various new convolution and pooling operators, e.g., top_k pooling, PointCNN, Iterative
We made a bunch of improvements to PyTorch Geometric and added various new convolution and pooling operators, e.g., top_k pooling, PointCNN, Iterative Farthest Point Sampling, PointNet++, ...
minor bug fixes (e.g. calls to torch-sparse had wrong argument order)
torch-sparse had wrong argument order)Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →