Before AI systems are released, they should go through safety tests. Often this testing involves a second AI grading the answers, and a person signs off on the result. However, it is often unclear how reliable the numbers behind such sign-offs are: small test sizes, missing margins of error and error-prone AI graders can make a result look safer than it is.
"How do we make AI safe, if we can't trust our safety statistics?" asks Prof. Dr. Sebastian Vollmer, head of the research department Data Science and its Applications at DFKI and Professor for Application of Machine Learning at RPTU.
This is where safety-stats comes in. Developed by researchers at the University of Kaiserslautern-Landau (RPTU) and the German Research Center for Artificial Intelligence (DFKI) together with international partners and released on 24 November 2026, the open-source software brings the statistical care of clinical trials to safety testing for artificial intelligence.
Good test scores are not proof of safety
A study by the University of Oxford, published in February 2026, shows that high test scores alone say little about real-world use. Chatbots now pass medical licensing exams with almost perfect scores. Yet people who used them to assess medical scenarios did no better than a comparison group without a chatbot. In medicine itself, a drug is not considered safe just because 50 volunteers took it without side effects. Clinical trials set their sample sizes in advance, report margins of error and account for diagnostic tests that make mistakes.
Four statistical safeguards
safety-stats brings this care to the analysis of AI safety tests:
- Margins of error: instead of a single score, the software reports a range for the failure rate. If a system passes a test 200 times without a failure, its failure rate can still be as high as 1.5 percent.
- Test planning: the software calculates in advance how many test runs a claim requires. To claim a failure rate below one percent, with the 95 percent confidence that is standard in science, a team needs at least 299 clean runs.
- Fair comparisons: it shows whether a new model is actually safer than its predecessor or merely got lucky in a small test.
- Checks on AI graders: it compares the grading AI with answers labelled by people and corrects the result for the grader's errors.
An example with the BeaverTails safety benchmark shows the difference this can make. Two AI graders rated 21.8 percent of 1,400 answers as unsafe, a clear fail under the criteria set in advance. After checking against 200 answers labelled by people, the true share can only be narrowed down to between 4.2 and 17.4 percent. The result is therefore inconclusive, and further tests are needed.
Solid evidence, clear limits
safety-stats does not replace human judgement and cannot improve a poorly designed test. Its results apply to the questions and settings that were tested, not to everything users may later type. Demand for solid evidence is growing: since 2 August 2026, the EU AI Office can enforce the AI Act's rules for general-purpose AI models, including by requesting model evaluations.
International collaboration
safety-stats was developed by researchers at DFKI and RPTU together with Mila – Quebec AI Institute (Montreal), Imperial College London, the RIKEN Center for Advanced Intelligence Project (AIP, Tokyo) and INESC-ID (Lisbon). The software reads logs from Inspect, the open-source framework of the UK AI Security Institute, as well as CSV and JSONL files from other testing tools. It is available free of charge under the MIT licence on GitHub. A demo runs on a standard laptop in about half a minute, without an account or API key.
Further information
- Code and documentation:github.com/datasciapps/safety-stats
- Install: python -m pip install 'safety-stats[inspect]'
- Offline demo: git clone github.com/datasciapps/safety-stats.git
then, inside that folder, python examples/demo/run_demo.py - Contribute: issues, discussions and pull requests are welcome on GitHub.
