Instagram is getting serious about keeping the trolls away from your photos. Earlier today, the company announced that it will be rolling out an enhanced comment filter that uses artificial intelligence to squash rude, spammy, and otherwise inappropriate comments.

The news, along with an in-depth breakdown of how the technology was designed and works, was initially announced on Wired, but you can get the important bits from Instagram's own blog post.

The tool acts by automatically and intelligently detecting and removing comments it believes are either inappropriate or spam, and hiding them from everyone except the poster him or herself. They have no idea their comment is invisible, but nobody else can see it.

The same goes for the spam filter, which can detect 'obvious spam in comments' in a total of 9 languages: English, Spanish, Portuguese, Arabic, French, German, Russian, Japanese and Chinese.

If for some reason you don't want these comments filtered, the intelligent filter can be turned off by clicking on the '...' menu on your profile page and flipping the 'Hide Offensive Comments' slider off.

Both tools are powered by machine learning, meaning that, over time, they'll get better at detecting inappropriate comments and leaving inappropriate seeming (but actually okay) comments alone.

"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," reads the IG announcement. "We believe that using machine learning to build tools to safeguard self-expression is an important step in fostering more inclusive, kinder communities."

As the algorithms improve, Instagram is promising to make both filters available in more languages. For now, offensive comments will only be filtered in English, but expect ongoing updates.