Interacting Large Language Model Agents. Interpretable Models and Social Learning

Adit Jain, Vikram KrishnamurthyarXiv 2024

TL;DR

This paper bridges microeconomics and statistical signal processing to model interacting Large Language Model Agents (LLMAs) as boundedly rational Bayesian decision-makers. The authors mathematically prove that sequential interactions among LLMAs inevitably lead to information cascades ("herding")—providing a rigorous explanation for phenomena like model collapse—and introduce a stochastic control framework to optimally delay this herding to improve state estimation accuracy.

What Problem Does This Paper Address?

As Large Language Model Agents (LLMAs) are increasingly deployed in autonomous pipelines (e.g., customer service, financial trading, content moderation), they constantly interact with content generated by other AI agents. When these agents make decisions sequentially, they learn from both external data and the public actions of their predecessors.

A major challenge in these multi-agent systems is herding behavior (or information cascades). When an agent's public confidence or action history becomes sufficiently strong, subsequent agents begin to blindly copy previous actions, completely ignoring their own private data inputs. In AI systems, this manifests as systemic bias, financial bubbles, or "model collapse" (where generative models degrade after being trained on AI-generated data). This paper provides a mathematically rigorous, interpretable framework to diagnose why LLMAs herd and how engineers can systematically delay this behavior to ensure reliable, trustworthy decision-making.

Methods

The authors break down their engineering framework into three distinct levels of abstraction:

  1. LLMA Architecture as a Social Sensor: Instead of treating LLMs as complete black boxes, they model an LLMA as a two-part system: an LLM that maps high-dimensional text inputs into low-dimensional, interpretable structured features (acting as a sensor), and a Bayesian engine that updates beliefs and selects optimal actions based on those features.
  2. Microeconomic Modeling (RIBUM): The paper proves that an individual LLMA acts as a Rationally Inattentive Bayesian Utility Maximizer (RIBUM). There is a deep parallel here: just as human decision-makers balance cognitive processing costs against accuracy, an LLM's self-attention mechanism optimizes token prediction under constrained context windows. Using Bayesian Revealed Preferences (akin to inverse reinforcement learning), the authors introduce algorithms to reconstruct an agent's hidden utility function and information processing costs solely from black-box observations.
  3. Stochastic Control Framework: To mitigate herding, the authors formulate an optimal stopping Partially Observed Markov Decision Process (POMDP). They prove that under mild submodularity conditions, the optimal policy has a clean threshold structure. They then propose a model-free policy gradient algorithm (Algorithm 7) using simultaneous perturbation to learn the optimal threshold parameters without needing explicit access to the system's internal probability distributions.
FIGURE 2: Engineering with large language model agents (LLMAs): We propose engineering with LLMs on three different levels: a) First, we construct LLMAs with an LLM attached to the Bayesian engine. The LLM acts as a sensor for the text input and outputs interpretable low-dimensional outputs, which are used by the Bayesian engine to produce a state estimate. b) Second, we formulate necessary and sufficient conditions for a LLMAs to be a rationally inattentive Bayesian utility maximizer (RIBUM). We also present algorithms to reconstruct feasible utilities and rational inattention costs if the LLMA is indeed a RIBUM, attributing the LLMA with an interpretable microeconomic model. c) Finally, we demonstrate how a sequence of LLMAs can efficiently perform sequential Bayesian social learning by controlling their outputs to delay herding optimally. Our Bayesian social learning models can be extended to study Bayesian social learning in a network of LLMAs.

Datasets

The methodologies were validated using three real-world datasets:

  • Measuring Hate Speech Dataset: Comprising 40,000 annotated comments from Twitter, Reddit, and Gab, utilized to evaluate a sequential hate-speech peddler identification task.
  • Amazon Review Dataset: Used for product quality identification, sampling 5,000 reviews from the Beauty and Electronics categories.
  • FNSPID (Financial News and Stock Price Integration Dataset): Used to demonstrate how an LLMA can extract interpretable binary features from financial news streams (e.g., news surrounding AAPL stock) to update market sentiment beliefs.

Key Insights and Ideas

  • The Attention Parallel: The core "aha moment" is that transformer self-attention is mathematically analogous to "rational inattention" in behavioral economics. Both represent an efficient allocation problem: optimizing performance while penalizing the "cost" of processing massive data streams.
  • Herding is Inevitable: The authors prove that whether LLMAs share no private observations or a finite number of them, sequential social learning always results in an information cascade in finite time. This provides a clean social-learning explanation for why recursive training causes model collapse.
  • Data Incest via Asynchrony: In naive asynchronous data fusion setups (where agents broadcast updates without coordination), agents suffer from "data incest"—double-counting information because they fail to realize a received prior already incorporated their own past observations.

Key Results

  • Utility Reconstruction: Using Algorithm 2 (max-margin utility reconstruction), the authors successfully mapped out the hidden utility matrices of off-the-shelf models like ChatGPT-4o-mini and LLaMA-3, proving that black-box agent behaviors can be rendered interpretable.
  • Vulnerability to Skewed Priors: In the hate-speech classification simulation, if the initial public prior was slightly skewed toward a non-hateful state ($\pi_0 \ge 0.41$), the LLMAs consistently herded to the wrong decision within a few steps, completely disregarding highly toxic text inputs.
  • Effective Control Convergence: The proposed policy gradient algorithm successfully converged to the optimal threshold range within 100 iterations. This allowed a central controller to optimally balance the trade-off between paying for more private data (incentives) and maintaining high state-estimation accuracy.

Limitations and Future Work

While powerful, the framework possesses a few notable limitations:

  • Dimensionality Scaling: The Bayesian revealed preference framework becomes computationally infeasible when dealing with massive state and action spaces.
  • Single-State Focus: The current stochastic control formulation is strictly optimized for detecting a single critical "failure state" (e.g., identifying a bad product or a toxic user) rather than complex, multi-state environments.
  • Empirical Posteriors: The math assumes access to the true action posterior, whereas real-world applications must rely on empirical approximations from finite samples.

Future Directions: The authors suggest extending this work to complex network topologies (beyond line graphs), integrating Retrieval-Augmented Generation (RAG) frameworks, and modeling human-in-the-loop interactions where AI agents dynamically learn from human feedback.

Summary updated

BibTeX
@misc{jain2024interacting,
  author = {Adit Jain and Vikram Krishnamurthy},
  title = {{Interacting Large Language Model Agents. Interpretable Models and Social Learning}},
  year = {2024},
  eprint = {2411.01271},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.01271},
}
Figure