liveBook · Manning

Overfitting

As explained in Graph Neural Networks in Action

A modeling failure mode in which a model fits training data patterns too closely and generalizes poorly to validation or unseen data.

Overfitting occurs when a model keeps improving on training data while its performance degrades on unseen validation data. In graph learning, diverging training and validation loss curves provide the clearest signal. section 3.1.4

Diagnose overfitting through a training workflow:

  • Run training and validation loops for every epoch, recording both losses. section 3.1.3
  • Plot the curves and identify the point where validation loss reaches its minimum before rising. section 3.1.4
  • Retain the model instance with the lowest validation loss, then evaluate generalization on a separate test set. section 3.1.4 section 3.1.3

Graph model training

For the GCN and GraphSAGE models, validation loss begins diverging from training loss near epoch 20: training loss continues falling while validation loss rises. This indicates that additional training improves fit to the training graph data at the expense of generalization. section 3.1.4

Figure 3.1 Training and validation loss curves for the GCN model (left) and GraphSAGE model (right) trained in this section. The divergence of the validation from the training curve signals over-fitting, where the model learns the training data too well and at the expense of generalizing to new data.
figure

Use the paired training and validation loss curves to locate divergence and the best validation-loss point. section 3.1.4

How Graph Neural Networks in Action covers it

How deep it goes
Explains curve divergence, validation-loss minima, and checkpoint selection, but defers corrective techniques to later treatment.
Examples
Uses GCN and GraphSAGE loss curves, epoch-20 divergence, validation checkpoints, and product-category classification metrics.
What it assumes
Assumes training, validation, test splits, loss tracking, and basic graph-model training workflows.
What you can do after
Diagnose overfitting with loss curves, select the lowest-validation-loss checkpoint, and assess generalization on test data.
How it connects
Connects overfitting with GCN, GraphSAGE, validation loss, model checkpoints, and generalization.

Also explained in

Compare how 24 books explain overfitting →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Graph Neural Networks in Action. The section links point to the parts of the book it draws on.