Correction to: Nature Machine Intelligence https://doi.org/10.1038/s42256-020-00234-6, published online 13 October 2020.

In the version of this Article originally published, in the Methods section, some of the mathematics formatting was incorrect. In the subsection ‘Graph-theoretical formulation’, ‘ \(\left( {\begin{array}{*{20}{c}} V \\ 2 \end{array}} \right)\)’ was twice given incorrectly as ‘(0.0ptV2)’; in Lemma 1, ‘G = (V, E)’ was incorrectly given as ‘g = (v, e)’, and ‘G’ as ‘g’; in Lemma 2, ‘O(|V(c)| + deg(u) + deg(v))’ was incorrectly given as ‘O(+ deg(u) + deg(v))’. All versions of the Article have been corrected.