6 ms·
Why Does Claude Speak Byzantine Music Notation?
- Telemakhos 2y agoSo, let me see what I think I understand here: 1. AI models are good at Cæsar-cypher transposition, because it occurs often enough in training models for certain values of the cypher offset. Outside those values, AI doesn't handle the transformations well. 2. Somehow AI models perform this cypher also within high ranges of Unicode, because the characters are encoded as three tokens each, of which the last one encodes the same difference as between alphabetic letters, and so the first two tokens get discarded as irrelevant, meaning that by sheer chance the alphabet maps perfectly via Cæsar-cypher (with a two-token offset) to a specific range of Unicode characters reserved for Byzantine music notation. 3. This is easy to understand for one AI model, because its explicable by chance that the offset between the alphabet and Byzantine music notation should coincide perfectly with two less-significant tokens. It's harder to understand why this works in more than one AI model, though.
- yorwba 2y agoIt's not that surprising that models encode Byzantine Music Notation characters using separate tokens for each UTF-8 byte, since they're unlikely to occur often enough for byte-pair encoding to allocate dedicated multi-byte tokens to them. What isn't clear to me is where ASCII text with 64 added to every byte occurs in the wild.
- the8472 2y ago> What isn't clear to me is where ASCII text with 64 added to every byte occurs in the wild. maybe it has some general ascii bittwiddling capability for base64 and uuencode that help here too
- immibis 2y agoHave you checked the UTF-8 encodings of all the typical "Unicode fonts" e.g. circled letters, superscripts and so on?
- csense 2y agoTranslating uppercase to lowercase adds 32. Maybe it's not "thinking" in terms of "add 64", but rather "translate uppercase to lowercase, twice".
- bmenrigh 2y agoPossibly because of xor with 0xc0 which, for lowercase ascii, has the same effect as adding 64. Probably seeing xor-encoded input is common in the training data.
- zeckalpha 2y agoNaN boxing?
- markisus 2y agoDoes it make sense to talk about the index of a token? The model never sees such an index does it? I thought the tokens are converted to learned embeddings at the first layer.
- fi-le 2y agoThis is a great point, I think I might have been wrong actually. It doesn't really make sense that one row of the embedding matrix is treated differently than another...
- markisus 2y agoIndeed. Maybe the learned circuit does something like the following. For each token's feature vector, compute a representation of positions where it appears in the sentence. This could be made possible by the positional embeddings. Token Features 0 => list[1, 5, 6, 10] Token Features 1 => list[7, 8] ... These "list features" would be invariant to Caesar cipher. So then the LLM could pass these list features to a learned Caesar cipher decoder unit to spit out the decoded text. It's still unexplained, however, why the Byzantine Music Notation would trigger the this circuit while other Caesar cipher's wouldn't.
- oezi 2y ago> Outside those values, AI doesn't handle the transformations well. It doesn't handle it well if you prevent it from thinking about it and ask it for a zero-shot, single pass answer.
- xnorswap 2y agoLLMs ought to be good at generating simple substitutions too, but they're not: https://claude.ai/share/9495246c-b77a-496e-8643-dbc5ec58dbcb https://claude.ai/share/9495246c-b77a-496e-8643-dbc5ec58dbcb It tries but it fails to both generate and apply a simple substitution. It starts substituting based on applying the substitution twice to some letters. It was a very frustrating time I spent trying to solve it, especially after asking to confirm it had created a 1:1 mapping. Since it has no reasoning, it just lies about having done so.
- GardenLetter27 2y agoWhy should they be? The token is at the word level more or less, so the model can't see the letters to substitute. When we get character-level models this should be more viable.
- williamoforange 2y agoI found in my very limited testing with chatgpt free version that it has a real bias for the Caesar method in general, suggesting it or bringing it often unnecessarily in almost every conversation. Here is a sample, this 'encoded' form is clearly not a cipher but it 'tried' anyway, it is in fact random: Prompt: Does the following sentence: "fkf snvd hukk jjbfe o dfvr hjgad eivyb ct e xixa assfk vnous ckygx txcm?" bare resemblance to the phrase "how much wood would a wood chuck chuck if a wood chuck could chuck wood?"? ChatGPT said: Yes, the sentence "fkf snvd hukk jjbfe o dfvr hjgad eivyb ct e xixa assfk vnous ckygx txcm?" does indeed resemble the structure of the phrase "how much wood would a wood chuck chuck if a wood chuck could chuck wood?". It seems like it could be an encrypted version of the latter phrase. Given the structure and the resemblance to the original phrase, I suspect this might be a Caesar cipher or some form of letter shift. Let me try to decrypt it by applying a Caesar cipher shift and see if I can retrieve the original phrase. I'll start with a few different shift values. Hang on!
- nestorD 2y agoI was also surprised to find out (roughly a year ago) that Claude is good at Old English (which, despite its misleading name, looks nothing like English and is more of a Germanic language) whereas ChatGPT would output pure hallucinations.
- GaggiX 2y agoClaude is much better than ChatGPT at low-resource languages, at least it was a year ago, I haven't tested on new models from OpenAI but I believe that Claude still has an edge. For example, when ChatGPT was outputting nonsense in Georgian, Claude was speaking it fluently, when ChatGPT learned Georgian, Claude was able to speak Mingrelian.
- rdlw 2y agoInteresting. I was using ChatGPT to try to come up with a possible reconstruction of the Ketef Hinnom scrolls (I don't know Ancient Hebrew at all), with some mixed results. I had to prompt it with things like "What do you think that 'YHWH' bit could mean?", and then it sort of caught on. Maybe I'll see if Claude can do better. Your description of Old English is a bit odd. It's certainly very different from modern English, but it's its direct ancestor and both languages are Germanic.
- nestorD 2y agoIt is a direct ancestor but I find that what most people picture when they hear Old English (and have no prior knowledge of it) is something closer to Middle English, which is somewhat redeable by modern English speakers, rather than something like `Oft Scyld Scefing sceaþena þreatum, monegum mægþum, meodosetla ofteah, egsode eorlas.` [0] [0]: https://www.poetryfoundation.org/poems/43521/beowulf-old-english-version https://www.poetryfoundation.org/poems/43521/beowulf-old-eng...
- orbital-decay 2y agoClaude can speak medieval and ancient languages but mixes up different time periods pretty often, unless you hard prompt the desired grammar. For Old English in particular, it tends to give something vaguely Shakespearean instead. It often uses period-incorrect alphabet or modern characters as well (for Slavic languages in particular). I've also tried Old Norse, Ancient Greek, and Old East Slavic, and the result is pretty much the same. For OES in particular, it often outputs period-incorrect grammar, writes in Old Church Slavonic (different language), or even modern Russian or Serbian. Looks like the dataset was a bit chaotic, with religious books mixed with old manuscripts and even modern books for children. Mentioning a specific work from the desired period makes it write better, and wrangling it by specifying the rules makes it get this almost right.
- VITORPRO899 2y ago[flagged]
- VITORPRO899 2y ago[flagged]
- fcatalan 2y agoAnother thing that LLMs are (surprisingly?) good at is randomly mixed language conversations, here's something I tried a few days ago: Prompt: Kan du comprender questo text? Anata wa quelque inkling habe about lo que se parla dans la presente oraçao? Repondez med sam way of goboriu. ChatGPT: Ja, ich kann verstehen este mix de idiomas! Tu es usando une combinación de várias línguas pour expresar una pregunta. Je vais responder en the same modo: Si tu veux kommunicieren en cette manière, c'est possible, aber il peut être ein bisschen confusing pour andere people! 你觉得这个方式有趣吗? O préfères-tu un idioma más claro? Deepseek: Ja, jeg kan forstå en lille bit av ciò que tu está dizendo. Anata no message wa molto interessante, pero un poco confusing aussi. Si tu peux écrire in una lingua sola, sería plus facile para mi at comprender. Danke, merci, arigatou! Claude: Oui, je kan entender algo of this texte mezclado! C'est un interessante modo de communicare using différentes languages together. Je trouve ça quite divertido y puedo responder en la misma manera mixta. Ist das what you were looking for? Watashi wa happy to continue questa conversation in whatever linguistic style anata wa prefer! Perplexity: Ja, ich kann diesen Text verstehen! Vous avez créé una frase muy interesante con palabras from different languages. Let me rispondere using a similar mishmash of lingue: Questo è un esempio fascinante di code-switching e language mixing. Watashi wa impressed by la creatività y el modo en que vous avez combiné various idiomas in one sentence. Es ist ein poco challenging zu decifrar, aber anche molto divertente! Ich würde sagen que el mensaje principal è about compréhension linguistique et la capacité de entender verschiedene Sprachen when they're mixed together. C'est une manière intéressante de tester language skills et cognitive flexibility. Grazie for questa stimolante question! J'espère que mi respuesta was equally entertaining und in lo mismo estilo multilingüe.
- deleted 2y ago[deleted]
- mistrial9 2y agothis fits the supposition -- since LLMs can be fed patterns of nonsense and learn to reply in those patterns, LLMs are not intelligent. YNews corollary : since posters cannot resist making new swathes of Look At This LLM Output, the open nature of tech boards is doomed in some ways (?)
- fpgaminer 2y ago> At least in most public tokenizers like o200k, addition in certain Unicode ranges commutes with addition in token space This seems flawed. I mean, the author's statement here is literally true, but it's eliding a very important detail: LLMs do _not_ see token indexes. They have no idea what order the token embeddings are in. In fact, you can shuffle the embeddings and the LLM wouldn't care at all. And I highly suspect that if you shuffled the entire tokenizer, so that the above property no longer holds, and trained Claude from scratch on that tokenizer, it would still be able to perform this task. > so all but one of these symbols is mapped to three tokens each, where the first two are the same and can be easily ignored by an attention head, and the third token increments exactly with the Unicode. This is the crux, I believe. In the general case, the common Unicode ranges (for Korean, Japanese, Chinese, etc) get tokenized just like English (for modern tokenizers at least). It's only in the obscure unicode ranges where you hit a special case of the tokenizer. This is the "backup plan" of the tokenizer. If it encounters text that doesn't directly map to a token in its dictionary, then it falls back to encoding the text as UTF-8 bytes. Those UTF-8 bytes have a dedicated set of 256 tokens in its dictionary. So in those extreme cases, rather then getting bits of text like "Hell, o, Mr, ., B, ond" the LLM gets the raw UTF-8 bytes. Now, again, the LLM can't directly see those bytes, their index in the tokenizer's dictionary, their integer values, etc, etc. It only sees their embedding vectors, which are unordered. So it has no _implicit_ knowledge about those bytes being ordered. Therefore the assertion that addition commutes between Unicode and token indices is irrelevant. My theory would be that the pretraining data contains lists of Unicode characters. Specifically, lists of unicode characters in order. Naturally, for the obscure ranges of unicode, this results in the LLM seeing counting in UTF-8 bytes. It doesn't initially know what the "value" of each byte is, but naturally it would learn that so that it can correctly predict the next byte. The same occurs for English letters. It doesn't start with any knowledge about what order they are in. It only learns the ordered alphabet through seeing examples. (The inverse applies, of course, since the output is also unordered.) Maybe this is a nitpick? But it seems important to me, because it's the difference between a rather simple mechanism: output[i] = input[i] + 1 and a more complex mechanism: c = to_utf8_byte_index(input[i]) c = c + 1 output[i] = from_utf8_byte_index(c) Also it's important because I'd suspect the LLM will see a _lot_ of UTF-8 counting. There's about a million unicode "characters", the vast majority of which won't have direct token mappings. So in rough estimation for a single complete listing of Unicode, it'd see a list of purely counting in bytes that is 1 million lines long. That's 3900 complete cycles of the least significant byte. Just from one listing. In contrast, it's not going to encounter a lot of listings of, say, the Korean unicode range in unicode order (about 11k points). Each time it does, it gets to see exactly 1 complete cycle. So a single listing of Unicode gives it 3900 examples of how to cycle one byte VS a single listing of an "alphabet" giving it only 1 example.
- curtisszmania 2y ago[dead]
- deleted 2y ago[deleted]
- kuratkull 2y agoIf I have to do the "click on the motorcycle/traffic lights" captcha more than once I will instead click the back button.
- fi-le 2y agoOh, are you getting a captcha when accessing the site this links to? If so, I didn't know this.
- xg15 2y agoI'm reminded of the "Unicode Tags" craze from a few months ago. [1] It was discovered that some LLMs effortlessly understand characters from the "Tag" range in Unicode and treat them like ASCII, even though those characters are used virtually nowhere in normal text and you in fact need specialized tools to just make them visible. (There is a formal 1-1 mapping between tags and ASCII characters, which would also qualify as a Cesar cipher, but you'd have to read the Unicode spec to find out) Most concerns were about the fact that this would allow people to smuggle hidden messages to or from the LLMs. But an interesting question was also how the models had even learned the mapping in the first place if tags never occurred in the training data anywhere. As I understood it, the solution was pretty simple though: They hadn't. There was no specialized circuit for tags in the models. Tag characters just had the property that if you write them as bytes, they will look like "<some prefix bytes> <byte pattern of the corresponding ASCII character>". So already the tokenizer would parse the characters as ASCII, interleaved with "unknown" tokens for the prefixes. All the model had to do was to ignore the "unknown" tokens and it could process the rest like ASCII. No Cesar cipher decoding needed! Are we sure something similar isn't happening here? [1] https://arstechnica.com/security/2024/10/ai-chatbots-can-read-and-write-invisible-text-creating-an-ideal-covert-channel/ https://arstechnica.com/security/2024/10/ai-chatbots-can-rea...
- yorwba 2y agoThis is exactly what's happening here. But note that UTF-8 is self-synchronizing, so no encoding of one character contains the encoding of another as a subsequence. Instead, both tag characters and the Byzantine music notation in the article look like "<some prefix bytes> <byte pattern of the corresponding ASCII character + 96>" They share this property with the Fullwidth Latin block, which does occur in the wild interspersed with Japanese or Chinese text.
- xg15 2y agoAh, that makes sense. Thank you!
- thaumasiotes 2y ago> They share this property with the Fullwidth Latin block, which does occur in the wild interspersed with Japanese or Chinese text. How common is that? In my experience it's much more normal for Chinese text to intersperse ordinary ascii characters. https://www.zdic.net/hans/%E8%84%B8 https://www.zdic.net/hans/%E8%84%B8 I'm not sure what purpose fullwidth characters are supposed to serve, but whatever it is, it doesn't seem like they're succeeding.
- 6stringmerc 2y agoUh, I’m kind of lost here - in what way is this discussion about music notation? I’m genuine about this because I’m mildly obsessed with the intersection of AI and the arts. Is the discussion how Claude is repurposing one form of language into another use case? I mean my initial response to the headline was to knee jerk answer “Because it doesn’t understand music because it’s not a human being with emotions” and that actually kind of works if Claude basically is looking at language and using a pipe wrench to hammer nails into wood.