Quantifying the Benefit of Artificial Intelligence for Scientific Research