Next-Token Prediction and Regret Minimization
Abstract
Lay Summary
Next-token predictors are trained to predict the next item in a sequence, such as the next word in a sentence or the next event in a stream of data. These predictions are increasingly used to support decisions, but a model that predicts well on typical data may behave poorly when the environment is adversarial or strategically chosen. This paper asks whether next-token prediction models can be modified so that decision makers using their predictions also perform well in adversarial online settings. We show that, when the model can use the full past history, any next-token predictor can be changed by only a negligible amount so that it leads to low-regret decisions. However, when the model has a limited context window, as many transformer-based models do, such a modification is sometimes impossible without increasing the context length. We also show that the proposed modification can be implemented by standard transformer layers and that small transformers can learn these robustified behaviors in experiments. Overall, the paper clarifies when predictive AI models can be safely used for sequential decision making in adversarial environments.