Yellow canary perched on stacked ceramic plates in a kitchen

Canaries all the way down: Following the trail of an AI safety metaphor

I recently tried to understand what went wrong with the defrosting freezers, you know the ones in France and elsewhere, and somebody sent me an article related to the topic. It was written in, for me, quite incomprehensible computer jargon. However, this passage jumped out at me: “Beyond the liberal use of strcpy(), Meijer criticized the absence of standard exploit mitigations, including stack canaries and position-independent executables.”

Hallelujah, there was a word I understood: Canaries! But what did it mean?

I asked Bluesky and got a good answer from LambdaDuck who pointed out that the canaries in question are similar to canaries in a coalmine – ah I thought, not only a word but a metaphor that I understood. We are talking about the little birds that warned miners of impending danger. Miners would carry caged canaries down into the tunnels with them. If dangerous gases, such as carbon monoxide, accumulated in the mine, the canary would pass out well before the human miners were affected, thus providing a warning to get out immediately. And nowadays, the phrase can be used metaphorically, as in “The Arctic has been called the canary in a coalmine when it comes to global warming” (Cambridge Dictionary).

LamdaDuck explained that in “IT security, the canary would be an early intrusion warning. The canary would be the first thing to fall when someone finds their way into your system and would also send an automated warning when it does so. It could be a honey pot, which is a system that pretends to be very vulnerable in order to tempt attackers into going after it, so they can be detected. In the specific case of ‘stack canary’, it’s a method for protecting against stack overflows. A stack overflow is when someone would write way more into memory than was intended, so it overwrites things. The canary would be the first thing that’s overwritten and would deliberately cause a crash.”

Oh dear, I thought, now we not only have canaries but also ‘honey pots’. But that was only the tip of the metaphor iceberg, as I found out a few days later.

Canaries, leaks and metaphors

On 20 November, I saw an article in Ars Technica by Dan Goodin entitled “Researcher plants 2m canaries into the AI supply chain. A privacy disaster surfaced”. It was quite understandable, which was good. BUT it overflowed, and I use that word judiciously, with metaphors; it was, haha, stacked with metaphors, including the canary. The article was based on a post by security researcher HD Moore for the cybersecurity firm Dragos, published on 19 November and entitled “Three breaches, endless leaks: Your AI supply chain needs canaries”. That too was full of metaphors.

What was it all about? To put it very simply: Researchers put two million “canaries” into popular AI services and tracked where they were stolen and abused. They found widespread “leakage” of sensitive data throughout AI services/supply chains. Here we have two central metaphors used when people discussed this research, but there are many more….

I read both articles, extracted the metaphors and sorted them roughly into groups and networks. What follows is not so much an analysis of the incident as an attempt to examine the main metaphors used in reporting on it. As in other posts about AI’s technical vocabulary, I want to make people aware not only of conventionalised metaphors of hype or critique, such as ‘co-pilot’ or ‘stochastic parrot’, but also of more hidden ones that reflect the structure and workings of AI itself. The post is also a study of the flexibility of metaphors: of how a little bird can be stretched to do jobs no miner ever asked of it.

I’ll focus here on the metaphorical aspects of canaries. When researching them, I was surprised to find how lexically productive the canary has become, as in ‘canary word sequences’, ‘stack canaries’, ‘canary tokens’, ‘canary strings’, ‘canary releases’ and ‘warrant canaries’. Each lexical combination gives the bird a slightly different job – but I won’t go into all of this here.

Instead, I’ll first dissect the canary, so to speak, then follow some leaking water courses, before ending up where it all started: trying to trace criminal activities.

The canary’s career

In AI safety talk, ‘canary’ seems to be quite routinely used to refer to early warning signs as models scale up. The first use in machine learning that I could find is a 2019 article by Carlini et al. entitled “The secret sharer: Evaluating and testing unintended memorization in neural networks”. It studied models memorising randomly chosen “canary word sequences” and it says in a footnote: “Canaries, as in ‘a canary in a coal mine.’” That seems to be the stable meaning: the canary as an early warning sign. But in the two articles that meaning got varied and stretched.

The original coal mine canary was a passive sentinel. It did nothing but drop dead, and its death meant: there is gas here; get out. But in various technical and AI contexts it changes its role and function.

The stack canary that set me off on my quest is still a sentinel. It is a value placed in a computer’s memory; if too much data spills over and overwrites it, the program deliberately crashes. The bird dies and the system is saved. The fridge controllers I started with didn’t have one, although, according to The Register article, switching them on “requires no engineering work at all”.

The canary tokens, which were used by Moore are something else: they are bait (and we’ll get back to that metaphor). You can get free ‘canarytokens’ from a site that “helps you discover you’ve been breached by having attackers announce themselves”. In the Dragos article, Moore writes that “our prompts were bait”, and that “Tokens started firing within days”. So the bird now goes off like a gun or a tripwire. Warning, trapping and weaponry all blend together. The wider IT and security vocabulary also contains ‘honeypots’, ‘honeytokens’ and ‘tripwires’. As one site explains: “Canary tokens and honeytokens are simple digital tripwires”. Canary is still a metaphor for almost anybody who reads the word in the context of AI, but it is entangled in a network of what for many AI experts are just jargon words.

Moore’s canaries are also forensic tracers. In Ars Technica, Goodin still explains the term canary (“so called because they resemble the role of that bird when taken into coal mines”) and then says the canaries let Moore (the initial researcher) “identify each link in the chain that was responsible”. A coal mine canary can’t do that; it only tells you that there is gas somewhere. By contrast, individually tagged items act as a forensic trace, pinpointing where a leak occurred and who had access to it. These canaries work more like ringed birds, marked banknotes or tracer dye. The metaphor of the canary is being asked to do more than its source domain can support.

