Taming AI Bots: Controllability of Neural States in Large Language Models

Stefano Soatto, Paulo Tabuada, Pratik Chaudhari, Tian Yu Liu, Matteo Marchi, Rahul Ramesh · Submission to ICLR 2024 · Rejected

Abstract

We tackle the question of whether an agent can, by suitable choice of prompts, control an AI bot to any state. We view large language models (LLMs) and their corresponding conversational interfaces (AI bots) as discrete-time dynamical systems evolving in the embedding space of (sub-)word tokens, where they are trivially controllable. However, we are not interested in controlling AI Bots to produce individual words but rather sequences, or sentences, that convey certain ''meanings''. To tackle the question of controllability in the space of meanings, we first describe how meanings are represented in an LLM: after pre-training, the LLM is a deterministic map from incomplete sequences of discrete tokens to an inner product space of discriminant vectors (''embeddings'') of the next token; after fine-tuning and reinforcement, the same LLM maps complete sequences to a vector space. Since no token follows the special end-of-sequence token during pre-training, that vector space can be co-opted to represent meanings and align them with human supervision during fine-tuning. Accordingly, ''meanings'' in trained LLMs can be viewed simply as equivalence classes of complete trajectories of tokens. Although rudimentary, this characterization of meanings is compatible with so-called deflationary theories in epistemology. More importantly, defining meanings as equivalence classes of sentences allows us to frame the key question as determining the controllability of a dynamical system evolving in the quotient space of discrete trajectories induced by the model itself, a problem that to the best of our knowledge has never been tackled before. To do so, we characterize a ``well trained LLM'' through conditions that are largely met by today's LLMs and show that, when restricted to the space of meanings, a well-trained AI bot is controllable under verifiable conditions. More precisely, we introduce a functional characterization of AI bots, and derive necessary and sufficient conditions for controllability. The fact that AI bots are controllable means that they can be designed to counteract adverse actions and avoid reaching undesirable states before their boundary is crossed.
BibTeX
@misc{soatto2023taming,
  author = {Stefano Soatto and Paulo Tabuada and Pratik Chaudhari and Tian Yu Liu and Matteo Marchi and Rahul Ramesh},
  title = {{Taming AI Bots: Controllability of Neural States in Large Language Models}},
  year = {2023},
  eprint = {2305.18449},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.18449},
}
Figure