Skip to content

Latest commit

 

History

History
61 lines (36 loc) · 3.91 KB

File metadata and controls

61 lines (36 loc) · 3.91 KB
graph LR
    pgl_message_Message["pgl.message.Message"]
    pgl_graph_Graph["pgl.graph.Graph"]
    pgl_bigraph_BiGraph["pgl.bigraph.BiGraph"]
    pgl_nn_conv_Conv["pgl.nn.conv.Conv"]
    pgl_math["pgl.math"]
    pgl_nn_conv_Conv -- "initiates" --> pgl_graph_Graph
    pgl_nn_conv_Conv -- "initiates" --> pgl_bigraph_BiGraph
    pgl_graph_Graph -- "utilizes" --> pgl_message_Message
    pgl_bigraph_BiGraph -- "utilizes" --> pgl_message_Message
    pgl_graph_Graph -- "relies on" --> pgl_math
    pgl_bigraph_BiGraph -- "relies on" --> pgl_math
Loading

CodeBoardingDemoContact

Details

The pgl GNN subsystem is designed around an efficient message passing architecture. At its core, the pgl.message.Message component defines the data structure for information exchanged between nodes. Graph structures are managed by pgl.graph.Graph for general graphs and pgl.bigraph.BiGraph for bipartite graphs, both providing fundamental send and recv primitives. The send operation propagates messages across edges, while the recv operation aggregates these messages at target nodes, heavily leveraging the optimized mathematical utilities in pgl.math (specifically segment_sum and segment_mean) for efficient aggregation. Orchestrating this entire process is pgl.nn.conv.Conv, an abstract convolutional layer that defines the high-level logic for GNN operations, initiating message passing through the appropriate graph type and utilizing the message and math components to perform graph convolutions. This modular design allows for flexible and efficient implementation of various GNN models.

pgl.message.Message

Defines the structure and content of messages exchanged during graph operations. It encapsulates the data (e.g., node features, edge features) that is propagated across the graph.

Related Classes/Methods:

pgl.graph.Graph

Manages general graph data and provides core message sending (send) and receiving (recv) primitives for standard graph structures. It handles the aggregation of messages at target nodes.

Related Classes/Methods: None

pgl.bigraph.BiGraph

Manages bipartite graph data and provides specialized message sending (send) and receiving (recv) primitives tailored for bipartite graph structures, which are common in heterogeneous graph scenarios.

Related Classes/Methods: None

pgl.nn.conv.Conv

An abstract layer that orchestrates the message passing process for graph convolution operations. It defines the high-level logic for how messages are generated, propagated, and aggregated for GNN layers.

Related Classes/Methods: None

pgl.math

Provides optimized mathematical utilities for segment-wise operations, specifically segment_sum and segment_mean, which are crucial for efficient message aggregation during the recv phase of message passing in Graph Neural Networks. These functions enable the aggregation of features from multiple source nodes to a single target node based on segment IDs.

Related Classes/Methods: