Instagram has announced an update that adds new tools to block offensive comments and filter out spam. The app is now using an AI system called DeepText, which is able to understand how language works and digs in to comprehend the meaning of specific words.

“Many of you have told us that toxic comments discourage you from enjoying Instagram and expressing yourself freely,” Instagram CEO Kevin Systrom said on his blog post. “To help, we’ve developed a filter that will block certain offensive comments on posts and in live video.”

The new automatic filter tools can be found under the Instagram app's settings under comments. There’s a toggle to “Hide Offensive Comments,” which is able to automatically hide comments on the user’s posts that may possibly be considered offensive. This setting is turned on by default.

Comments will still appear normally on user’s posts, and users will still be able to report, delete or completely turn off comments like before. Instagram says that it will rollout the new comment filter in English first, but it will also arrive in other languages “over time.”

The next tool that Instagram announced is intended to work in the background of the app. Instagram says that it is now able to filter out spam in comments, blocking it from users’ posts and even on live videos.

The company says that the new spam filter is able to remove spam comments that are written in English, Spanish, Portuguese, Arabic, French, German, Russian, Japanese and Chinese.

Using AI To Fight Spam And Offesive Comments

“Powered by machine learning, today’s filters are our latest tools to keep Instagram a safe place. Our team has been training our systems for some time to recognize certain types of offensive and spammy comments so you never have to see them.”  — Instagram CEO, Kevin Systrom

DeepText Algorithm Decides If Comment May Be Spam, Offensive

What Instagram is using for both of these new tools is a system called DeepText, which is based on work developed by Facebook and Instagram. This DeepText system is able to interpret words by deducing their meaning based upon the context of the surrounding words in a given sentence.

Facebook and Instagram first used this system on combating spam, according to WIRED, which also broke the news first. Instagram hired a team of people that can classify comments as spam or not. After this team has collected enough data, four-fifths of that was fed through the DeepText system. Instagram’s engineers then came up with algorithms so that DeepText can do its magic on the app.

Instagram reportedly launched the DeepText system quietly back in October to take on widespread spamming. Now, the very same system is being used to automatically hide hateful or harassing comments on users’ posts.

Similar to the way the company combated spam, Instagram also hired a team to determine whether comments are appropriate or not. The team primarily based its decision on a comment's violation of Instagram’s Community Guidelines. If a comment is deemed inappropriate, members of the team will place the comment under categories like “bullying, racism and sexual harassment.”

This new system in filtering out hateful and spammy comments might not work perfectly at first, but it should improve over time.