Google has upgraded Gmail’s spam filters with a new text classification system called RETVec, designed to understand and combat “adversarial text manipulations” used in spam emails. These manipulations involve special characters, emojis, typos, and homoglyphs, making the emails difficult for traditional spam filters to classify.
One of the key features of RETVec is its resilience against character-level manipulations, including insertion, deletion, typos, homoglyphs, LEET substitution, and more. It is trained on top of a novel character encoder that can efficiently encode all UTF-8 characters and words, making it work across over 100 languages without the need for a lookup table or fixed vocabulary size.
The implementation of RETVec has led to significant improvements in spam detection and reduction in false positive rates, with Google reporting a 38% improvement in spam detection rate over the baseline and a 19.4% reduction in false positive rate. Additionally, using RETVec has reduced the model’s TPU usage by 83%, making it one of the largest defense upgrades for Gmail in recent years.