Skip to content
Хабр·Indexed by this site · Originally published· Tools →

How many samples are needed to test the safety of an AI application

Сколько примеров нужно, чтобы проверить безопасность AI-приложения

AI summary

The HiveTrace Red team, in a post on Habr, presented a sample-size planning method for red-team testing AI applications. Using a 0.3% leakage threshold as an example, at least 998 independent requests are needed with zero violations to confirm that the leakage frequency is below that level. Methodologically, a one-sided 95% Clopper-Pearson confidence upper bound is calculated for independent binary outcomes; with 10 requests and zero violations, the attack success rate (ASR) is 0% but the upper bound is about 25.89%, showing that not finding a violation does not equal being able to confirm a low leakage rate; the comparison table in the article shows that a 1% threshold requires about 299 requests and 0.1% about 2995. The article suggests first defining the violation criterion, metric and threshold, then calculating the minimum number of requests; passing or not depends on whether the upper bound is strictly below the threshold rather than on the ASR itself; at the same number of requests, adding independent requests narrows the upper bound more than repeated attempts; its product HiveTrace Red has more than 90 built-in attack classes for enhanced testing.

Read originalhabr.com