A data poisoning method and a data poisoning apparatus are provided. In the method, a training dataset and a validation dataset are retrieved. A perturbation is randomly initiated and added to data in the training dataset to generate poisoned training data. Values of multiple kernel functions of the poisoned training data and the validation dataset are computed by using kernel functions in a Gaussian process, and used to compute a mean of the Gaussian process on the validation dataset. A loss between the mean and the data in the validation dataset is computed by using a loss function of the Gaussian process, and used to generate an objective function that maximizes the loss. The objective function is solved to compute the perturbation that can maximize the loss. |