Formula

Graph Classification Loss Formula in GNNs

The loss function for Graph Neural Networks (GNNs) in graph classification tasks is defined as:

L=GiTMLP(zGi)yGi22\mathcal{L} = \sum_{\mathcal{G}_i \in \mathcal{T}} \| \text{MLP}(z_{\mathcal{G}_i}) - y_{\mathcal{G}_i} \|_2^2

Where:

  • zGiz_{\mathcal{G}_i} represents the graph-level embeddings.
  • mathcal{T} = {mathcal{G}_1, dots, mathcal{G}_n} is the set of labeled training graphs.
  • MLP\text{MLP} is a densely connected feed-forward neural network.
  • yGiRy_{\mathcal{G}_i} \in \mathbb{R} is the target value for the training graph Gi\mathcal{G}_i.

0

1

Updated 2026-06-15

Tags

Data Science