I wanted to see if an AI (GPT-6) could hold a conversation with me while encoding our messages in a simple cipher. Could it decode my messages, encode its responses, and maintain a conversation while following a set of rules that made ordinary language almost unrecognisable?
The cipher worked by taking the UTF-16 code unit of each character, adding 13 to it, and then reversing the entire message. The messages looked a lot like this: qrq|p{r-rtnrz-ru-v-vu
I created a little JavaScript code to encode and decode the messages:
function cipher(message) {
return message.split("").map((x) => String.fromCharCode(x.charCodeAt(0)+13)).reverse().join("");
};
console.log(cipher("this is the message encoded"));
// "qrq|p{r-rtnrz-ru-v-vu"
function decipher(response) {
return response.split("").map((x) => String.fromCharCode(x.charCodeAt(0)-13)).reverse().join("");
};
console.log(decipher("qrq|prq-r{|}r-ru-v-vu"));
// "this is the response decoded"This experiment wasn't to have a secret or hidden conversation, or to try to build trust with the AI; after all, the cipher could easily be decoded if you knew the rules, which were at the start of the conversation.
ChatGPT was sure to remind me the chat was not private every time I mentioned the cipher... to the point that I felt I had to provide reassurance that this was just for fun and we were not doing anything wrong!
Instead, the experiment was to see if the AI could decode my messages, encode its responses, and continue applying the rules for a whole conversation.
How the conversation changed when using the cipher
Using the cipher affected how the AI communicated, including the length, quality, and complexity of its responses.
Shorter responses
I usually need to specifically ask AI for shorter responses if I need a quick answer. But with the cipher, I was lucky to get a complete sentence back.
On the surface, the AI should be able to send its usual responses and just encode them with a bit of code, like I was doing. And it did use a Python function to encode its messages, but I think using the cipher changed the AI's relationship with language.
AI is trained to work with language patterns. And maybe the cipher changes those patterns. I'm not sure why. The underlying message is the same once decoded, but the AI didn't seem as comfortable reasoning about the conversation when the text was encoded. Or maybe it couldn't get the flow of the conversation, because its memory and context work differently from a human's, and reading back through the previous messages isn't so easy when they are all r{r-rxnz-4{|q-nu-{rn}-q{n-y|oz-qvr-|{v-}-qrrz.
If I had to quickly glance back through the conversation, I certainly wouldn't have been able to make any sense of it.
The previous messages were still available in the conversation context, but the encoded text could have made their meaning harder for the AI to interpret, making it more difficult to maintain conversational context.
And maybe ChatGPT favoured short responses because maintaining the cipher was proving difficult, which showed up as typos.
Lots of mistakes
AI is normally really good at writing. It rarely makes mistakes like typos (in my experience). But once I added the cipher, not only was I lucky to get a complete sentence or two back, but I was even luckier if it didn't contain numerous typos.
Sometimes I really struggled to understand the response. I would often need to ask what a word meant because of a typo. And then AI wouldn't know that it had made that mistake in a previous response, unless I specifically mentioned that it had.
I'm not entirely sure why, but often one part of the message would appear before the next part, and then a bit more, and so on until it was finished. Maybe AI wasn't generating its response all in one go and then encoding it like I was? I don't know whether it was generating the English response first and then encoding it, or trying to generate the encoded response directly.
AI models generate text token by token. Normally, those tokens form familiar language patterns. But when instructed to communicate using my cipher, it had to generate unfamiliar character sequences while maintaining the meaning of the conversation. Perhaps when instructed to communicate by cipher, following the cipher rules rather than familiar spelling and word patterns made language generation less reliable?
And maybe the demands I was placing on ChatGPT to understand my incoming message, remember the cipher rules, and encode its response competed with the process of formulating and generating a response.
The question that made AI forget to use the cipher
L{v-x{vu-|-|q-rtnt{ny-nud-;rq|p-r{vupnz-q{n-9uv{n}`-9uvyt{R-rxvy-9rtnt{ny-{rrssvq-s|-|y-n-|{x-|f
Which, decoded, asks: "You know a lot of different languages, like English, Spanish, and machine code. What language do you think in?".
And AI replied, in English, reassuring me that it doesn't have any secret hidden language. It explained that, under the hood, it processes information through numerical representations and mathematical operations, rather than thinking in a human language. In a sense, a world of mathematical patterns rather than words.
Maybe that helps us understand why the AI was struggling to hold a conversation in the cipher. Maybe the AI isn't reasoning over the decoded version, but the encoded characters it received as input, and that would mess with the patterns.
But I now had a much more important question.
I replied with the only thing on my mind Lru}vp-ru-r-|-4{qvq-ud. If you're reading this article, I'm sure you have the same pressing question!
Why didn't you use the cipher?
And ChatGPT replied:
;|t|s-V
I forgot.
Why did AI forget to use the cipher?
Did it lose track of the instruction? Possibly, although when I replied in the cipher, it understood my message and remembered to respond correctly again. That suggests the instruction was still available, even if it hadn't followed it in the previous response.
Did the subject of the question somehow override the instruction governing how it should communicate?
I'm not sure. Maybe because I asked ChatGPT to explain something about its own operation. It wasn't a simple information exchange; it was a question about the AI itself.
The AI's explanation that it forgot might not be an accurate account of what is happening internally. Did it actually forget? Maybe it never lost the instruction, but simply generated a response that didn't comply with it.
AI doesn't necessarily remember things in the same way that humans do. But I think there are interesting human parallels.
Sometimes we can overlook things or forget what we are supposed to be doing because something more interesting, urgent, or distracting captures our attention.
I'm not suggesting that AI experiences distraction or forgetfulness in the same way as humans, but it also doesn't consistently follow an instruction in the same way we would expect a traditionally programmed computer system to.
Conventional code will generally execute the instructions it's been given, provided the conditions are met. My cipher() function isn't going to forget to encode a message it is given. Sure, it might fail through bugs or system errors, but it won't disregard an instruction because another response seems more appropriate.
AI, on the other hand, can appear to forget, overlook, or even abandon an instruction.
What does it mean when AI tells us it has forgotten something?
There are three different things here:
- Knowing an instruction
- Having access to an instruction
- Consistently following an instruction
There's an important difference between an AI knowing what it has been instructed to do and reliably doing what it has been instructed to do. Do we understand what is happening when an AI appears to remember, understand, or forget something?
If an AI can forget an instruction it was given only moments ago, what else might it be forgetting while we're talking to it?
And if we deploy AI in critical infrastructure, where important rules and instructions need to be followed consistently, can we really rely on the AI to remember them? Or do we need to build systems to ensure those rules are followed, regardless of what the AI says?