AI / 大模型架构
Graph Neural Network Message Passing
Node feature update via neighborhood aggregation across L message-passing layers.
完整 Prompt
A graph neural network message-passing diagram. Top — Input Graph: - A small graph with 6 nodes and labeled edges. Each node has a feature vector x_i (drawn as a small bar above the node). Center — Message Passing Layers (stacked, L=3 layers shown): - For each layer: - Each node aggregates features from its neighbors (highlight one focal node and color its neighbors). - Aggregation function (mean / sum / max) shown as a small symbol on the aggregation arrow. - Update function (small MLP) labeled "phi" at the focal node. - The node feature h_i^(l) becomes h_i^(l+1). Bottom — Readout / Pooling: - Node features at layer L are pooled (mean or attention-weighted) into a single graph-level embedding. - The graph embedding feeds an MLP classifier producing the prediction. Style: clean academic vector, navy / teal palette, sans-serif labels, white background.立即试用此 Prompt
适用场景
For GNN papers (GCN, GAT, GraphSAGE, MPNN) and applications like molecular property prediction.
变体
Graph Attention (GAT)
Replace simple aggregation with attention-weighted aggregation. Show the attention weights alpha_{ij} as varying-thickness edges between focal node and its neighbors.
使用建议
- Highlight a single focal node per layer — showing all updates at once becomes unreadable.
- Annotate aggregation type (mean / sum) explicitly. It changes the model class.
- Show the readout step — without it readers don't see how graph-level predictions are made.
常见问题
Can I extend this to a heterogeneous graph?
Add per-edge-type weights and one set of node-update parameters per node type. Color edges by type to make the heterogeneity visible.
