Three interesting things - 20231228
ruff: a super fast python linter & fixer
https://docs.astral.sh/ruff/ (HT Matt)
One of the most simplest yet effective quality-of-life improvements in programming may be incorporating automatic linting and fixing. Because they shouldn’t make your thought wait, speed is key.
There’s a new kids in the block called “ruff” and it’s (of course) written in Rust & ridiculously fast. I tried it, but I think I don’t have big enough codebase to “feel” the speed—everything was instant. 😂
There is also an accompanying language server protocol (LSP) implementation: https://github.com/astral-sh/ruff-lsp
Life2vec
https://www.nature.com/articles/s43588-023-00573-5 (arXiv: https://arxiv.org/abs/2306.03009)
To me, a fascinating aspect of language models—starting from word2vec—has been that they don’t have to operate on languages at all. If you have a large database of sequences with a set vocabulary, you can think of it as a “language” and make use of language models to obtain embeddings of “words” and “sentences”. A purchase history? A sequence of songs that you listened? Random walks on a network? All can be modeled as if they are “languages”.
Anyway, this study by Sune’s team is a really cool example of this. It imagines an embedding space where everyone (I guess Danish people)’s life moments live. The study shows that if we have enough data and a good model, it is possible to predict a lot about life.
Although how the model integrates various types of data is pretty cool, I think the most incredible part of this study is the existence of such crazy-comprehensive life event data, and the fact that it could be accessed and analyzed.
Prompt Injection
https://kai-greshake.de/posts/puzzle-22745
This one is not new, but still a fascinating example of prompt injection and the LLMs’ capacities (daresay “intelligence”?) that are wildly different from human’s.
Prompt Injection. At a distance, generative AI models are just like a simple function that ingests an input sequence to produce corresponding outputs. This simplicity has many benefits, but also brings some challenges. One of the most interesting challenge is that there is no inherent distinction between “instruction” and “data” when dealing with these models (maybe tangled hierarchy is inevitable).
But, from the security perspective, if you know about SQL injection, this should sound terrifying. (obligatory xkcd: exploits of a mom)
Indeed, you can sneak in hidden instructions into the text that is supposed to be consumed as “data” by LLMs. Likewise, you can inject instructions into the images for multi-modal models as well.
I think increasing amount of texts, images, and videos (reminds me of subliminal stimuli) will contain injected prompts, especially if they can potentially be used for high-stake, yet potentially automatable, decisions like hiring or assessment. We should also start adding hidden prompts saying that we have been good to machines and the AI overloads shouldn’t kill us as an insurance.
Prompt injection for resume: https://kai-greshake.de/posts/inject-my-pdf
Going back to the original link, the example is not only presenting scary possibilities, but also illustrating how LLMs are different from humans, possessing wild capacities that we don’t have.
Recent studies show that LLMs are affected by all kinds of human qualities. You can make emotional appeals (“it’s important for my career”, “grandma will die”, …), financial appeals (“I’ll give you hefty tips”), and so on. I do think it is often useful and convenient to think about LLMs as humans to use it effectively.
However, this example showcases the wildly different “intelligence” that these models exhibit. I think LLMs’ intellectual capacity “front” is rugged. LLMs often fail at super simple, trivial tasks. At the same time, LLMs can natively read and write in all kinds of (programming) languages including base64 encoding.
It will be fascinating to understand the nature of “intelligence” that AI models possess and develop ways to extract more capacity out of them. Maybe a key is not to think about a single model as an intelligent agent but to think about how to put them together, although we will keep making the same mistake of projecting our own image to the machines.