A.I. systems, now being used for everything from determining how a prison sentence should be to the cost of premiums for health insurance, have come under attack for “hidden biases” that lie undetected in the system.

Pros understand that if you train with biased data, you will get biased results. This is why researchers at Massachusetts Institute of Technology’s Computer Science and Artificial Intelligence Laboratory (MIT CSAIL) have come up with algorithms that can identify and minimize hidden biases in the data while maintaining predictive accuracy.

Kyle Wiggers explains how the new algorithm works in VentureBeat:

The beating heart of the researchers’ AI system is a variational autoencoder (VAE), a neural network — layers of mathematical functions modeled after neurons in the human brain — comprising an encoder, a decoder, and a loss function. The encoder maps raw inputs to feature representations, while the decoder takes the feature representations as input, uses them to make a prediction, and generates an output. (The loss function measures how well the algorithm models the given data.)

In the case of the proposed VAE, dubbed debiasing-VAE (or DB-VAE), the encoder portion learns an approximation of the true distribution of the latent variables given a data point, while the decoder reconstructs the input back from the latent space. The decoded reconstruction enables unsupervised learning of the latent variables during training.

To validate the debiasing algorithm on a real-world problem with “significant social impact,” the researchers trained the DB-VAE model with dataset of 400,000 images, split 80 percent and 20 percent into training and validation sets, respectively. They then evaluated it on the PPB test dataset, which consists of images of 1,270 male and female parliamentarians from various African and European countries.

The results were really promising. According to the researchers, DB-VAE managed to learn not only facial characteristics such as skin tone and the presence of hair, but other features such as gender and age. Compared to models trained with and without debiasing on both individual demographics (race/gender) and the PPB dataset as a whole, DB-VAE showed increased classification accuracy and decreased categorical bias across race and gender — an important step, the team says, toward the development of fair and unbiased AI systems.