Mean Squared Error

Mean squared error penalizes the squared distance between predictions and targets. It is a standard regression loss and a common reconstruction loss.

For predictions and targets :

For scalar targets:

The gradient with respect to a scalar prediction is:

Large residuals therefore produce larger gradients than small residuals.

Likelihood View

If observations follow a Gaussian distribution with fixed variance:

then minimizing MSE is equivalent to minimizing Gaussian negative log-likelihood up to constants and scale.

More explicitly, for :

gives:

The fixed isotropic variance assumption is part of the claim. If each target dimension has different noise, a weighted MSE or learned-variance Gaussian NLL may be more appropriate.

Scale and Weighting

MSE is sensitive to target scale:

This matters for affinity units, log-transformed labels, standardized targets, coordinate losses, and multi-task objectives. If targets are standardized:

then and must be computed only on the training split.

For weighted regression:

Weights can represent confidence, assay quality, task balance, or sampling correction, but they change the population being optimized.

Coordinate and Structure Losses

For coordinate targets:

where maps predicted atoms or residues to reference atoms or residues. This mapping is not optional for symmetric atoms, alternate conformers, missing residues, or ligand poses.

Coordinate MSE is not automatically rotation- or translation-invariant. A note should state whether coordinates are:

  • aligned before scoring;
  • represented through distances;
  • predicted as equivariant coordinate updates;
  • evaluated with RMSD, distance error, contact accuracy, or physical validity.

Metric Boundary

Lower MSE supports a squared-error claim. It does not automatically imply better rank ordering, threshold classification, calibration, enrichment, or structural validity. For molecular and protein tasks, pair it with the metric that matches the downstream use.

Checks

  • Is the target scale raw, log-transformed, standardized, clipped, or censored?
  • Are large residuals meaningful rare cases or measurement artifacts?
  • Does the downstream task care about squared error, absolute error, rank order, or threshold crossing?
  • Are target normalization statistics computed only from the training split?
  • Is MSE used as a training loss, an evaluation metric, or both?