MolBasis
maermseerror-metricsqspr-validation5 min read

MAE versus RMSE, which error to report for a property model

MAE averages absolute errors and treats every molecule alike. RMSE squares first, so a few large misses dominate it. Report MAE and check the ratio.

Updated November 28, 2026

MAE, the mean absolute error, is the average size of the misses in the property's own units, with every molecule weighted once. RMSE, the root mean squared error, squares each miss before averaging, so a handful of large errors dominate it. For property prediction on small datasets with occasional bad measurements, MAE is the more honest headline figure. RMSE still earns a place, because the ratio of the two numbers tells the reader how heavy the error tail is.

Two formulas and what each one weights

Write the error on molecule i as e_i, the measured value minus the predicted value. MAE is the mean of |e_i|. RMSE is the square root of the mean of e_i². The only difference is the square, and the square changes everything about which molecules matter.

Under MAE, a molecule missed by 2.0 log units counts as much as ten molecules missed by 0.2 each. Under RMSE, the one molecule missed by 2.0 contributes 4.0 to the sum while the ten contribute 10 × 0.04 = 0.4. One molecule outweighs ten by a factor of 10. RMSE is an error metric that listens mainly to the worst cases.

Neither is right in the abstract. If the cost of a large miss really is quadratic, RMSE is the figure that matches the cost. For most readers of a QSPR result, the question is "how far off will the typical prediction be", and MAE answers that question directly.

A five-molecule example with one bad point

Suppose a model's held-out absolute errors in log S are 0.1, 0.2, 0.3, 0.4 and 2.0. The last molecule might be a mislabelled salt or a decomposing compound, but the model does not know that.

The errors sum to 0.1 + 0.2 + 0.3 + 0.4 + 2.0 = 3.0, and MAE is 3.0 / 5 = 0.60. For RMSE, square first. 0.01 + 0.04 + 0.09 + 0.16 + 4.00 = 4.30. Divide by 5 to get 0.86, and take the root, 0.927.

Now drop the fifth molecule. The errors sum to 1.0 and MAE becomes 1.0 / 4 = 0.25. The squared errors sum to 0.30, divided by 4 gives 0.075, and the root is 0.274. One molecule out of five moved MAE from 0.25 to 0.60 and RMSE from 0.27 to 0.93. RMSE moved three and a half times, MAE moved two and a half times. Both are sensitive on a set this small, which is the warning of the guide on small test sets and unstable figures. RMSE is more sensitive by construction.

import numpy as np
e = np.array([0.1, 0.2, 0.3, 0.4, 2.0])
mae = np.mean(np.abs(e))            # 0.60
rmse = np.sqrt(np.mean(e ** 2))     # 0.927
print(round(mae, 3), round(rmse, 3), round(rmse / mae, 2))

The ratio RMSE over MAE as a tail detector

For errors drawn from a normal distribution with mean zero, RMSE divided by MAE equals the square root of π/2, about 1.25. That is a textbook constant and a useful yardstick. In the example above the ratio is 0.927 / 0.60 = 1.55, well above 1.25, and the excess is the fifth molecule.

A ratio near 1.25 says the errors look Gaussian and MAE alone describes them well. A ratio of 1.5 or 2 says a few molecules carry a large share of the squared error, and the reader deserves to see which ones. A ratio near 1.0 says the errors are nearly uniform in size, which happens when predictions are compressed toward the mean. In that case the calibration slope is the next number to look at.

The ratio does not say whether the large misses are the model's fault or the data's. A measurement in the wrong units, a mislabelled stereoisomer or a melting point recorded for a hydrate will all appear as a heavy tail. The guide on outliers in property data covers what to do once a tail is found, and the units guide on log units, kcal and kJ covers the commonest cause.

Why the MolBasis protocol reports MAE and a lift

The MolBasis methodology measures MAE on the held-out molecules of the scaffold-blind split and reports it as a lift against the train-mean baseline. The baseline predicts the training mean for every held-out molecule. The lift is 1 minus the model MAE over the baseline MAE, and the gate for the A.IMPROVE label asks for a reduction of at least 30 percent. The guide on what a 30 percent MAE lift means works through the arithmetic.

MAE was chosen for this role because it is in the property's units, because it does not let one bad measurement decide the verdict, and because the baseline comparison is immediate. A reader who sees a lift can translate it into "the typical error shrank by this fraction". The same statement with RMSE would depend on how many bad points the held-out set happened to contain.

Each kernel page states its held-out figures and the number of molecules they rest on. None of them are recomputed here, because the fitting scripts and result files are not available for review. The figures are reported from the research record.

Which to report, and how

Report MAE as the headline, in the property's units, with the number of molecules. Add RMSE if space allows, so the reader can form the ratio. Add the largest absolute residual and the name of the molecule that produced it. State the baseline MAE on the same molecules, so the reader can compute the lift.

If the target is on a log scale, say so, and resist converting MAE back to linear units with a single factor. An MAE of 0.5 in log S means a factor of about 3.2 in concentration, but the factor applies symmetrically on the log scale and asymmetrically on the linear one.

Key points

  • MAE averages absolute errors and weights every molecule once. RMSE squares first and lets the worst misses dominate.
  • RMSE is always at least MAE. A ratio near 1.25 means roughly Gaussian errors, a ratio near 1.5 or more means a heavy tail.
  • On small held-out sets a single bad measurement moves both numbers a lot, RMSE more.
  • The MolBasis protocol reports held-out MAE as a lift against the train-mean baseline, and the kernel page states the molecule count.
  • Report MAE, the baseline MAE, the number of molecules and the largest residual with its molecule.

Questions people ask

Is RMSE always larger than MAE?
RMSE is always greater than or equal to MAE, with equality only when every error has the same magnitude. For errors that follow a normal distribution the ratio RMSE over MAE is about 1.25. A ratio well above that signals a heavy tail or a few very large misses.
Why does MolBasis report MAE rather than RMSE?
MAE is in the property's own units, every molecule counts once, and it is easy to compare against a baseline that predicts the training mean. The MAE lift over that baseline is one of the three held-out figures each kernel page reports, alongside Pearson r and the calibration slope.
Should I report both MAE and RMSE?
Yes when space allows. MAE gives the typical error a user should expect, RMSE gives weight to the worst cases, and their ratio tells the reader how heavy the error tail is. If you report only one, report MAE and state the largest residual separately.

Further reading

In practice: The methodology page describes the checks applied to every kernel, scaffold-blind split included, and the limits of those checks. Every kernel page quotes the held-out figure first and the in-sample figure second.

See the kernels themselves

Every kernel is shown with its held-out result, the number of molecules it rests on and what it cannot be trusted for.