How agentic AI models could (finally) open the door for agent-based modeling in economics

Everyone loves a trilogy, so let’s wrap this up. I told you why agent-based modeling never broke through in economic research. I told you how it could eventually matter. Now I’m going to tell you how AI could, and maybe should, actually make it happen. And as someone who is not fully “AI-pilled”, I will confess that there aren’t that many avenues in which I am particularly excited about AI contributions, particularly in the arts, and even where I see opportunities for great things, I remain pessimistic that Gresham’s Law is going to hit us hard and fast while we are still learning to culturally and institutionally separate the wheat from the slop-riddled chaff.

But let’s put on our more optimistic glasses for the moment and think through what the opportunity for AI to guide agent-based economic modeling into a new (and first) golden age.

First, let’s define a few terms. When I refer to Agentic AI I am specifically considering an LLM model that is capable of autonomously pursuing goals, taking actions, and adapting their behavior in response to new information, all based on a set of pre-defined rules and reward functions and with little to no need for continuing human instruction. When I refer to an Agent-Based Model (ABM) I referring to a computational model of an economic or social system in which individual, heterogeneous agents (consumers, firms, workers, etc) make decisions according to specified behavioral rules, interact with one another and their environment, and collectively generate aggregate economic outcomes.

I don’t want to be wholly redundant with my previous posts, but it’s important to revisit a key theme that ran through both posts: the greatest strength of agent-based modeling is it’s ability to accomodate incredible depth of individual and institutional heterogeneity. Which is a nice way of saying that it is parameter rich. Which is itself a nice way of saying that the models can generate any result without the prospect of credibly investigating the mechanism behind those results and, more importantly, suffiently culling enough noise from them to learn anything about how the world works. For those less familiar with the curse of dimensionality, let me explain.

If a model has 2 parameters you can simply run a grid search of every possible combination of those parameters and observe what kind of outcomes are generated. If you had an agent-based model with 100,000 agents randomly interacting you could still investigate the parameter space by “running” the model 1000 times for each possible combination of parameters and look at the full distribution of outcomes, reporting the mean, variance, and individual quantiles of every outcome of interest for each combination in your grid of parameters. Your results might look like this:

This is a useful way to design and investigate an agent-based model. But you probably already see the problem. Sure, toy models with two parameters are cute, but how do I answer complex economic questions? Toy models can only take us so far. And that’s the rub.

Once you start really start trying to advance economic theory of large, complex economic systems with an agent-based model you’re going to have a lot of visible parameters and lot more less visible parameters. An ABM will be composed of:

  1. Agents (people)
  2. Collectives of agents (firms, clubs, mosques, families, states)
  3. Rules for agent decision-making
  4. Rules for collective decision-making
  5. A context, network, and/or phystical environment with it’s own rules

Every single item on that list will in turn have attributes with both

  1. Initial conditions
  2. Distributional characteristics of those inititial conditions i.e. mean, variance, etc
  3. Are they fixed, exogenously varied, or endogenously varied over time?

Take the first list and add up the total agents, collectives, rules, etc. Then multiply those by each other and by every decision that has to be made in the second list. That number will likley be in the thousands. Congrats, that’s how many true model parameters you have.

With modern macroeconomics, and I am speaking here as a non-macroeconomist, your goal is to reduce that parameter space using basic logic, empirical observation, and modeling decisions that collapse heterogeneity to a small number of representative agents or types. You produce equilibria predictions at each stage of your model and compare them to objective reality. Once the model is sufficiently micro-founded and validated, you can then generate predictions and investigate mechanisms.

The whole point of agent-based modeling, however, is not to collapse the model to a small numbe of representative agents. It’s to endogenously grow aggregate outcomes from the individual endogenous decisions and how, through interactions within the model, they aggregate into predictions for a social system. So what’s the problem? Let’s assume every agent type and collective is characterized by 5 attributes and that each attribute is characterized by 3 statistical properties. Each rule comes with 3 functional variations, characterized by 3 weights each. We’ll then say that there are 5 total agents ( 2 individual types and 3 collectives), for each of whom half of attributes are fixed and half are endogenous. They manner in which they are endogenous has 3 functional variants. If we want to do a true grid search, we’re looking at least at a 5000 combination parameter grid space.

And we are no where near done yet, because we haven’t considered how time works. How steps and sub-steps are ordered. What decisions are synchronous, asynchronous, hieracherially ordered or random. We haven’t considered the social or physical environment What’s you start digging in, your parameter space starts gaining orders of magnitude. And then you realize the real problem is that true grid search of the entire parameter space would take until the heat death of the universe.

What’s the solution to a grid search? A (literal and metaphorical) golden section search. For those unfamiliar, a golden section search reduces the reduces the compuational burder of a grid search by iteratively narrowing the search interval toward an optimum, rather than evaluating every possible parameter combination. What we need is a way to search through a each parameter until we can confidently reduce it to smallest possible window that actually needs to be investigated to properly answer the research question. We need to make decisions.

And that’s what research expertise really is – competently making decisions about what can and should be varied, what can and should be assumed, etc, until we have a tractable question and well-executed research endeavor to answer it. The ABM space is too big for a researcher, however, because too much of the competent execution of research is unobservable, possibly even to the researcher themselves, as the model and the interactions of each decision become intractably complex. Too big for a human researcher. But what about an Agentic AI?

What if we created a base ABM, handed it to an Agentic AI, and told it to recursively evaluate and update the model until the model and the results it generated met a pre-defined set of necessary meta-conditions that the researchers defined as i) a falsified theoretic prediction, ii) generated via observable, definable mechanisms, iii) dependent on a maximal set of modeler decisions, and iv) and independent of set of unlimited, but fully observable modeler decisions?

This is going to take a long, but not necessarily intractable amount of time because we can also define a series of “golden section” adjacent rules that allow the AI to decide with a parmeter, rule, or decicsion is sufficiently irrelevant to ignore or sufficiently constrained to tractably investigate as key outcome determinant or source of outcome sensitivity.

As long as I am giving unsolicited advice to graduate students everywhere interested in agent based modeling, I would suggest forcing such an Agent AI modeler to exclusively use a constrained, pre-defined modeling language or library. Further, you probably want to force a literal, numerical maximum on the number of lines or characters of code. And, lastly, you’ll want to come up outcome rules by which the Agentic AI has to itemize and defend every single deviation of the final model from the base model handed to it. By constraining AI to a limited variety and quantity of coding objects, you are in turn ensuring that the resulting model and the internal mechanism will be transparent to the researchers managing the AI and the broader discipline evaluating them.

Agentic AI offers researchers the ability to iterate through the prospective solution space for modeling problems otherwise intractable via brute force. Further, it allows researchers transparently reveal the instructions that guided the agentic AI dimensions on which the generated model is sensitive to both varied parameters and modeling decisions. It allow for two hierachical levels of meta-research transparency.

That’s what I would be coding write now if I was a PhD student interested in contributing to economics and other social scientific disciplines via agent-based modeling.

Leave a Reply