A computer-implemented method of training a generator model, wherein the generator model is configured to generate synthetic instances and a discriminator model is configured to determine discriminator scores for input instances, a discriminator score for an input instance indicating whether the input instance is a synthetic instance or a non-synthetic instance, wherein the discriminator model is configured to additionally determine a confidence score of the discriminator score of the input instance, wherein the confidence score indicates a confidence of the discriminator model in a prediction given by the discriminator score based on the input instance, wherein the discriminator model comprises a Bayesian neural network, wherein a weight between a first and a second neuron of the BNN is defined by a probability distribution, training the discriminator model comprising learning the weight, the BNN providing a probability distribution for the discriminator output, where the discriminator score is a mean of the probability distribution and the confidence score is a variance of the probability distribution, the computer-implemented method comprising the steps of: - accessing a set of non-synthetic instances and parameters of the generator model and of the discriminator model; and - learning the parameters of the generator model and of the discriminator model by repeatedly training the discriminator model using the generator model and the set of non-synthetic instances and training the generator model using the discriminator model, comprising: - training the generator model by optimizing a first objective function rewarding generation of synthetic instances which the discriminator model determines to be non-synthetic instances, wherein the first objective function further rewards high confidence for generated instances determined to be non-synthetic instances, and low confidence for generated instances determined to be synthetic instances; and - training the discriminator model by optimizing a second objective function rewarding correct determination whether input instances are synthetic instances or non-synthetic instances, wherein the second objective function further rewards high confidence for correct determinations and low confidence for incorrect determinations, wherein the synthetic instances, input instances, and non-synthetic instances are images. - accessing a set of non-synthetic instances and parameters of the generator model and of the discriminator model; and - learning the parameters of the generator model and of the discriminator model by repeatedly training the discriminator model using the generator model and the set of non-synthetic instances and training the generator model using the discriminator model, comprising: - training the generator model by optimizing a first objective function rewarding generation of synthetic instances which the discriminator model determines to be non-synthetic instances, wherein the first objective function further rewards high confidence for generated instances determined to be non-synthetic instances, and low confidence for generated instances determined to be synthetic instances; and - training the discriminator model by optimizing a second objective function rewarding correct determination whether input instances are synthetic instances or non-synthetic instances, wherein the second objective function further rewards high confidence for correct determinations and low confidence for incorrect determinations, wherein the synthetic instances, input instances, and non-synthetic instances are images. - training the generator model by optimizing a first objective function rewarding generation of synthetic instances which the discriminator model determines to be non-synthetic instances, wherein the first objective function further rewards high confidence for generated instances determined to be non-synthetic instances, and low confidence for generated instances determined to be synthetic instances; and - training the discriminator model by optimizing a second objective function rewarding correct determination whether input instances are synthetic instances or non-synthetic instances, wherein the second objective function further rewards high confidence for correct determinations and low confidence for incorrect determinations, wherein the synthetic instances, input instances, and non-synthetic instances are images.