The invention discloses a perturbation mode incremental
toxicity data continuous detection method and
system, and the method comprises the steps: obtaining to-be-detected texts, carrying out the perturbation of different
modes on all to-be-detected texts through employing a
toxicity data jailbreak perturbation frame, obtaining jailbreak to-be-detected difficult texts in each perturbation mode, constructing a
data set in each perturbation mode, and carrying out the detection of the to-be-detected difficult texts in each perturbation mode; the
data set is divided into a
training set, a
verification set and a
test set; constructing a
toxicity continuous detection model based on feature playback, training the toxicity continuous detection model by adopting the
training set under each disturbance mode, and verifying by adopting the
verification set to obtain an optimal toxicity continuous detection model; and sending the
test set in each disturbance mode into the optimal toxicity continuous detection model for detection to obtain a corresponding toxicity detection result. According to the method, a jailbreak disturbance framework is provided to generate data sets in different disturbance
modes, and a continuous learning method based on feature playback is provided, so that the continuous detection capability of toxic texts in different disturbance
modes is effectively promoted.