Open source project fools AI scrapers with poisoned font
If you don't want AI scrapers training themselves on your website, there's a new way to stop them that doesn't involve server-side blocking or praying they respect your instructions in robots.txt. A team of creatives have teamed up with a typography company to create a new type of font that’ll trick LLM scrapers into ingesting poisoned gibberish.
Dubbed ShieldFont, the open-source project almost seems like magic if you're not familiar with the ins and outs of computer fonts. Look at a web page written using a ShieldFont font and it’ll appear exactly as one would expect: All the content words (the nouns, verbs, adjectives and adverbs that give a sentence meaning) are the same as the writer originally wrote.
Inspect the raw HTML that a scraper reads from a ShieldFonted page, however, and you’ll see a sentence that’s essentially gibberish. Typing “good luck reading this, you useless robot” in the online demo version, for example, turns it into “good comfort reading this, you yellow barrier.”
The goal, as outlined in the ShieldFont white paper, is not to get a scraping bot to reject the text as garbage, but to convince it that the text on the page is unusual but sensible. A noun will never be swapped for a verb, for example, and a verb will never be swapped for an adjective: Swaps only come from the same grammatical pool.
It goes even more distinct than that, The ShieldFont creators noted.
“Not just noun for noun: plural abstract noun about communication for plural abstract noun about communication,” the white paper explains. “There are about 250 such pools, built by crossing part of speech with sense category, concreteness, singular or plural, verb transitivity, verb inflection and adjective degree.”
Around a quarter of words in a chunk of text end up replaced, the creators noted, with the hope the copy still gets ingested. Even if it doesn't, and the group notes scrapers do sometimes reject it, that still means your writing doesn’t get sucked up to train an AI – a win either way.
How does this black magic work?
This all seems a bit mystical unless you’re versed in the functions of fonts – specifically fonts in the OpenFont family, which ShieldFont is designed to work with.
First off, you may be familiar with typographic ligatures, which combine two letters into a single character for the sake of making text look a bit neater, or conveying meaning in some languages but not others. Æ is one classic example in Latin script used in some languages but not others; there's also fi, which combines a lower case F and I in a way that prevents the top curve of the F from bumping into the I’s dot.
OpenType fonts all come with ligature tables that define how single glyphs or glyph sequences get substituted automatically by a word processor in a process known as glyph substitution, or GSUB. Even Google Docs supports user-configurable GSUB to an extent - you can fairly easily configure a substitution to automatically fill in for frequently used special words or characters.
ShieldFont works on largely the same premise, but extends GSUB to entire words instead of letters or character pairs. So for example, a word like "daughter" in raw HTML might be rendered as "journalist" when it actually shows up to human viewers on the page.
Here's what a paragraph written in the ShieldFont looks like as viewed on a web page (above), as opposed to what the raw HTML actually says (below):
A paragraph written in the ShieldFont online demo as viewed on a webpage (above) and what the raw HTML would show (below)
Even with that extended GSUB format, the font files are still quite small.
We spoke with Amsterdam design studio Seneda & Abrucio, founded by Isaque Seneda and Gabriel Abrucio, the team behind ShieldFont, and they told us that the document/desktop fonts that are ShieldFonted are only around 5 MB, while compressed web fonts that include the entire GSUB dictionary still only come in at around 800 KB - large for your average font, S&A explained, but still considerably smaller than the desktop version.
There’s more than one GSUB dictionary too - ShieldFont is shipping with three of them, and the GitHub repository explains how users can create their own to prevent reverse-engineering.
But why poison a few words instead of just scrambling text altogether? S&A told us that they want a deterrent to scraping by introducing uncertainty and chaos into training data, not just a way to get scrapers to ignore some pages.
“Pure scrambling fonts already existed,” the pair explained. “We wanted a mechanism with actual consequences: scrape without asking, and you can't tell if what you took was real. Concealment alone just gets you dropped and forgotten.”
The default font that ships with ShieldFont is a modified version of Optik from Copenhagen typography shop Playtype, who partnered with S&A on the project.
Like other scraping deterrents, it's not perfect
Speaking of reverse-engineering, ShieldFont isn’t perfect by a long shot. As the team notes in their white paper, it can be defeated with relative ease.
A screenshot of a page that’s run through OCR avoids the poisoned HTML, as does any other method that a scraper might use to scrape user-viewed pages instead of raw code. Targeted AI that downloads its own copy of ShieldFont and runs through all three GSUB dictionaries can also decode a page.
SheildFont could also impose an SEO penalty on people who use it, as search engines, like AI scrapers, read the raw HTML to look for content, as do translation apps and the copy/paste function built into computer operating systems. Screen readers used for those with visual impairment also have trouble with it too, though there is a feature built in to ensure screen readers can get the user-displayed text, albeit slowly.
“[ShieldFont’s] purpose is not to stop a determined actor, but to slow unauthorized mass scraping by adding cost, friction and uncertainty,” S&A said in a press release. “Scrapers cannot know in advance whether a site uses ShieldFont or which mapping it uses.”
As for whether ShieldFont is just an experiment or something S&A hope gets widely adopted, the pair told us it’s a bit of both.
“ShieldFont is real and working today, but it's v0/alpha, so still improving,” S&A explained.
“Longer term, it's a bet on collective pressure,” the ShieldFont designers added. “Nothing currently makes bypassing a publisher's requests costly. If enough sites make scraping expensive, scrapers have to change how they operate. That's the point where negotiation becomes possible.”
ShieldFont is now available to try. The online demo encoder can be used to generate protected HTML for embedding in a website, and it’s also available as a React component and for CSS and CDN integration, all of which is explained on the project’s GitHub page and the ShieldFont website. ®
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0
Comments (0)