pyg-nightly 2.7.0.dev20250604__py3-none-any.whl → 2.7.0.dev20250605__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyg-nightly
3
- Version: 2.7.0.dev20250604
3
+ Version: 2.7.0.dev20250605
4
4
  Summary: Graph Neural Network Library for PyTorch
5
5
  Keywords: deep-learning,pytorch,geometric-deep-learning,graph-neural-networks,graph-convolutional-networks
6
6
  Author-email: Matthias Fey <matthias@pyg.org>
@@ -1,4 +1,4 @@
1
- torch_geometric/__init__.py,sha256=di4kZd7rQFDpBlATSXKDIp6hVI7yFbo5CFhhBq2M5zs,2255
1
+ torch_geometric/__init__.py,sha256=OrO8JODc5kI0Tod_FwHplTEl8A62B4QrOlyKbzqkUCQ,2255
2
2
  torch_geometric/_compile.py,sha256=f-WQeH4VLi5Hn9lrgztFUCSrN_FImjhQa6BxFzcYC38,1338
3
3
  torch_geometric/_onnx.py,sha256=V9ffrIKSqhDw6xUZ12lkuSfNs48cQp2EeJ6Z19GfnVw,349
4
4
  torch_geometric/backend.py,sha256=lVaf7aLoVaB3M-UcByUJ1G4T4FOK6LXAg0CF4W3E8jo,1575
@@ -620,7 +620,7 @@ torch_geometric/utils/embedding.py,sha256=b-CQ-aapEgahxSS7fuL4aNQX6GJROboV0xclZ_
620
620
  torch_geometric/utils/functions.py,sha256=orQdS_6EpzWSmBHSok3WhxCzLy9neB-cin1aTnlXY-8,703
621
621
  torch_geometric/utils/geodesic.py,sha256=-xsqE3FZU7Y9gMbucIlGJ4FM-3nk8o0AQBxIdN-QfEw,4770
622
622
  torch_geometric/utils/hetero.py,sha256=ok4uAAOyMiaeEPmvyS4DNoDwdKnLS2gmgs5WVVklxOo,5539
623
- torch_geometric/utils/influence.py,sha256=b2v4G2jA-FKWWSohIc4iNkyFgUvS6j_g97qWT6xfrzI,9920
623
+ torch_geometric/utils/influence.py,sha256=7R-NW4myJMJPkbNiwcHTmO_m_B3gPB2IlBbQkB446xc,10348
624
624
  torch_geometric/utils/isolated.py,sha256=nUxCfMY3q9IIFjelr4eyAJH4sYG9W3lGdpWidnp3dm4,3588
625
625
  torch_geometric/utils/laplacian.py,sha256=ludDil4yS1A27PEuYOjZtCtE3o-t0lnucJKfiqENhvM,3695
626
626
  torch_geometric/utils/loop.py,sha256=MUWUS7a5GxuxLKlCtRq95U1hc3MndybAhqKD5IAe2RY,23051
@@ -640,7 +640,7 @@ torch_geometric/utils/undirected.py,sha256=H_nfpI0_WluOG6VfjPyldvcjL4w5USAKWu2x5
640
640
  torch_geometric/visualization/__init__.py,sha256=b-HnVesXjyJ_L1N-DnjiRiRVf7lhwKaBQF_2i5YMVSU,208
641
641
  torch_geometric/visualization/graph.py,sha256=mfZHXYfiU-CWMtfawYc80IxVwVmtK9hbIkSKhM_j7oI,14311
642
642
  torch_geometric/visualization/influence.py,sha256=CWMvuNA_Nf1sfbJmQgn58yS4OFpeKXeZPe7kEuvkUBw,477
