As scientific instruments and the literature generate ever larger volumes of data, machine learning (ML)has become essential for organizing, analyzing and interpreting complex information. This Perspectiveexamines how ML accelerates discovery across disciplines, with examples such as brain mapping andexoplanet detection. It also considers situations with different levels of prior knowledge about theunderlying phenomenon, outlining strategies to address limitations and exploit ML effectively.Although growing reliance on ML raises challenges for research practice and validation, it is reshapingscientific methods and expanding what can be studied. We also highlight foundation models as apromising route to faster, broader scientific discovery.