And finally, these birds are planted or seeded – turning from animals into vegetables and from vegetables into booby traps. As Goodin says, Moore “plants 2m canaries” and “planted 2 million digital tripwires”; Moore “seeded each secret into exactly one prompt”. You plant birds, you plant tripwires, and, lo and behold, the seeds come up as ‘surfacing’ “secrets” (the 2019 paper itself borrowed its title from Joseph Conrad’s story The Secret Sharer). The metaphors are shaken and stirred, if you like. They are certainly mixed – in water!

Where the canaries swim

Interestingly, although the canary made it into the headlines of both Moore’s and Goodin’s articles, it is not their focus of metaphorical attention. That focus is water.

The Ars Technica headline is revealing. The article’s URL (the ‘slug’) still reads “a-leaky-ai-supply-chain-is-exposing-secret-user-data-at-an-alarming-rate”. The live headline, by contrast, is about planting canaries. This means that the headline was changed from a leak framing to a canary framing, and the slug kept the trace of the first version. One can actually see the newsroom choosing a frame and going for the more visual canary. But the leak framing persists underneath and flows through the article…..

Moore’s title promises “endless leaks”. In Goodin’s article, the AI ecosystem “leaked highly sensitive data like a sieve”; attackers “siphon prompts”; prompts sent to US providers “were flowing back to the lab” in China; models sit in “pools”, and users are advised to “pick upstream providers themselves”. Secrets “surfaced”, and so did “a privacy disaster”. Taken together, data flows downstream through pools and sieves, gets siphoned off and resurfaces somewhere unexpected. This is a veritable hydrology of prompts. This imagery is, by the way, everywhere in the field. The cybersecurity firm CrowdStrike, for example, calls data leakage AI’s “Plumbing Problem” and talks about “Plugging the Leaks”.

The original headline, a “leaky AI supply chain”, merges water with industry, making data a commodity and a liquid at the same time. And the chain, “the vast chain of widely used AI services” with its many links, turns out to be less a chain than a sieve. This is dangerous if users want to maintain some privacy.

Baiting, luring and thieving

What about canaries as ‘bait’ that I mentioned above? It seems that the researcher lure thieves with “bait keys”. Resellers (middlemen who sell on access to other companies’ AI models), in turn, “lure prompts to their servers” with low prices. It’s all about luring and trapping it seems, but too complicated for me. Then there is the standard crime vocabulary of breaches, thefts and adversaries, and the lock-and-key vocabulary of keys, tokens and credentials where metaphors are so dead that nobody notices them anymore. Here, though, the keys are fake ones, planted on purpose to catch thieves.

Overall then, in AI security, canary tokens or canaries often act as bait keys (alongside bait URLs, credentials, or files) planted in prompts, code, or systems to catch unauthorised access or data leaks.

Conclusion

What is this all about? It’s all about warnings. HD Moore did his research and then warned people about what’s going on inside AI systems. The research itself was about what types of warnings one can plant, and which warnings are heeded, by humans or machines, in a large network linking the two.

Lock and key, lures, traps, tripwires and honeypots: these metaphors fit a framing where we want to keep systems secure. To do that we install canaries as sentinels, but in the process the canary gets stretched from a warning bird in a coal mine into planted bait and a forensic tracer.

But systems are insecure not only because of thieves and intruders but also, and perhaps more importantly, because the systems themselves leak. In the past, real canaries warned miners of poisonous gas seeping into the tunnels; now digital canaries warn of leaking supply chains.

Will the canary become as ubiquitous as the parrot? I doubt it, but it’s worth following the birds, one living in the public and critical ecosystem, the other in the technical and safety ecosystem. They do quite different jobs, but it’s always good to know what they do, why and how.

Image: Yellow canary perching on a stack of dinner plates near a sink in a traditional kitchen (generated by WordPress’s AI)

Acknowledgement: I used Claude to explain the rather complex technical details to me. All core ideas and all remaining mistakes are mine.


Discover more from Making Science Public

Subscribe to get the latest posts sent to your email.


Posted

in

,

by

Comments

2 responses to “Canaries all the way down: Following the trail of an AI safety metaphor”

  1. bnerlich Avatar

    A reader of the blog, ‘Colonel Dare’, told me that this post brought to mind the sentinel in A C Clarke’s 2001 A Space Odyssey. He wrote:

    “I marvel at just how prescient it still is. Written in the 1960’s in collaboration with Stanley Kubrick, it builds on an earlier short story (The Sentinel – written in 1948) where a monolith is set on the moon to alert a higher civilization that a possible intruder (us) is awakening in this part of the galaxy.

    In the film (and better explained in the book) the AI (a HAL9000 computer which ‘has never been known to make a mistake or distort information‘) runs all the systems on the mission until conflicts between its training data and subsequent instructions lead it to the only logical solution: – Get rid of the humans.  I think 60 years after the film came out we are hearing similar worries being voiced today.

    I just hope that if and when the end of the world comes it is set to such a great sound track and the non-CGI graphics are just as impressive.  So let’s get the popcorn!”

  2. bnerlich Avatar

    Another reader said the following to me: “I am gobsmacked at what we have done to canaries. Perhaps the RSPB should be campaigning against ill-treatment of these innocent little birds. Or we should start talking about Fankencanaries, along with Frankenchickens and Frankenturkeys?”

Leave a Reply

Discover more from Making Science Public

Subscribe now to keep reading and get access to the full archive.

Continue reading