Scientists test new chemical compounds on animals because we still don’t completely understand the world around us. New compounds might interact with living cells in unexpected ways, causing unforeseen harm.

But an artificial intelligence system published in the research journal Toxicological Sciences shows that it might be possible to automate some tests using the knowledge about chemical interactions we already have. The AI was trained to predict how toxic tens of thousands of unknown chemicals could be, based on previous animal tests, and the algorithm’s results were shown to be as accurate as live animal tests.

The algorithm can predict results from nine different tests, from skin corrosion to eye irritation, which authors say comprised 57% of all animal testing done in the EU in 2011.

This isn’t the first computer system to try to predict whether a chemical will be toxic, but the scale of data that the system is able to use is novel. In 2007, an EU law mandated that the safety information for chemicals marketed in the EU was made public. The team, led by John Hopkins toxicologist Thomas Hartung, has been working on translating data from the EU into usable data for AI since 2014, Nature reports. The dataset used in this AI system uses more than 850,000 chemical attributes, such as the degrees to which they are explosive or carcinogenic.

A task force of 16 US government agencies invited Hartung’s team and other AI researchers working on similar problems to demonstrate their systems’ effectiveness at the National Institutes of Health, according to Nature. The exercise resulted in a toxicity model for 40,000 chemicals that will be released to the public later this year.