pyg-nightly 2.7.0.dev20250604__py3-none-any.whl → 2.7.0.dev20250606__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.
- {pyg_nightly-2.7.0.dev20250604.dist-info → pyg_nightly-2.7.0.dev20250606.dist-info}/METADATA +1 -1
- {pyg_nightly-2.7.0.dev20250604.dist-info → pyg_nightly-2.7.0.dev20250606.dist-info}/RECORD +7 -7
- torch_geometric/__init__.py +1 -1
- torch_geometric/nn/models/glem.py +2 -2
- torch_geometric/utils/influence.py +16 -8
- {pyg_nightly-2.7.0.dev20250604.dist-info → pyg_nightly-2.7.0.dev20250606.dist-info}/WHEEL +0 -0
- {pyg_nightly-2.7.0.dev20250604.dist-info → pyg_nightly-2.7.0.dev20250606.dist-info}/licenses/LICENSE +0 -0
{pyg_nightly-2.7.0.dev20250604.dist-info → pyg_nightly-2.7.0.dev20250606.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pyg-nightly
|
3
|
-
Version: 2.7.0.
|
3
|
+
Version: 2.7.0.dev20250606
|
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=
|
1
|
+
torch_geometric/__init__.py,sha256=BD3Th7gs3RFBES0GFQ42zZ7rQwA2D8n5zYL1L0hvKFs,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
|
@@ -442,7 +442,7 @@ torch_geometric/nn/models/dimenet.py,sha256=O2rqEx5HWs_lMwRD8eq6WMkbqJaCLL5zgWUJ
|
|
442
442
|
torch_geometric/nn/models/dimenet_utils.py,sha256=Eyn_EiJqwKvuYj6BtRpSxrzMG3v4Gk98X9MxZ7uvwm4,5069
|
443
443
|
torch_geometric/nn/models/g_retriever.py,sha256=tVibbqM_r-1LnA3R3oVyzp0bpuN3qPoYqcU6LZ8dYEk,8260
|
444
444
|
torch_geometric/nn/models/git_mol.py,sha256=Wc6Hx6RDDR7sDWRWHfA5eK9e9gFsrTZ9OLmpMfoj3pE,12676
|
445
|
-
torch_geometric/nn/models/glem.py,sha256=
|
445
|
+
torch_geometric/nn/models/glem.py,sha256=1Tl9lb5i8-GwtYMiqFtRmgAC7esSr606ekd2RXXBX2Y,16449
|
446
446
|
torch_geometric/nn/models/gnnff.py,sha256=15dkiLgy0LmH1hnUrpeoHioIp4BPTfjpVATpnGRt9E0,7860
|
447
447
|
torch_geometric/nn/models/gpse.py,sha256=3tKzVPkvntAtj13qSPJO1rittr8X1Q_7OqVTOaSpp2s,41982
|
448
448
|
torch_geometric/nn/models/graph_mixer.py,sha256=mthMeCOikR8gseEsu4oJ3Cd9C35zHSv1p32ROwnG-6s,9246
|
@@ -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=
|
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.
|
644
|
-
pyg_nightly-2.7.0.
|
645
|
-
pyg_nightly-2.7.0.
|
646
|
-
pyg_nightly-2.7.0.
|
643
|
+
pyg_nightly-2.7.0.dev20250606.dist-info/licenses/LICENSE,sha256=ic-27cMJc1kWoMEYncz3Ya3Ur2Bi3bNLWib2DT763-o,1067
|
644
|
+
pyg_nightly-2.7.0.dev20250606.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
645
|
+
pyg_nightly-2.7.0.dev20250606.dist-info/METADATA,sha256=DZmmGP4X5ZCOarKh3B4kkaqENUf31OB0kSOV_zeizTI,62967
|
646
|
+
pyg_nightly-2.7.0.dev20250606.dist-info/RECORD,,
|
torch_geometric/__init__.py
CHANGED
@@ -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.
|
34
|
+
__version__ = '2.7.0.dev20250606'
|
35
35
|
|
36
36
|
__all__ = [
|
37
37
|
'Index',
|
@@ -197,7 +197,7 @@ class GLEM(torch.nn.Module):
|
|
197
197
|
optimizer.zero_grad()
|
198
198
|
all_out.append(out)
|
199
199
|
total_correct += int(out.argmax(dim=-1).eq(labels).sum())
|
200
|
-
total_loss += float(loss)
|
200
|
+
total_loss += float(loss.detach())
|
201
201
|
if verbose:
|
202
202
|
pbar.update(batch['n_id'].size(0))
|
203
203
|
|
@@ -251,7 +251,7 @@ class GLEM(torch.nn.Module):
|
|
251
251
|
loss.backward()
|
252
252
|
optimizer.step()
|
253
253
|
optimizer.zero_grad()
|
254
|
-
total_loss += float(loss)
|
254
|
+
total_loss += float(loss.detach())
|
255
255
|
total_correct += int(out.argmax(dim=-1).eq(labels).sum())
|
256
256
|
if verbose:
|
257
257
|
pbar.update(batch.batch_size)
|
@@ -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
|
-
|
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
|
-
|
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`,
|
223
|
-
|
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
|
-
|
239
|
-
|
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
|
|
File without changes
|
{pyg_nightly-2.7.0.dev20250604.dist-info → pyg_nightly-2.7.0.dev20250606.dist-info}/licenses/LICENSE
RENAMED
File without changes
|