Roche has signed a deal to pay $750 million upfront for Boston-based PathAI, an acquisition by the Swiss pharmaceutical giant to speed up its use of artificial intelligence to help pathologists diagnose disease.

The agreement, which is expected to close in the second half of the year, could generate an additional $300 million for PathAI if it leads to the achievement of certain milestones.

“Joining forces with Roche marks a new era for PathAI, enabling us to realize our mission of improving patient outcomes through AI-powered pathology at unprecedented scale and speed,” said Andy Beck, chief executive and cofounder of PathAI, in a statement. “Roche’s global infrastructure and expertise will bring our digital diagnostics technology to patients worldwide.”

“Digital pathology has the potential to improve precision diagnosis of cancer and enable physicians to offer better tailored treatment regimens,” said Matt Sause, chief executive of Roche Diagnostics. “Bringing PathAI into Roche Diagnostics will allow us to combine their best-in-class digital pathology tools with our leading oncology diagnosis platforms to deliver better insights for physicians and potentially better outcomes for patients worldwide.”

The move comes after Roche and PathAI began a partnership in 2021 that was broadened three years later to include the development of AI-powered companion diagnostic algorithms.

Founded a decade ago, PathAI uses artificial intelligence and machine learning software to solve a growing problem in pathology.

As medicine has advanced, pathologists have been asked to do more, such as searching for more advanced patterns in body tissue that signal a disease is present. Oncologists, for example, can use the software to digitally analyze breast tissue samples for signs of cancer. PathAI’s product aims to make it easier to find such patterns in medical images.

The company was birthed by Beck, a trained pathologist who received his PhD in biomedical informatics at Stanford University. His cofounder, Aditya Khosla, earned his doctorate in machine learning from the Massachusetts Institute of Technology.

Jonathan Saltzman can be reached at jonathan.saltzman@globe.com.