643
- pyg_nightly-2.7.0.dev20250604.dist-info/licenses/LICENSE,sha256=ic-27cMJc1kWoMEYncz3Ya3Ur2Bi3bNLWib2DT763-o,1067
644
- pyg_nightly-2.7.0.dev20250604.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
645
- pyg_nightly-2.7.0.dev20250604.dist-info/METADATA,sha256=pOkfyi_H6pwQ7MLQrQ2nbMuuzDu7C1CLo_GNz0l-NsM,62967
646
- pyg_nightly-2.7.0.dev20250604.dist-info/RECORD,,
643
+ pyg_nightly-2.7.0.dev20250605.dist-info/licenses/LICENSE,sha256=ic-27cMJc1kWoMEYncz3Ya3Ur2Bi3bNLWib2DT763-o,1067
644
+ pyg_nightly-2.7.0.dev20250605.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
645
+ pyg_nightly-2.7.0.dev20250605.dist-info/METADATA,sha256=zp4F4cmkSAYx-OHypi7DhI-CRfTLDhTiAZPltLJbKr0,62967
646
+ pyg_nightly-2.7.0.dev20250605.dist-info/RECORD,,
@@ -31,7 +31,7 @@ from .lazy_loader import LazyLoader
31
31
  contrib = LazyLoader('contrib', globals(), 'torch_geometric.contrib')
32
32
  graphgym = LazyLoader('graphgym', globals(), 'torch_geometric.graphgym')
33
33
 
34
- __version__ = '2.7.0.dev20250604'
34
+ __version__ = '2.7.0.dev20250605'
35
35
 
36
36
  __all__ = [
37
37
  'Index',
@@ -200,16 +200,24 @@ def total_influence(
200
200
  device: Union[torch.device, str] = "cpu",
201
201
  vectorize: bool = True,
202
202
  ) -> Tuple[Tensor, float]:
203
- r"""Compute Jacobian‑based influence aggregates for *multiple* seed nodes.
203
+ r"""Compute Jacobian‑based influence aggregates for *multiple* seed nodes,
204
+ as introduced in the
205
+ `"Towards Quantifying Long-Range Interactions in Graph Machine Learning:
206
+ a Large Graph Dataset and a Measurement"
207
+ <https://arxiv.org/abs/2503.09008>`_ paper.
208
+ This measurement quantifies how a GNN model's output at a node is
209
+ influenced by features of other nodes at increasing hop distances.
204
210
 
205
- For every sampled node :math:`v`, this method
211
+ Specifically, for every sampled node :math:`v`, this method
206
212
 
207
213
  1. evaluates the **L1‑norm** of the Jacobian of the model output at
208
214
  :math:`v` w.r.t. the node features of its *k*-hop induced sub‑graph;
209
215
  2. sums these scores **per hop** to obtain the influence vector
210
216
  :math:`(I_{0}, I_{1}, \dots, I_{k})`;
211
217
  3. optionally averages those vectors over all sampled nodes and
212
- (optionally) normalises them by :math:`I_{0}`.
218
+ optionally normalises them by :math:`I_{0}`.
219
+
220
+ Please refer to Section 4 of the paper for a more detailed definition.
213
221
 
214
222
  Args:
215
223
  model (torch.nn.Module): A PyTorch Geometric‑compatible model with
@@ -217,10 +225,10 @@ def total_influence(
217
225
  data (torch_geometric.data.Data): Graph data object providing at least
218
226
  :obj:`x` (node features) and :obj:`edge_index` (connectivity).
219
227
  max_hops (int): Maximum hop distance :math:`k`.
220
- num_samples (int, optional): Number of seed nodes to evaluate.
228
+ num_samples (int, optional): Number of random seed nodes to evaluate.
221
229
  If :obj:`None`, all nodes are used. (default: :obj:`None`)
222
- normalize (bool, optional): If :obj:`True`, divide each hop‑wise
223
- average by the influence of hop 0. (default: :obj:`True`)
230
+ normalize (bool, optional): If :obj:`True`, normalize each hop‑wise
231
+ influence by the influence of hop 0. (default: :obj:`True`)
224
232
  average (bool, optional): If :obj:`True`, return the hop‑wise **mean**
225
233
  over all seed nodes (shape ``[k+1]``).
226
234
  If :obj:`False`, return the full influence matrix of shape
@@ -235,8 +243,8 @@ def total_influence(
235
243
  Returns:
236
244
  Tuple[Tensor, float]:
237
245
  * **avg_influence** (*Tensor*):
238
- shape ``[k+1]`` if :obj:`average=True`;
239
- shape ``[N, k+1]`` otherwise.
246
+ shape ``[k+1]`` if :obj:`average=True`;
247
+ shape ``[N, k+1]`` otherwise.
240
248
  * **R** (*float*): Influence‑weighted receptive‑field breadth
241
249
  returned by :func:`influence_weighted_receptive_field`.
242
250