Borges and AI
Authors: Léon Bottou, Bernhard Schölkopf
Paper: https://arxiv.org/abs/2310.01425
Code: https://www.penguin.co.uk/authors/181249/jorge-luis-borges
A delight for fans of Borges and AI (bingo for me). The title of the work is an allusion to Borges' story about Borges, "Borges and I".
Today's understanding of LLM (and AI more broadly) is often viewed through the lens of images popularized by science fiction. Consider these familiar notions: Will a machine gain consciousness? Will it rise against us? Will we see a paperclip apocalypse? But first, we must ask, is this portrayal accurate for the phenomena we're dealing with? The authors of this study champion viewing LLM through the eyes of Jorge Luis Borges, offering a fresh perspective on the relationship between language modeling and artificial intelligence.
Imagine an infinite collection of all plausible texts (those that a human could read and at least superficially comprehend) ever created by humans. This can include books, dialogues, articles, prayers, web pages, computer programs, in any form and any language. Now imagine a long paper tape with a few initial words of a text. A device (perhaps a "Borges Machine?") scans this tape, finds some occurrence of this text in the infinite collection (a random one), selects a continuation word from it, and prints it on the tape following the previous words. This process then repeats, adding word after word. At any point, the sequence of words printed on the tape can also be found somewhere in this infinite collection, representing one of the plausible continuations of the initial set of words. The authors refer to this as a perfect language model.
Such a model can easily be converted into a chatbot. By introducing a specific keyword, analogous to the “Send” button in a messenger, communication can seamlessly shift between the model and a human.
Similar to "The Garden of Forking Paths" ("El jardín de senderos que se bifurcan"), every added text limits the story, characters, their roles, and ideas of the future. Yet, at the same time, it serves as a starting point for an endless sequence of branching paths. Here’s a good image from a different story:
While writing such a book might be an impossibility, one can conceptualize it similarly to how we imagine the number π, without noting down all its digits. Can a computer provide an approximation of this infinite garden of all possible texts in a similar fashion?
Collections inherently have an internal structure. Every text can be transformed into another text in numerous ways. One of the simplest transformations is word replacement; more complex ones include changes in tense, tone, renaming characters, or rewriting a text from another character's viewpoint, etc.
Linguist Zellig Harris believed that all sentences in English can be generated from a small number of basic forms using a series of clearly defined transformations. Training a Large Language Model (LLM) can be understood as analyzing a vast text corpus and discovering these transformations and base forms simultaneously. Interestingly, the first truly successful neural network in this area was named the "Transformer." Perhaps new training methods will be found that better approximate the perfect language model.
A machine is limited by what is already written on its 'tape.' The machine can continue the text by borrowing facts from training data (which may not necessarily be true) and generating suitable fabrications (which aren't necessarily false). What is commonly referred to as "hallucinations" would be better termed "confabulations" (source).
In other words, the perfect language model is a machine that writes fiction (a fiction machine), and this perspective should guide our attempts to understand its impact on us. The stories of Borges can help in this regard.
In the "Library of Babel", the Library contains all possible books with 410 pages and an alphabet of 25 symbols. These potentially include all texts ever created (and those not created) by humanity, including a vast amount of nonsense.
“the detailed history of the future, the autobiographies of the archangels, the faithful catalogue of the Library, thousands and thousands of false catalogues, the proof of the falsity of those false catalogues, the proof of the falsity of the true catalogue, the gnostic gospel of Basilides, the commentary upon that gospel, the commentary on the commentary on that gospel, the true story of your death, the translation of every book into every language”
It all seems like the outputs of language models. A perfect language model allows us to navigate the Library by feeding initial words of the text into the model. However, distinguishing truth from falsehood, the useful from the misleading, and right from wrong, is challenging. Librarians have vainly attempted to do this.
Believing a Large Language Model (LLM) to be a true AI with encyclopedic knowledge and impeccable logic is an illusion; in reality, it's more of a fiction-generating machine. Neither truth nor intent matters for such a machine – only the demands of the narrative do.
In the story, besides Librarians, Purifiers are mentioned who destroy meaningless books. This mirrors attempts to limit LLM outputs, preventing them from generating harmful ideas or anything irrelevant. Many such efforts are being made nowadays using prompts, fine-tuning, or RLHF (Reinforcement Learning from Human Feedback). But people still successfully game it by creating a more elaborate narrative (hello, jailbreak). More effective "alignment" methods might require constant monitoring of models and guiding their outputs in the desired direction.
However,
“Far worse than a privacy invasion, in a future where almost everyone uses language models to enrich their thinking, a power over what language models write becomes a power over what we think. Can such a formidable power exist without being misused?”
Many fear these fiction machines as an all-knowing intellect that could outlive us. But an even darker temptation might be the desire to "surrender" all our thoughts to this modern-day Oracle, which can be manipulated by others.
“If we persistently mistake the fiction machine for an artificial intelligence that can spare us the burden of thinking, the endless chatter of the language models will make us as insane as the struggling Librarians.”
These fiction machines, with their narratives, can enrich our lives. They can help us reinterpret the past, understand the present, and grasp the future. We might need more grounded verification machines to check the generated stories against the cold reality. Whether these will be separate machines, some combined version, or alignment techniques that can transform one into the other remains an open question.
“The invention of a machine that can not only write stories but also all their variations is thus a significant milestone in human history. It has been likened to the invention of the printing press. A more apt comparison might be what emerged to shape mankind long before printing or writing, before even the cave paintings: the art of storytelling.”
In conclusion, the text you've read might not be an exact recap of the article but rather my continuation of the given narrative. So, perhaps, it's worth reading the original article as well.
Lastly, for those interested, here's the implementation of the Library of Babel on the Internet.
And a story about the creation of this project: Putting Borges' Infinite Library on the Internet