The invention relates to an autonomous
attack and defense method and
system, which realize large-scale autonomous
attack and defense on an
artificial intelligence model based on multi-agent cooperation. The method comprises the following steps: designing an intelligent body check and analyzing technical data by using an
attack and defense method, identifying potential attack vectors, defense mechanisms and risk
modes from the technical data, and generating an attack and defense
blueprint; on the basis of the attack and defense
blueprint,
software package dependence needed by an experiment is recognized through an experiment deployment agent, a
virtualization environment is constructed, and loading and configuration of a model and a
data set are completed; and executing an attack and defense experiment in a deployed experiment environment by using an experiment debugging agent, collecting experiment data, analyzing model performance and generating an effect evaluation and feedback report, thereby realizing self-
adaptive optimization and sustainable evolution of the
system. Compared with the prior art, the method has the advantages that efficient autonomy and knowledge driving of security attack and defense are realized, and security risk mining, alignment evaluation and defense
verification can be performed on the model and the
system without manual intervention.