Back to Bigger Picture

BIGGER PICTURE Public & everyday services

Catching spam that hides behind misspelled words

A scammer can alter a word with look-alike letters, invisible characters or deliberate typos. RETVec helped Gmail’s filters recognise the underlying pattern instead of being distracted by the spelling trick.

AI-generated illustration: Frosted-glass envelopes pass through a turquoise sorting aperture; disguised characters are diverted into a separate channel.
Recognising the trick behind altered letters: a conceptual visualisation of detecting disguised spam, rather than Gmail’s actual interface or RETVec’s internal architecture.AI-generated illustration of the idea, not a photograph of the actual people, equipment or event.
Paper’s production test
Caught 38% of previously missed spam
Comparison boundary
Same model test; text vectorizer replaced
Public artefact
Open code; repository archived in 2025

How the idea works

  1. Vary suspicious spellings

    Training includes typos and adversarial character substitutions.

  2. Preserve the underlying word pattern

    Similar forms receive resilient numerical representations.

  3. Classify and check false alarms

    The spam model is evaluated on missed spam and legitimate mail.

A spelling change should not defeat a defence

Spam filters need a numerical representation of text before they can classify it. Attackers exploit that step by changing how suspicious words are written while keeping them understandable to a reader. Google developed RETVec to make that representation resilient to character manipulations, so small surface changes would not so easily hide the message’s signal.

Sources: [2]

Practise on the distortions attackers use

The released method combines a compact character encoder with similarity learning. Training includes insertions, deletions, look-alike characters and other changes, teaching the representation to keep related word forms close. It supports UTF-8 text without relying on a fixed word dictionary. The project published code and examples for researchers and developers to inspect.

Sources: [3]

What the 38% result actually means

In the paper’s internal production evaluation, replacing the previous vectorizer caught 38% of spam the baseline had missed, at a fixed false-positive rate. That is not a 38-percentage-point jump in all spam detection. Google’s deployment report separately described fewer legitimate messages misclassified and lower computing use. These are related but distinct reported comparisons.

Sources: [1][2]

A small component can protect a large inbox

The benefit is a less easily evaded filter, not a guarantee that malicious mail disappears. The public repository was archived in April 2025, so it should be treated as a research artefact rather than an actively maintained product recommendation. The design lesson remains useful: strengthen the representation at the point an attacker is manipulating.

Sources: [3]

The original sources

  1. Bursztein and colleagues, NeurIPS 2023RETVec: Resilient and Efficient Text Vectorizer
  2. Google Security BlogImproving Text Classification Resilience and Efficiency with RETVec
  3. Google ResearchRETVec: implementation and archive notice

What to explore next

When there was no up-to-date list of families needing helpFinding a neutrino in a detector full of lookalikes
Explore all 99 applications