In response to criticism over discriminatory advertisements, Facebook has updated its advertising policies to explicitly ban discrimination based on race, sexual orientation, or age.  The social network has previously allowed advertisers to use a feature called “ethnic affinity” profiling to market ads. This feature grouped people by “their affinity to the cultures they are interested in” rather than “their genetic makeup.”

Facebook argued that this method was not the same as racial profiling, because a white person interested in hip-hop or other “black” cultural institutions might end up in the “African-American” affinity group. Last October, however, ProPublica reported that this affinity targeting could be used to exclude groups from viewing ads for home sales. This sort of discriminatory advertising is banned under the Civil Rights Act of 1964.

The social network plans to use new technology that “leverages machine learning” in order to identify the worst offenders. If these tools identify ads that are being unlawfully targeted, it will trigger a manual review of the suspected offender by a Facebook employee. Advertisers placing credit, employment, and housing ads are also being asked to explicitly certify their compliance with anti-discrimination laws.

“Several organizations have asked us to work with them to help identify ways that our advertising technology could be used to promote inclusion and opportunity for underserved communities, while also protecting against discriminatory uses,” a Facebook representative wrote. “We believe in the power of our advertising products to create opportunities for people from all backgrounds, so we are committed to working with these groups toward that goal.”