Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.
102,775 characters · 22 sections · 74 citation commands
From Predictive Algorithms to Automatic Generation of Anomalies
{\singlespacing } \thispagestyle{empty} \setcounter{page}{0}
{\singlespacing
}
How do we improve economic theories? While there is no single answer, one pattern stands out. Consider the “Allais paradox.” To highlight a conjectured inconsistency between expected utility theory and how people make risky choices, Allais(53) crafted two menus of lotteries (see Table (ref)). He hypothesized that if people were presented this pair, their choices would violate expected utility theory. When collected data confirmed Allais' intuition, it led to a reappraisal of expected utility theory. More examples like the Allais paradox were constructed, such as the certainty effect and the Kahneman-Tversky choice experiments KahnemanTversky(79). These examples eventually led to a new theory of risky choice: cumulative prospect theory TverskyKahneman(92).
The Allais paradox does not have a natural place in our toolkit. It is neither an innovation in data collection on risky choice, nor is it a novel test statistic for whether expected utility theory is misspecified. Rather the Allais paradox is a hypothesis about where expected utility theory might fail, instantiated by a concrete pair of menus that guided subsequent empirical analysis. The Allais paradox is a specific instance of what we call an “anomaly” in this paper.
This is a recurring pattern of how economic theories are improved across fields: researchers construct anomalies that hypothesize where an existing theory might fail, and then researchers test the theory in newly collected data on those hypothesized anomalies.\footnote{See for example CamererThaler(95)-Anomalies-Ultimatums in game theory, KahnemanKnetschThaler(91)-Anomalies-EndowmentEffectLossAversionStatusQuo in decision-making under uncertainty, and LoewensteinPrelec(92)-AnomaliesIntertemporal in intertemporal choice.} The second step meticulously applies statistical tests to collected data, bringing to bear a foundational literature in econometrics and economic theory on specification testing and rationalizability tests Afriat(67), Varian(82). By contrast, the first step of anomaly generation largely happens offstage in a creative process. Researchers construct anomalies by contrasting their intuition with an existing theory and crafting examples where the theory differs from their hypothesized empirical patterns.
We are interested in anomalies because they offer a familiar solution to a new problem: how can we extract theoretical insights from machine learning algorithms? We propose procedures to automatically construct anomalies for an existing theory from predictive algorithms. We use supervised machine learning algorithms to build a black box predictive model, which serves as our procedures' empirical intuition. Our procedures then contrast the theory with the predictive model, searching for minimal examples on which the theory cannot explain the model's predictions. Like the Allais paradox, the resulting generated anomalies can be examined by researchers to interpret the predicted violation, and they provide natural targets for subsequent data collection. We illustrate these procedures by generating anomalies for expected utility theory based on a neural network that accurately predicts lottery choices.
We focus on settings summarized by input features $x$ and a modeled outcome $y^*$. Following influential work that views economic theories as tools for prediction Selten(91), FudenbergEtAl(22)-Completeness, FudenbergEtAl(20)-Restrictiveness, we model a theory as a restrictive class of functions that map features to the modeled outcome, consistent with its underlying structure. We call this the theory’s allowable function class. In choice under risk, $x$ is a menu of lotteries, $y^*$ a choice probability over the menu, and the allowable function class is the set of choice-probability functions consistent with expected utility theory. Anomalies are minimal collections of examples that are inconsistent with the theory’s allowable function class. Put simply: given any examples, the theory searches for an allowable function that fits them; an anomaly is a collection crafted to foil this search.
In this framework, constructing anomalies implied by an estimated prediction function is an adversarial game between a falsifier and the theory. The falsifier proposes collections of features and the estimated prediction function evaluated on those features, and the theory attempts to explain them by fitting an allowable function. The falsifier's payoff is increasing in the theory's loss on the proposed collection. An anomaly arises if the falsifier finds a collection of examples that the theory cannot fit. In other words, anomalies are adversarial examples for the theory in such a game.
Our first anomaly generation procedure solves the falsifier’s problem by directly optimizing a max-min program over the theory’s allowable functions. We analyze feasible implementation, establishing a finite‐sample bound on how well it approximates its population analog. Optimizing this max-min program may be challenging as the falsifier's maximization will typically be non-concave. An active literature in adversarial learning proposes a variety of gradient‐based methods for problems RazaviyaynEtAl(20); we adapt a particularly simple gradient descent--ascent scheme and describe its properties. By iteratively updating the falsifier's proposed collection of examples to maximize the loss of the theory's best-responding allowable function, this procedure generates anomalies implied by the predictive model.
There may, however, exist additional structure in theories that this procedure does not exploit. Theories often behave as if they have a lower-dimensional representation of the features (i.e., there may exist some pair of feature values that all allowable functions assign the same modeled outcome value). Some anomalies, like the Allais paradox, reveal a possible dimension that is relevant for the modeled outcome but which the theory's representation fails to capture. Our second procedure generates these representational anomalies for a theory. Given an initial feature value, it uses projected gradient descent to search for nearby feature values across which the theory's allowable functions do not vary but across which the estimated prediction function varies.
Our results so far provide conditions under which our procedures will generate anomalies implied by the predictive algorithm. How should we practically evaluate anomaly generation procedures?
We suggest two complementary evaluations that mirror the two-step workflow already used by researchers. First, logical verification: how often does the anomaly generation procedure return collections on which the theory is inconsistent with the predictive algorithm? This step assesses how effectively the procedure contrasts the predictive algorithm with the theory; better optimization should yield more generated anomalies implied by the predictive algorithm. Second, empirical testing: treating the algorithmically generated anomaly as a fixed design, collect independent data via new experiments on these generated anomalies and formally test for misspecification. This decouples anomaly generation from downstream inference, permitting the use of any supervised learner or optimizer in the procedure. Better prediction and better optimization should lead to generated anomalies that hold in new experiments. Together, these provide evaluation metrics for comparing anomaly generation procedures, and they enable researchers to reuse existing experimental datasets as “common tasks” for developing anomaly generation Donoho(24).
With this framework in hand, we turn to a concrete illustration: generating anomalies for expected utility theory. As a first step, we generate anomalies for expected utility theory that are implied by prospect theory in simulated lottery choice data. Since prospect theory has been well studied, we compare our algorithmically generated anomalies against known anomalies for expected utility theory constructed by researchers, such as those produced in Allais(53), KahnemanTversky(79), and many others. In this first exercise, we therefore have a floor: do our procedures reproduce known anomalies for expected utility theory implied by prospect theory? Our procedures successfully reach this floor, recovering known anomalies for expected utility theory over menus of two-payoff lotteries.
Motivated by their performance in simulation, we next apply our anomaly-generation procedures to real lottery-choice data. Using a publicly available dataset of human decisions on nearly 10{,}000 lottery menus collected by PetersonEtAl(21)-MLforChoiceTheory, we train a neural network to predict choice rates from the menus’ payoffs and probabilities. On a held-out set of menus, the predictive algorithm meaningfully improves on the accuracy of leading theories of decision-making under risk.
Using the predictive algorithm as its empirical intuition, our anomaly generation procedures again reconstruct known anomalies for expected utility theory, such as those produced in Allais(53) and KahnemanTversky(79). Our procedures go further and generate novel anomalies for expected utility theory that are implied by the predictive algorithm, which to our knowledge are nowhere in the existing literature. These anomalies fall into distinct categories that illustrate new choice reversals could be produced across menus of lotteries if people behave as predicted. Even in this well-trodden domain, our procedures suggest there might be novel patterns in lottery choice behavior implied by neural network's predictions.
Having generated these anomalies, we proceed to preliminary empirical testing: collect new data on these generated anomalies and test whether expected utility theory is violated. We present promising evidence. We recruit participants to make incentivized choices on our algorithmically generated anomalies. Our experimental design mirrors existing tests of the Allais paradox and the common ratio effect HarlessCamerer(94), BlavatskyyEtAl(22)-RobustnessOfAllais, JainNielsen(23), enabling us to evaluate how “significant” these novel anomalies are. On our algorithmically generated anomalies, participants exhibit behavior inconsistent with expected utility theory at rates comparable to those for well-established anomalies in behavioral economics.
Ultimately, our goal was not to revisit choice under risk or expected utility theory. Rather we hope to illustrate that anomaly generation is a distinct and valuable step in improving theories: it suggests where to look for violations and delivers concrete examples that guide subsequent empirical work. We show that procedures can be built to accelerate this step.
Substantial progress has been made in exploring how machine learning interacts with economic theories. Recent work compares the out-of-sample predictive performance of machine learning models against economic theories, measuring the “completeness” of economic theories FudenbergEtAl(22)-Completeness. AndrewsEtAl(22)-Transfer measure the out-of-distribution predictive performance of economic theories. When a supervised machine learning model predicts some outcome of interest accurately out-of-sample, researchers often attempt to open the prediction function and investigate particular behavioral hypotheses. See, for example, PeysakhovichNaecker(17) and PetersonEtAl(21)-MLforChoiceTheory for choice under risk, WrightLeytonBrown(17), HirasawaEtAl(22)-GameTheoryPred for strategic behavior in normal-form games, and MullainathanObermeyer(21) for medical decision-making. We use supervised machine learning algorithms as stepping stones to automatically generate anomalies, rather than relying on researchers to inspect the prediction function or generate hypotheses themselves. FudenbergLiang(19)-InitialPlay use supervised machine learning algorithms to predict on which normal-form games will observed play differ from alternative theories of strategic behavior. They use the resulting prediction function to sample normal-form games where a particular theory will predict poorly. This intuitive procedure can be reinterpreted as a heuristic solution to our adversarial characterization of anomalies tailored to the models of strategic behavior they study. LudwigMullainathan(23)-Faces develop a morphing procedure for images based on generative adversarial networks in order to uncover implicit characteristics of defendant mug-shots that affect pretrial release decisions.
Finally, a large machine learning literature seeks to explain or interpret predictive algorithms Molnar(25). These intepretability techniques often have different goals than anomaly generation for an existing theory. For example, counterfactual explanations search for nearby inputs that would yield alternative predictions given an input value and its prediction MothilalEtAl(20). Other work examines the sensitivity of predictions to alternative training examples KohLiang(17), and others seek to locally approximate a complex, predictive algorithm around some input value using simpler functions RibeiroEtAl(16). By contrast, anomaly generation is an adversarial problem: we search for examples on which the predictions are inconsistent with the theory's allowable function class. Nonetheless, exploring how these interpretability techniques could be adapted for anomaly generation is a valuable direction, and our evaluation metrics provide a common yardstick for future comparisons.
In this section, we develop a framework that analyzes an economic theory as a tool for prediction. This serves as the basis for developing anomaly generation procedures. Let $x \in \mathcal{X}$ be some features and $y^* \in \mathcal{Y}^*$ be some modeled outcome in an economic domain. Any pair $(x, y^*) \in \mathcal{X} \times \mathcal{Y}^*$ is an example, and $D := \{ (x_1, y_1^*), \hdots, (x_n, y_n^*) \}$ is a finite collection of examples. Let $\mathcal{D}$ denote all collections of examples and $\mathcal{F}$ the collection of all mappings $f \colon \mathcal{X} \rightarrow \mathcal{Y}^*$.
For our purposes, many economic theories can be summarized as a restrictive collection of mappings used to make novel predictions given examples. To state this precisely, we say a mapping $f \in \mathcal{F}$ is consistent with $D \in \mathcal{D}$ if $f(x) = y^*$ for all $(x, y^*) \in D$. A collection $D$ is inconsistent with function class $\widetilde{\mathcal{F}} \subseteq \mathcal{F}$ if there exists no $f \in \widetilde{\mathcal{F}}$ consistent with $D$.
We write $T(x; D) \subseteq \mathcal{Y}^*$ as the theory's predictions at feature $x$ when applied to examples $D$, and $\mathcal{F}^{T}$ is the allowable function class. The allowable function class $\mathcal{F}^{T}$ summarizes all mappings consistent with the theory's underlying structure, however that may be modeled. To make new predictions, the theory searches for allowable functions $f \in \mathcal{F}^{T}$ that are consistent with the given examples $D \in \mathcal{D}$. When the allowable functions $\mathcal{F}^T$ are inconsistent with $D$, then $T(\cdot; D)$ is empty as the theory is unable to make new predictions.
We illustrate how two popular economic domains map into this framework. We provide additional examples in Appendix (ref).
\paragraph{Example: choice under risk} Consider individuals making choices from menus of two lotteries over $J > 1$ monetary payoffs.\footnote{ErevEtAl(17)-FromAnomaliesToForecasts, PeysakhovichNaecker(17), PetersonEtAl(21)-MLforChoiceTheory collect experimental datasets of individuals making choices from menus of risky lotteries and compare the choice predictions made by economic theories of risky choice against those made by black-box predictive algorithms.} The features describe the menu $x = (z_0, p_0, z_1, p_1)$, where $z_0, z_1 \in \mathbb{R}^{J}$ are the payoffs and $p_0, p_1 \in \Delta^{J-1}$ are the probabilities associated with lottery 0 and lottery 1 respectively. The features may also, for example, include information about how each lottery is presented or the ordering of lotteries. The modeled outcome is the choice probability $y^* \in [0,1]$ for lottery 1.
Expected utility theory searches for utility functions in some researcher-chosen class $\mathcal{U}$ that rationalize lottery choice probabilities. This yields the allowable function class $\mathcal{F}^T = \{ f \colon \exists u \in \mathcal{U} \mbox{ s.t. } f(x) \in \arg \max_{k \in \{0, 1\}} \sum_{j=1}^{J} p_k(j) u(z_k(j)) \mbox{ for all } x \in \mathcal{X}\}$; in other words, each allowable function summarizes the choices consistent with some utility function with any tie-breaking rule for indifferences. Given a collection $D$, expected utility theory returns all utility functions $u \in \mathcal{U}$ satisfying $y^* = \arg \max_{k \in \{0, 1\}} \sum_{j=1}^{J} p_k(j) u(z_k(j))$ for all $(x, y^*) \in D$. On any new menu $x$, it returns predictions $T(x; D)$, where $y^* \in T(x; D)$ if and only if $y^* \in \arg \max_{k \in \{0, 1\}} \sum_{j=1}^{J} p_k(j) u(z_k(j))$ for some utility function $u \in \mathcal{U}$ rationalizing $D$.
Incorporating noise yields an alternative theory. For instance, expected utility theory with idiosyncratic errors allows the individual to mistakenly select the wrong lottery with some probability $\epsilon \in [0, 0.5]$ HarlessCamerer(94). Each utility function $u \in \mathcal{U}$ and idiosyncratic error $\epsilon$ is now associated with an allowable function $f \in \mathcal{F}^T$, and the pair is chosen to satisfy $y^* = (1 - \epsilon) 1\{ \sum_{j=1}^{J} p_1(j) u(z_1(j)) \geq \sum_{j=1}^{J} p_0(j) u(z_0(j)) \} + \epsilon 1\{ \sum_{j=1}^{J} p_1(j) u(z_1(j)) < \sum_{j=1}^{J} p_0(j) u(z_0(j)) \}$ for all $(x, y^*) \in D$. Other models of noisy choices can be captured by our framework, such as i.i.d. additive noise BallingerWilcox(97) or more general noise models McGranahanEtAl(23)-CommonRatio. $\blacktriangle$
\paragraph{Example: play in normal-form games} Consider individuals playing $J \times J$ normal-form games.\footnote{HartfordEtAl(16), WrightLeytonBrown(17), FudenbergLiang(19)-InitialPlay, HirasawaEtAl(22)-GameTheoryPred collect datasets of individuals selecting actions in normal-form games and compare the action predictions made by game-theoretic models of behavior against those made by black-box predictive algorithms.} Let $\{1, \hdots, J\}$ denote the actions available to the row and column players, and $\pi_{row}(j, k)$, $\pi_{col}(j, k)$ denote the payoff to the row and column players respectively from action profile $(j, k)$. The features describe the payoff matrix with $x = (\pi_{row}(1,1), \pi_{col}(1,1), \hdots, \pi_{row}(J,J), \pi_{col}(J, J))^\prime$. The modeled outcome is the row player's strategy profile, which is a probability distribution over actions $y^* \in \Delta^{J-1}$. For Nash equilibrium, its set-valued predictions on any payoff matrix $x$ are $\mathcal{Y}^{NE}(x) := \{ y^* \colon \exists y_{col}^* \in \Delta^{J-1} \mbox{ s.t. } y^* \in \arg \max_{\tilde{y}} \ \tilde{y}^\intercal \pi_{row} y_{col}^* \mbox{ and } y_{col}^* \in \arg \max_{\tilde{y}_{col}} \ (y^*)^\intercal \pi_{col} \tilde{y}_{col} \}$. This yields the allowable function class $\mathcal{F}^{T} = \{ f \colon f(x) \in \mathcal{Y}^{NE}(x) \mbox{ for all } x \in \mathcal{X}\}$; each allowable function corresponds to a particular choice among Nash equilibria in each game. Given the collection $D$, it returns the predictions $T(x; D)$ satisfying $T(x; D) = \{y^*\}$ for all $(x, y^*) \in D$ and $y^* \in T(x; D)$ for any $x \notin D$ if and only if $y^* = f(x)$ for some allowable function $f \in \mathcal{F}^T$ consistent with the collection. Alternatively, for example, “level-0” strategy behavior follows the same construction except instead it is associated with the point predictions $T^{level-0}(x) := \{(1/J, \hdots, 1/J)\}$ for all payoff matrices $x$. $\blacktriangle$
Definition (ref) builds on an influential literature that views economic theories as tools for prediction. Selten(91) measures the “predictive success” of a theory as the comparison between the fraction of correct predictions it makes and the fraction of outcomes it deems possible HarlessCamerer(94). FudenbergEtAl(20)-Restrictiveness measure the “restrictiveness” of economic theories, generalizing Selten's definition. Recent work bridging economic theory and supervised learning take the same perspective. FudenbergEtAl(22)-Completeness formalize the predictive completeness of an economic theory, and AndrewsEtAl(22)-Transfer study their transfer performance across domains.
On any collection inconsistent with a theory $\mathcal{F}^T$, it may be difficult for researchers to understand what drives the theory's failure. Consequently, researchers like Allais do not simply characterize all possible collections that are inconsistent with a theory; rather they construct minimally inconsistent collections, which we refer to as “anomalies.”
\paragraph{Example: the Allais paradox} Consider the Allais paradox (Table (ref)), which is a pair of examples consisting of the menus $x_A, x_B$ and the associated modeled outcomes $y_A^* = 0, y_B^* = 1$. The independence axiom implies that the choice on $x_A$ must be the same as the choice on $x_B$, provided the considered utility function class $\mathcal{U}$ rules out indifferences; that is, for any $f \in \mathcal{F}^T$, $f(x_A) = f(x_B)$. The Allais paradox is inconsistent with expected utility theory. Since any single choice $(x_A, y_A^*)$ or $(x_B, y_B^*)$ is consistent with expected utility theory, the Allais paradox satisfies Definition (ref). $\blacktriangle$
An anomaly is a minimally inconsistent collection of examples that $\mathcal{F}^T$ is consistent with any of its subsets. In Appendix (ref), we illustrate additional anomalies, such as the certainty effect for expected utility theory and an anomaly for Nash equilibrium in normal-form games.
We next observe that inconsistent collections and anomalies have a simple characterization in terms of a theory's allowable functions $\mathcal{F}^T$ and a loss function.
This is immediate from Definitions (ref)-(ref). Searching for inconsistent collections is equivalent to searching for collections that induce a positive loss for the theory's allowable functions. Furthermore, we can search for anomalies by iteratively searching for larger inconsistent collections. Observation (ref)(i) can be reinterpreted as an adversarial game between the theory (the min-player) and a falsifier. The falsifier proposes examples to the theory, and the theory attempts to explain them by fitting its allowable functions. The theory's payoffs are decreasing in its loss, and the falsifier wishes to search for examples that induce a positive loss for the theory's best-responding allowable function.
To this point, we analyzed the behavior of a theory on collections of hypothetical examples. Researchers construct anomalies by contrasting their intuition with a theory $\mathcal{F}^T$ and crafting examples where the theory's predictions differ from their hypothesized outcomes. We will instead use predictive algorithms as our procedures' empirical intuition. This step requires some assumption on how observable data map onto the theory's examples.
We will assume data are drawn from some joint distribution over $(X_i, Y_i) \sim P$, where $Y_i \in \mathcal{Y}$ is an observed outcome and $P(X_i = x) > 0$ for all $x \in \mathcal{X}$. The observed outcome is statistically related to the modeled outcome through $f^*(x) := \mathbb{E}\left[ g(Y_i) \mid X_i = x \right]$ for some researcher-specified function $g$, where $\mathbb{E}[\cdot]$ denotes the expectation under $P$. An example is now a pair $(x, f^*(x))$. The theory's modeled outcome is simply the conditional expectation of some known transformation of the observed outcome. For example, researchers often first estimate choice probabilities from data on discrete choices and strategy profiles in normal-form games from data on actions.
We would like to generate anomalies for a theory $\mathcal{F}^{T}$ of the form $D = \{ (x_1, f^*(x_1)), \hdots, (x_n, f^*(x_n)) \}$. In this light, we can reinterpret the largely informal process used by researchers to generate anomalies themselves: researchers “estimate” $f^*$ using intuition about the economic domain and then “contrast” it against the theory $\mathcal{F}^T$ using their creativity. We instead propose two procedures to generate anomalies that will first use data and supervised learning algorithms, rather than intuition, to estimate $f^*$ and second use optimization techniques, instead of creativity, to contrast the resulting estimate against the theory $\mathcal{F}^T$.
In this section, we describe our two specific procedures for anomaly generation. Both procedures contrast the theory $\mathcal{F}^T$ with a predictive algorithm, searching for minimal collections on which the theory cannot explain the model's predictions. The quality of the resulting generated anomalies depend on both the model's predictive fit and the optimization performance of the search procedure. We discuss two complementary evaluations for algorithmically generated anomalies that mirror how we evaluate hypothesized anomalies from researchers: logical verification and empirical testing.
For $x_{1:n} := (x_1, \hdots, x_n)$, let $\mathcal{E}(x_{1:n}) := \min_{f \in \mathcal{F}^{T}} n^{-1} \sum_{i=1}^{n} \ell(f(x_i), f^*(x_i))$ be the theory's loss on $D = \{ (x_1, f^*(x_1)), \hdots, (x_n, f^*(x_n)) \}$. Following Observation (ref), the falsifier's adversarial problem is given by
which searches for collections that generate large positive loss for the theory's best responding function (if they exist). Our first procedure for generating anomalies is based on this program. We iterate over collection sizes $n$ and solve the falsifier's problem (ref). The collection associated with feature vector $x_{1:n}$ is inconsistent with $\mathcal{F}^T$ if and only if $\mathcal{E}(x_{1:n}) > 0$ following Observation (ref). We verify it is an anomaly by checking whether $\mathcal{F}^T$ is consistent with its subsets.
This search procedure is not directly feasible for two reasons: $f^*$ is not known; and the falsifier's problem (ref) is a possibly difficult max-min optimization. Our first procedure tackles these challenges by estimating $f^*$ from data using supervised learning algorithms and practically optimizing via a simple gradient descent ascent (GDA) routine.
Recall $f^*(x) = \mathbb{E}[g(Y_i) \mid X_i = x]$ for some researcher-specified function $g$. Suppose we observe $(X_i, Y_i) \sim P$ for $i = 1, \hdots, N$ and construct an estimate $\widehat{f}^*$. This might be constructed using supervised machine learning algorithms that predict $g(Y_i)$ based on the features $X_i$ such as deep neural networks or classic nonparametric regression techniques. Consider the plug-in max-min program
We analyze the plug-in program's error for the infeasible program (ref) assuming access to approximate optimization routines that solve the inner minimization and outer maximization problems possibly up to some errors.
Our analysis will yield an inequality that decomposes the total error into a statistical component (from estimating $f^*$) and an optimization component (from the routines' optimality gaps). Alternative estimators or optimization routines may yield better generated anomalies by reducing their corresponding terms.
Define $\widetilde{f}^{T}(\cdot; x_{1:n})$ to be the allowable function returned when the minimization routine solves $\min_{f \in \mathcal{F}^{T}} n^{-1} \sum_{i=1}^{n} \ell\left( f(x_i), \widehat{f}^*(x_i) \right)$ at any $x_{1:n}$, and $\widetilde{x}_{1:n}$ to be the feature values returned when the maximization routine solves $\max_{x_{1:n}} n^{-1} \sum_{i=1}^{n} \ell\left( \widetilde{f}^{T}(x_i; x_{1:n}), \widehat{f}^*(x_i) \right)$. The optimal values of the plug-in and population programs are
The error is bounded by the optimality gaps of the optimization routines and the estimation error of $\widehat{f}^*$. The estimation error contributes through the worst-case (supremum norm) error of $\widehat{f}^*$ for $f^*$. If we could exactly optimize and set $\delta, \nu = 0$, the rate at which the plug-in optimal value converges to the population optimal value is bounded by the rate at which $\widehat{f}^*$ converges uniformly to $f^*$. While strong, it is unsurprising that this form of convergence is sufficient to control the plug-in's error as the max-min optimization program possibly extrapolates to unseen features in searching for inconsistent collections. While Proposition (ref) asks for error control at the realized collection, one could instead target bounds on the average error over realized collections produced across optimization runs; this might permit $L^2$-type errors at the cost of assumptions on the distribution over collections induced by the optimization routines. This is an interesting direction.
Proposition (ref) is agnostic, applying to any choice of estimator $\widehat{f}^*$ and optimization routines. First, this is valuable as there is tremendous appetite for comparing economic theories against a wide range of supervised learning algorithms; in studies of choice under risk and strategic behavior alone, researchers already estimate regularized linear regression PeysakhovichNaecker(17), kernel ridge regression AndrewsEtAl(22)-Transfer, random forests FudenbergLiang(19)-InitialPlay, deep neural networks HartfordEtAl(16), PetersonEtAl(21)-MLforChoiceTheory and recurrent neural networks HirasawaEtAl(22)-GameTheoryPred. We should expect new innovations in machine learning algorithms to quickly enter these comparisons. The estimation error term also connects anomaly generation to theoretical innovations that provide high-probability bounds on worst-case error for modern nonparametric estimators --- see, for example, BelloniEtAl(15)-Series, ChenChristensen(15)-Series on series based estimators, reproducing kernel Hilbert space methods FischerEtAL(20)-RKHS, and deep neural networks Imaizumi(23)-DeepNetsSupNorm. As such results are developed for novel supervised learning algorithms, they can be combined with Proposition (ref) to provide high probability bounds on the error.
Second, it is also valuable to remain agnostic about the choice of optimization routines. A wide array of optimization routines are available for solving max-min programs, and different problems might reward different routines RazaviyaynEtAl(20). The optimality gap term creates an interface between anomaly generation and improvements in optimization --- better optimization routines in a particular problem improve the resulting generated anomalies. In the next section, we discuss one concrete optimization routine that we use in our application to generating anomalies for expected utility theory.
The plug-in max-min program (ref) has connections to a computer science literature on adversarial learning AkhtarMian(18)-AdversarialAttacks. In adversarial learning, “data-poisoning attacks” are studied to understand the robustness of black box predictive algorithms: Given an estimated neural network for image classification, for example, we search for perturbations to pixel values that would lead the neural network to (humorously) classify a picture of a pig as an airliner or (more dangerously) fail to notice a stop sign in a self-driving car. The resulting perturbed images are known as “adversarial examples.”
The plug-in max–min program’s search for anomalies can be viewed as a data-poisoning attack on the theory’s allowable class $\mathcal{F}^{T}$. The falsifier seeks collections $D$ that degrade the performance of every $f\in\mathcal{F}^{T}$; the resulting generated anomalies are adversarial examples for the theory. Motivated by this connection, we solve the plug-in max–min problem with a gradient descent–ascent (GDA) routine. An active literature in adversarial learning offers many gradient-based methods for analogous problems RazaviyaynEtAl(20), MokhtariEtAl(20), and since these techniques have been used to construct adversarial examples in machine learning, they are a natural starting point for anomaly generation. We use a particularly simple GDA implementation and describe its properties.
To describe our specific implementation, we first simplify the inner minimization over the theory's allowable functions. We assume the theory's allowable functions can be parametrized, meaning $\mathcal{F}^{T} = \{ f_{\theta}(\cdot) \colon \theta \in \Theta \}$ for some parameter vector $\theta$ and compact parameter space $\Theta$. In expected utility theory, for example, such a parametrization may involve a flexible sieve basis or a class of neural networks for the possible utility functions. The inner minimization over the theory's allowable functions then becomes
This is equivalent to an empirical risk minimization problem, and so we can apply standard optimization techniques (e.g., convex methods for particular parametrizations and loss functions or gradient descent with random initializations). The outer maximization will often be non-concave; varying the features induces variation in the estimated function $\widehat{f}^*$, the theory's allowable function $f_{\theta}$ and the theory's best-fitting parameter vector $\theta \in \Theta$. We nonetheless use a gradient-based optimization procedure. Let $\widehat{\mathcal{E}}(x_{1:n}, \theta) := n^{-1} \sum_{i=1}^{n} \ell\left( f_{\theta}(x_i), \widehat{f}^*(x_i) \right)$ and we assume $\widehat{\mathcal{E}}(x_{1:n}, \theta)$ is differentiable in $x_{1:n}$ for all $\theta \in \Theta$. For a collection of initial feature values $x_{1:n}^0$, maximum number of iterations $S > 0$, and some chosen step size sequence $\{\eta_s\}_{s=0}^{S} > 0$, we iterate over $s = 0, \hdots, S$ and calculate at each iteration
At each iteration $s$, we construct an approximate solution to the inner minimization problem $\theta^{s+1}$ and take a gradient ascent step on the feature values plugging in $\theta^{s+1}$. As we discuss in Appendix (ref), such simple fixed step-size GDA routines converge to an approximate stationary point of the outer maximization problem JinEtAl(19), loosely meaning that $\nabla \widehat{\mathcal{E}}(x_{1:n}, \theta) \approx 0$ at the returned feature and parameter vectors.
The family of GDA routines is a reasonable choice for anomaly generation when the theory's allowable functions can be parametrized and the theory's average loss on a given collection is differentiable. While we consider a fixed step size routine here, there exists a variety of GDA algorithms as mentioned earlier; and a fruitful direction is to explore alternative optimization routines depending on the domain. We will return to this point in Section (ref) below.
Our adversarial procedure exploits no structure beyond the theory's allowable functions $\mathcal{F}^{T}$. Yet many economic theories operate on a lower-dimensional representation of the domain, meaning each allowable function $f \in \mathcal{F}^{T}$ behaves as if it pools together some distinct feature values. We next propose an example morphing algorithm to search for “representational anomalies” that highlight how the allowable functions fail to capture some dimension along which predicted outcomes vary.
Many economic theories draw the same implications at distinct features $x, x^\prime$, which we formalize in the following definition.
To build intuition, a theory $\mathcal{F}^{T}$ has representationally equivalent features whenever it ignores some aspect of the economic domain. In choice under risk, consider presenting a menu of risky lotteries as either a two-stage lottery or as a simple lottery over final payoffs. Expected utility theory is silent on whether this presentational choice, which could be encoded in the features $x \in \mathcal{X}$, would influence an individual's decision. Any pair of menus of $x_1, x_2$ whose constituent lotteries have the same final payoffs and probabilities over those final payoffs yet differ in their presentation are representationally equivalent.
While ignoring an aspect of the economic domain is sufficient for the existence of representationally equivalent features, it is not necessary. In choice under risk, suppose we defined the features $x \in \mathcal{X}$ to only consist of the final payoffs and probabilities associated with the lotteries in the menu. Expected utility theory of course does not ignore any of these features in modeling risky choices. Nonetheless, there exists a representationally equivalent menu $x_2$ consisting of the compound lotteries $\alpha (p_0, z_0) + (1 - \alpha) (\widetilde{p}, \widetilde{z})$ and $\alpha (p_1, z_1) + (1 - \alpha) (\widetilde{p}, \widetilde{z})$. The pair satisfies $f(x_1) = f(x_2)$ due to the independence axiom.
Representationally equivalent features, if they exist, provide more structure that can be exploited for anomaly generation. Particular anomalies highlight failures in the theory's representation, as we define next.
Researchers often generate representational anomalies for theories themselves. Many classic examples of anomalies for expected utility theory are, in fact, representational anomalies. Consider again the Allais paradox (Table (ref)). Due to the independence axiom, expected utility theory requires $f(x_A) = f(x_B)$ for all $f \in \mathcal{F}^{T}$, and so the menus $x_A, x_B$ are representationally equivalent. Yet the Allais paradox highlights that choices may vary across these two menus, and it is therefore a representational anomaly. By the same reasoning, the certainty effect (Table (ref)) is also a representational anomaly. TverskyKahneman(81) constructed other representational anomalies for expected utility theory that highlight whether lotteries are presented as two-stage lotteries versus simple lotteries may affect individuals' risky choices.
Given $f^*(x) \equiv \mathbb{E}[Y_i \mid X_i=x]$, our goal is to search for representational anomalies ${(x_1,f^*(x_1)),(x_2, f^*(x_2))}$ using only the theory’s allowable class $\mathcal{F}^T$. Our procedure attempts to first characterize the representational equivalences implied by $\mathcal{F}^T$ and then search adversarially within them. For the implementation below, we assume that $f^*$ and all $f\in\mathcal{F}^T$ are differentiable (this is satisfied in our illustration with expected utility theory and additive logit noise) and that the theory admits a local representation.
Representations are local in the sense that there exists a small deviation from $x_1$ or $x_2$ that is also representationally equivalent. Under Assumption (ref), we could search for representational anomalies by taking small gradient steps. Given $f^*$ and an initial value $x^0$, we could search for directions $v \in \mathbb{R}^{dim(x)}$ along which no allowable function $f \in \mathcal{F}^{T}$ changes but $f^*$ changes substantially, and we then update or morph $x^0$ in the direction $v$. Specifically, let $\mathcal{N}(x) = \{ v \in \mathbb{R}^{dim(x)} \colon \nabla f(x)^\prime v = 0 \mbox{ for all } f(\cdot) \in \mathcal{F}^{T} \}$ denote the subspace of directions that are orthogonal to the gradient of each allowable function. Under Assumption (ref), $\mathcal{N}(x)$ is non-empty at any $x$ for which there exists some representationally equivalent $x^\prime$. For an initial feature value $x^0$, maximum number of iterations $S$, and step size sequence $\{\eta_s\}_{s=0}^{S}$, we iterate over $s = 0, \hdots, S$ and compute the update step
where $\mbox{Proj}\left( \cdot \right)$ is the projection operator and $\mbox{Proj}\left( \nabla f^*(x) \mid \mathcal{N}(x)\right)$ is the projection of the gradient of $f^*(\cdot)$ onto the null space of the allowable functions. We therefore move in directions of $f^*$ that hold fixed the value of any allowable function $f \in \mathcal{F}^{T}$.
Since we do not observe $f^*$, we again construct an estimator $\nabla \widehat{f}^*$ based on a random sample $(X_i, Y_i) \sim P(\cdot)$ i.i.d. for $i = 1, \hdots, n$. We plug the estimator into the morphing procedure and apply the update step $x^{s+1} = x^{s} - \eta_s \mbox{Proj}\left( \nabla \widehat{f}^*(x^s) \mid \mathcal{N}(x^s) \right)$ at each iteration $s = 0, \hdots, S$. Provided the error $\nabla \widehat{f}^* - \nabla f^*$ is small, $\mbox{Proj}\left( \nabla \widehat{f}^*(x) \mid \mathcal{N}(x) \right)$ remains a descent direction for $f^*(\cdot)$,
While Proposition (ref) analyzes the properties of plugging the estimated gradient of the true function into the morphing procedure, it still leaves open the question of how to practically characterize the subspace $\mathcal{N}(x)$ and implement the projection operator.
In our implementation, we again parametrize the allowable functions, meaning $\mathcal{F}^{T} = \{ f_{\theta} \colon \theta \in \Theta\}$ for some $\theta \in \Theta$ as in Section (ref). We implement the projection operator by sampling $B > 0$ parameter values $\theta \in \Theta$ at each update step and directly orthogonalizing the gradient $\nabla \widehat{f}^*(x)$ with respect to each of the sampled gradients $\nabla f_{\theta}(x)$. As $B$ grows large, this better approximates the null space of the allowable function $\mathcal{N}(x)$. Our implementation of example morphing only requires the access to the allowable functions. Of course, if there are known directions $v^s$ along which no allowable functions vary, then this sampling step is not needed and we can directly orthogonalize the gradient $\nabla \widehat{f}^*(x)$ with respect to the known directions. In this case, example morphing uses gradient steps to adversarially search within the representational equivalences of the allowable functions.
Having introduced two specific anomaly generation procedures, we next suggest two complementary evaluations: logical verification and empirical testing. These mirror the two-step workflow already used by researchers: researchers first assess whether a hypothesized anomaly would be inconsistent with the theory if nature behaved as they postulated; and second, researchers then collect new data on the hypothesized anomaly and test whether nature in fact does so.
Let $\widehat{X}_{1:n}$ denote a collection of features returned by an anomaly generation procedure using training data $D_N = \{(X_i,Y_i)\}_{i=1}^N$, $\{f_\theta:\theta\in\Theta\}$ be a parametrization of the theory’s allowable functions and $\widehat{\mathcal{E}}(x_{1:n};\theta)$ be the average loss of $f_\theta$ evaluated on $\{(x_j,\widehat f^{\,*}(x_j))\}_{j=1}^n$. Logical verification reports two evaluation metrics, conditioning on the training dataset $D_{N}$,
where the first and second term verify whether $\widehat{X}_{1:n}$ is an anomaly for parametrized allowable function class $\{f_\theta:\theta\in\Theta\}$ and the allowable function class $\mathcal{F}^T$ respectively. These two can be different since $\{f_\theta:\theta\in\Theta\}$ may only approximate $\mathcal{F}^T$. Because $\widehat{X}_{1:n}$ may depend on random initializations and other optimization choices (e.g., number of update steps), these probabilities summarize the fraction of optimization runs that yield an inconsistent collection taking $\widehat{f}^*$ as given (i.e., assuming nature behaves as postulated by the predictive algorithm).
Logical verification evaluates the quality of the optimization used by an anomaly generation procedure --- how well does a specific procedure contrast the predictive algorithm against the theory? Better optimization should yield more generated anomalies taking $\widehat{f}^*$ as given. This is valuable as researchers should explore diverse optimization techniques in anomaly generation. For example, the adversarial formulation given in Section (ref) admits many GDA routines. Since the anomaly generation problem is often nonconvex-nonconcave, different routines may excel on different problem instances. The logical verification metrics provide scores that can be used for comparisons. Of course, logical verification only reveals inconsistencies between the predictive model and the theory; it does not by itself establish violations in nature.
For this reason, empirical testing is an essential next step: treat the algorithmically generated anomalies as experimental designs for data collection and formally test whether the theory is violated on independent data. More specifically, let $S(\widehat{X}_{1:n},Y_{1:n})$ denote a particular test statistic for misspecification (e.g., a violation rate with expected utility theory) computed on independent responses $Y_{1:n}^\prime \mid \widehat{X}_{1:n}$. Empirical testing then reports, for example,
where the first term is the average violation on a particular generated anomaly and the second term is the average violation across anomalies generated by the procedure given $D_N$ (of course, researchers might instead report a hypothesis test on a generated anomaly and a rejection rate across generated anomalies). We propose researchers estimate these quantities with independently collected data in new experiments.
Empirical testing is practical in many domains like risky choice and strategy behavior, where online experiments are feasible and relatively cheap. Furthermore, this serves to statistically decouple testing for misspecification from the anomaly generation step. Any supervised learning algorithm and any optimization routine can be used upstream in anomaly generation to produce $\widehat{X}_{1:n}$ --- including future, more powerful tools --- without distorting downstream inferences on newly collected data. Researchers are further free to bring to bear whatever statistic $S(\widehat{X}_{1:n},Y_{1:n})$ they prefer from rich work on specification testing and rationalizability tests in econometrics and economic theory Afriat(67),Varian(82), HarlessCamerer(94).
More broadly, logical verification and empirical testing allow researchers to reuse benchmark datasets, like large-scale datasets on risky choice PetersonEtAl(21)-MLforChoiceTheory and strategic behavior WrightLeytonBrown(17), HirasawaEtAl(22)-GameTheoryPred. Anomaly generation procedures can be prototyped on these benchmarks and subsequently compared against each other based on subsequent logical verification and empirical testing. This fosters comparable “common tasks” essential for the rapid development of methods Donoho(24).
As a first illustration, we algorithmically generate anomalies for expected utility theory based on simulated lottery choice data consistent with prospect theory. We compare the anomalies generated by our procedures against known anomalies for expected utility theory that are implied by prospect theory, such as those produced in Allais(53) and KahnemanTversky(79).
We simulate lottery choice data from an individual who evaluates lotteries over $J > 1$ monetary payoffs according to the probability weighting function $\pi_j(p; \delta, \gamma) = \frac{\delta p_j^{\gamma}}{ \delta p_j^{\gamma} + \sum_{k \neq j} p_k^{\gamma} }$ for $j = 1, \hdots, J$, where $p \in \Delta^{J-1}$ and $\delta \geq 0, \gamma \geq 0$ govern the probability weighting function LattimoreEtAl(92). We calibrate $(\delta, \gamma)$ using estimates based on BruhinEtAl(10) (reported in their Table V and Table IX), setting $(\delta, \gamma)$ to be equal to one of $(0.926, 0.377)$, $(0.726, 0.309)$, or $(1.063, 0.451)$. For these parameter values, the individual over-weights probabilities close to zero, under-weights probabilities close to one, and compresses intermediate probabilities (Appendix Figure (ref)). This can generate known anomalies for expected utility theory, such as the Allais paradox and the Certainty effect. These parameter values also introduce “outcome pessimism” when $\delta < 1$ (i.e., probability weights may sum to less than one), or “outcome optimism” when $\delta > 1$ (i.e., probability weights may sum to greater than one), which may lead the individual to select a first-order stochastically dominated lottery.
The individual has a linear utility function. The individual evaluates a lottery $(p, z)$ by $CPT(p, z; \delta, \gamma) := \sum_{j=1}^{J} \pi_j(p; \delta, \gamma) z_j$. On a menu $x = (p_0, z_0, p_1, z_1)$, we simulate the individual's probability of selecting lottery $1$ according to $f^*(x) = P\left( CPT(p_1, z_1; \delta, \gamma) - CPT(p_0, z_0; \delta, \gamma) + \xi \geq 0 \right)$, where $\xi$ is an i.i.d. logit shock. The individual's binary choice is $Y_i \mid X_i = x \sim Bernoulli(f^*(x))$.
To apply our procedures, we parametrize the allowable functions of expected utility theory. We model the utility function as a linear combination of non-linear basis functions with $u_{\theta}(z) = \sum_{k=1}^{K} \theta_k b_k(z)$ for basis functions $b_1(\cdot), \hdots, b_K(\cdot)$ (e.g., polynomial bases or monotone I-splines), $K$ finite, and parameter vector $\theta \in \Theta$. We consider the parametrized allowable functions of expected utility theory $\{ f_{\theta} \colon \theta \in \Theta \}$ for $f_{\theta}(x) = P( \sum_{j=1}^{J} p_1(j) u_{\theta}(z_1(j)) - \sum_{j=1}^{J} p_0(j) u_{\theta}(z_0(j)) + \xi \geq 0)$ for $\xi$ an i.i.d. logit shock.
We generate anomalies for expected utility theory over menus of two-payoff lotteries, applying our procedures to the choice probability function $f^*$. For each parameter value $(\delta, \gamma)$, we apply our adversarial algorithm to 25,000 randomly initialized menus of lotteries $x^0$ and our example morphing algorithm to 15,000 randomly initialized menus. Appendix (ref) provides further details on the implementation, and we generate anomalies based on an estimated choice probability function $\widehat{f}$ in Appendix (ref).
We evaluate our anomaly generation procedures by logical verification as discussed in Section (ref): among the menus generated, how many are inconsistent with expected utility theory? For the parametrized allowable function classes, our procedures generate $1,581$, $1,852$, and $2,564$ anomalies across calibrated parameter values $(\delta, \gamma)$ for the probability weighting function respectively. Since these parametrized allowable functions are restrictive, we numerically verify whether the same menus are inconsistent with expected utility theory at any increasing utility function and without noisy choices (see Appendix (ref) for details). Altogether our procedures generate 309 anomalies for expected utility theory across calibrated parameter values $(\delta, \gamma)$ for the probability weighting function.
As a baseline comparison, we randomly sample $25,000$ menus at random for each calibrated parameter value $(\delta, \gamma)$ and flag those on which the implied choices would violate expected utility theory. This corresponds to the initialization step of boosting-style procedure for anomaly generation, which would subsequently reweight toward hard instances for the theory FudenbergLiang(19)-InitialPlay. This baseline returns only $15$, $17$, and $7$ anomalies for the parametrized allowable function class across calibrated parameter values $(\delta, \gamma)$ respectively; furthermore, it generates zero anomalies for expected utility theory at any increasing utility function. This comparison highlights two lessons: first, anomalies for a theory can be rare in the feature space, and so targeted search is necessary; and second, our optimization routines add value in this illustration, navigating the complicated landscape to generate anomalies that would fail to be uncovered through brute force.
To interpret the 309 anomalies for expected utility theory generated by our procedures, we categorize them in two steps based on our knowledge of expected utility theory and the particular violations they highlight. We first numerically check whether the generated anomaly is a first-order stochastic dominance violation, which is a well known anomaly implied by particular parametrizations of the probability weighting functions. We next numerically check whether the generated pair of menus can be represented as compound lotteries over the same simple lotteries and whether there is a choice reversal across the menus, which would indicate a violation of the independence axiom of expected utility theory. Since the space is simple enough, we enumerate the possible compounding operations. Appendix (ref) provides further details on our numeric categorization. Our algorithmically generated anomalies fall into distinct categories, which illustrate choice reversals across menus of lotteries predicted by the probability weighting function (Table (ref)).
\paragraph{The dominated consequence effect:} Consider the algorithmically generated pair of menus in Table (ref). The individual selects lottery A0. Since lottery A0 has a lower expected value than lottery A1, expected utility theory could rationalize this choice with an appropriate degree of risk aversion. Yet the individual also selects the lottery B1, which has a higher expected value than lottery B0. It appears as if the individual's risk attitudes have reversed on menu B.
More formally, menu A and menu B in Table (ref) are engineered such that the choice predictions of expected utility theory are constant across them. Lottery B0 can be expressed as a compound lottery over lottery A0 and a degenerate lottery that yields the certain payoff $6.44$; that is, $B0 = \alpha_0 A0 + (1 - \alpha_0) \delta_{6.44}$ for some $\alpha_0 \in (0, 1)$. Analogously, lottery B1 can be written as $B1 = \alpha_1 A1 + (1 - \alpha_1) \delta_{5.72}$ for some $\alpha_1 < \alpha_0$. The individual's choices express that lottery $A0$ is preferred to lottery $A1$ but $\alpha_1 A1 + (1 - \alpha_1) \delta_{5.72}$ is preferred to $\alpha_0 A0 + (1 - \alpha_0) \delta_{6.44}$, contradicting expected utility theory since it can be shown that $A0$ being preferred to $A1$ must imply that $\alpha_0 A0 + (1 - \alpha_0) \delta_{6.44}$ must be preferred to $\alpha_1 A1 + (1 - \alpha_1) \delta_{5.72}$. We provide a formal proof in Appendix (ref).
All anomalies in the first row of Table (ref) have a common structure. We define the appropriate pair of lotteries as $\ell_0 = (p_0, z_0)$, $\ell_1 = (p_1, z_1)$ with $z_0 = (z_{0,1}, z_{0,2})$, $z_1 = (z_{1,1}, z_{1,2})$ and $\underline{z}_0 := \min_{j \in \{1, 2\}} z_{0j} < \min_{j \in \{1, 2\}} z_{1j} := \underline{z}_1$. Each anomaly can be summarized as: for some $\alpha_0 \leq \alpha_1$, one menu consists of the choice between lottery $\ell_0$ and lottery $\ell_1$, and the other menu consists of the choice between the compound lotteries $\alpha_0 \ell_0 + (1 - \alpha_0) \delta_{\underline{z}_0}$ and $\alpha_1 \ell_1 + (1 - \alpha_1) \delta_{\underline{z}_1}$. Selecting $\ell_1$ over $\ell_0$ implies that the individual also prefers $\alpha_1 \ell_1 + (1 - \alpha_1) \delta_{\underline{z}_1}$ over $\alpha_0 \ell_0 + (1 - \alpha_0) \delta_{\underline{z}_0}$ under expected utility theory.
We refer to this category as a “dominated consequence effect” as the pair of menus highlight a violation of the expected utility theory based on mixing each lottery with dominated, certain consequences (Appendix Table (ref) provides additional examples). The Common ratio effect (itself a generalization of the Certainty effect and Bergen paradox) is a special case of the dominated consequence effect; it can be recovered by setting $\alpha_0 = \alpha_1$ and placing additional restrictions on how the probabilities $p_0, p_1$ relate to one another. The dominated consequence effect therefore nests the well-known anomalies for expected utility theory over pairs of menus of two lotteries over two monetary payoffs.
\paragraph{The reverse dominated consequence effect and the strict dominance effect:} Consider next the algorithmically generated anomaly in Table (ref) The individual selects lottery A0. The lotteries in menu B again have the same payoffs as those in menu A, though the probabilities associated with the highest payoffs increase in both lotteries across these menus. This leads to an apparent choice reversal as the individual now selects lottery B1. These menus are again engineered such that the choice predictions of expected utility theory do not change across them.
Each anomaly in the second row of Table (ref) share a common structure. We now define the appropriate pair of lotteries as $\ell_0 = (p_0, z_0)$, $\ell_1 = (p_1, z_1)$ with $z_0 = (z_{0,1}, z_{0,2})$, $z_1 = (z_{1,1}, z_{1,2})$ and $\overline{z}_0 := \max_{j \in \{1, 2\}} z_{0j} < \max_{j \in \{1, 2\}} z_{1j} := \overline{z}_1$. Each of these anomalies can be summarized as: for some $\alpha_1 \leq \alpha_0$, one menu consists of the choice between lottery $\ell_0$ and lottery $\ell_1$, and the other menu consists of the choice between the compound lotteries $\alpha_0 \ell_0 + (1 - \alpha_0) \delta_{\overline{z}_0}$ and $\alpha_1 \ell_1 + (1 - \alpha_1) \delta_{\overline{z}_1}$. Since the other menu mixes lotteries $\ell_0$ and $\ell_1$ with their maximal payoffs, selecting $\ell_1$ over $\ell_0$ must imply the individual also prefers $\alpha_1 \ell_1 + (1 - \alpha_1) \delta_{\overline{z}_1}$ over $\alpha_0 \ell_0 + (1 - \alpha_0) \delta_{\overline{z}_0}$ under expected utility theory. The menus highlight a violation of expected utility theory based on mixing each lottery with dominating certain consequences; we therefore refer to this category as a “reverse dominated consequence effect” (Appendix Table (ref) provides additional examples).
Finally, all anomalies in the third row of Table (ref) exhibit what we call a “strict dominance effect.” We provide an illustrative example in Table (ref) (see Appendix Table (ref) for additional examples). In this case, the algorithmically generated anomaly shares a similar intuition as the original Allais paradox. The individual selects lottery A1 despite it having the lower expected payoff in the menu, demonstrating a degree of risk aversion. The individual selects lottery B0 in menu B which is the higher expected payoff, and it again appears that their risk attitudes reversed. The reversal here is particularly transparent. Lottery B0 raises the probability of the lowest payoff in lottery A0, whereas lottery B1 raises the probability of the highest payoff in lottery A1. In this sense, the pair of menus highlights a violation of expected utility theory based on mixing lottery A1 with a certain consequence that strictly dominates the certain consequence mixed with lottery A0. See Appendix (ref) for further discussion.
While sharing similar intuitions, these final two categories are formally different than both the Common consequence effect and Common ratio effect. These categories highlight violations of expected utility theory while using only two distinct payoffs in each lottery and mixing each lottery with particular certain consequences. Our procedures generated categories of anomalies for expected utility theory that are implied by the probability weighting function, but to our knowledge had not been noticed before.
\paragraph{First-order stochastic dominance violations:} All anomalies in the last row of Table (ref) are menus of lotteries in which the individual selects lotteries that are first-order stochastically dominated. See Appendix Table (ref) for specific examples. Such first-order stochastic dominance violations were generally viewed as an undesirable “bug” in probability weighting that would be eliminated through an “editing phase” KahnemanTversky(79). What is intriguing is that our procedures generate first-order stochastic dominance violations on their own.
We next apply our anomaly generation procedures to a publicly available dataset on real lottery choices. We construct a predictive algorithm that accurately predicts choice rates, and we then generate anomalies for expected utility theory implied by this estimated predictive algorithm. We produce 881 anomalies over menus of two-payoff lotteries and 1{,}996 anomalies over menus of three-payoff lotteries.
We revisit the Choices13K dataset collected in PetersonEtAl(21)-MLforChoiceTheory. Choices13K consists of over 1 million decisions made over 13,006 randomly sampled menus of lotteries. We focus on the 9,831 lottery menus in Choices13K that do not involve ambiguity nor correlation in the payoff structure between lotteries in a menu. For each menu $i$, we observe the fraction of all choices that selected Lottery 1 denoted $Y_i \in [0, 1]$ and the menu $X_i = \left( p_{i,0}, z_{i,0}, p_{i,1}, z_{i,1} \right)$.
We train a shallow neural network (2 hidden layers with 32 nodes per layer) to predict choice rates $Y_i$ based on the lotteries $X_i$. We randomly select 8,831 lottery menus for training the neural network, and evaluate the resulting predictive algorithm $\widehat{f}^*$ on the remaining 1,000 held out lottery menus. On the held out lottery menus, our constructed predictive algorithm $\widehat{f}^*$ achieves a mean square error of approximately 0.014, which meaningfully improves over expected utility theory and is competitive with the best architecture in PetersonEtAl(21)-MLforChoiceTheory.
What does the predictive algorithm $\widehat{f}^*$ imply about lottery choice behavior? To answer this question, we generate anomalies for expected utility theory implied by $\widehat{f}^*$, following the same steps as in Section (ref). We generate anomalies for expected utility theory over the space of menus of two-payoff lotteries and menus of three-payoff lotteries, applying our adversarial procedure and example morphing procedure to the constructed black box predictive algorithm $\widehat{f}^*$ and randomly initialized menus of either two-payoff or three-payoff lotteries. We numerically verify whether each returned menu is an anomaly for expected utility theory at any increasing utility function and without noisy choices. We report all resulting numerically verified anomalies for expected utility theory.
Our procedures generate 881 anomalies for expected utility theory over menus of two-payoff lotteries implied by the predictive algorithm $\hat{f}^*$. We apply the same categorization based on the particular violation of expected utility theory they highlight, which we developed in Section (ref). The results are summarized in Table (ref), and there are two findings worth highlighting.
First, our procedures generate many first order stochastic dominance violations implied by the predictive algorithm. This is unsurprising; first order stochastic dominance violations are common in Choices13K and occur on 14% of all lottery menus PetersonEtAl(21)-MLforChoiceTheory. Our procedures appear to generate the frequency of first order stochastic dominance violations in the dataset. Second, all other generated anomalies illustrate choice reversals across menus of two-payoff lotteries. As discussed in Section (ref), the dominated consequence effect is a generalization of the Common ratio effect. They additionally generate the new categories (i.e., the reverse dominated consequence effect and the strict dominance effect). Using a publicly available dataset on real lottery choices, our algorithms successfully generate known anomalies and novel anomalies for expected utility theory over two-payoff lotteries.
Our procedures generated 1,996 anomalies for expected utility theory over menus of three-payoff lotteries implied by the predictive algorithm $\widehat{f}^*$. We illustrate two strategies for interpreting these generated anomalies: first, a theory-driven numeric categorization as before; and second, an empirical clustering based on features of the anomalies.
\paragraph{Theory-driven categorization of anomalies:} We first categorize the anomalies over menus of three-payoff lotteries based on the violation of expected utility theory they highlight. It is simple to check numerically whether an anomaly in menus of three-payoff lotteries constitutes a first-order stochastic dominance (FOSD) violation. We find that 1,640 of our generated anomalies are first order stochastic dominance violations. Given the frequency of first order stochastic dominance violations in Choices13K mentioned earlier, it is unsurprising that our procedures automatically generate a large number of them.
Another category that is simple to check numerically is whether any generated pair of menus can be represented as compound lotteries over the same underlying simpler, two-payoff lotteries. A predicted choice reversal across such a pair would indicate a possible violation of the independence axiom. Table (ref) provides an example of algorithmically generated menus in this category. The predictive algorithm $\widehat{f}$ predicts individuals would be likely to select lottery A1. This could be plausibly driven by risk aversion, since lottery A1 appears to be the “safer” option relative to lottery A0. Yet the predictive algorithm $\widehat{f}$ predicts that individuals would also be likely to select lottery B0, which appears to be the riskier (higher variance) lottery in Menu B.
The lotteries in menu A and menu B can be re-written as compound lotteries over the same two-payoff lotteries. Figure (ref) illustrates the decomposition, where lotteries A0 and B0 are compound lotteries over the same two-payoff lotteries (with mixing probabilities $\alpha_{A0} > \alpha_{B0}$), and similarly lotteries A1 and B1 are compound lotteries over the same two-payoff lotteries (with mixing probabilities $\alpha_{A1} < \alpha_{B1}$). The oddity is now clear: Lottery B1 raises the mixing probability on the dominating two-payoff lottery relative to lottery A1, yet lottery B0 raises the mixing probability on the two-payoff lottery with a lower expected value relative to lottery A0. The change in the mixing probabilities from menu A to menu B would appear to have made lottery 1 better and lottery 0 worse, yet choices flip.
The structure of this anomaly is also a more general pattern that we can search for. We can check whether the lotteries in menu A and menu B can be rewritten as compound lotteries over the same two-payoff lotteries, where one of those two-payoff lotteries strictly dominates another. Across the menus, we can then examine whether the predicted choice changes in the opposite direction relative to the change in the mixing probability placed on the dominating lottery (see Appendix (ref) for discussion). We generate 132 anomalies with this structure (Appendix Table (ref) provides additional examples).
\paragraph{Empirical clustering of anomalies:} In addition to using our knowledge of expected utility for categorization, we further provide an empirical organization of our algorithmically generated anomalies. We focus on the 356 anomalies that do not violate first-order stochastic dominance. For each menu of two lotteries, we construct a feature vector that summarizes the comparison between the lottery predicted to be chosen and its alternative. The features include, for example, differences in expected value, payoff variance, payoff range, and probability range. We then cluster the anomalies using $K$-means, and we summarize the feature space by calculating principal components. Further details are provided in Appendix (ref).
Figure (ref) visualizes each anomaly in the space spanned by the first two principal components and overlays the cluster groups. The clusters occupy the four quadrants with modest overlap, providing a coarse partition of the anomalies. To better interpret these axes, Figure (ref) reports the largest loadings for each component by magnitude. The first principal component loads heavily on the difference in payoff dispersion between lotteries --- especially the payoff variance. Variation along the first principal component suggests these are anomalies that are engineered to manipulate classic risk considerations. The second principal component loads on the probability compositions of the lotteries -- particularly differences in the range and extreme probabilities across the menus. Variation along the second principal component suggests these are anomalies that manipulate the salience of probabilities that are not well captured by the expected value and variance of the payoffs.
When applied to a predictive algorithm, our procedures generate novel anomalies for expected utility theory over menus of two-payoff lotteries and three-payoff lotteries. But do individuals violate expected utility theory as predicted? Answering this question is where our procedures end, and the careful experimental work needed for the empirical testing of anomalies begins.
We randomly selected 30 algorithmically generated anomalies for expected utility theory summarized in Table (ref) over lotteries with two monetary payoffs. These anomalies were sampled to span the categories (i.e., the dominated consequence effect, the reverse dominated consequence effect, and the strict dominance effect). We also randomly selected 30 algorithmically generated anomalies over lotteries with three-payoffs sharing the particular structure we highlighted in Section (ref). We recruited respondents on Prolific to make incentivized choices on these anomalies in surveys. See Appendix (ref) for the design of these online surveys. Altogether, we recruited 258 and 266 respondents on our two surveys of anomalies over lotteries with two monetary payoffs, and 260 and 263 respondents on our two surveys of anomalies over three monetary payoffs.
We find strong evidence that the pooled respondents' choices are inconsistent with expected utility theory across our algorithmically generated anomalies. Figure (ref) and Figure (ref) reports the fraction of respondents whose choices violate expected utility theory on our algorithmically generated anomalies over two-payoff lotteries and three-payoff lotteries respectively. Appendix Table (ref) provides summary statistics on the expected utility theory violation rates, pooling across our algorithmically generated anomalies. On our anomalies over two-payoff lotteries, the pooled expected utility theory violation rate is 11.4% (p-value $<0.001$) on dominated consequence effect anomalies, 8.5% (p-value $<0.001$) on reverse dominated consequence effect anomalies, and 12.7% (p-value $<0.001$) on strict dominance effect anomalies. On our anomalies over three-payoff lotteries, the pooled expected utility theory violation rate is 7.2% (p-value $<0.001$).
These pooled estimates mask heterogeneity in the fraction of respondents violating expected utility theory across anomalies. More than 15% of respondents' choices violate expected utility theory on several strict dominance effect anomalies over two-payoff lotteries as well as several of our anomalies over three-payoff lotteries. Applying a conservative Bonferroni correction for multiple hypotheses across all anomalies over two-payoff lotteries in our surveys, the expected utility theory violation rate is statistically different than zero at the 5% level for 26 out of 30. On our anomalies over three monetary payoffs, the expected utility theory violation rate is statistically different than zero at the 5% level for 22 out of 30 (after Bonferroni correction).
We compare our generated anomalies against known anomalies in the behavioral economics literature. Several recent papers provide meta-analyses of past experiments and conduct comprehensive experimental designs to systematically evaluate the Allais paradox, the common ratio effect, and the certainty effect. BlavatskyyEtAl(22)-RobustnessOfAllais find that 16% of respondents' choices demonstrate the Allais paradox (“fanning out” choices), and the median experiment with real financial incentives finds that 13.7% of respondents' choices do so. McGranahanEtAl(23)-CommonRatio find that 15.6% of respondents' choices demonstrate the common ratio effect and 12.9% demonstrate the reverse common ratio effect in experiments conducted on Prolific with real financial incentives. JainNielsen(23) find that 8.3% of subjects display the certainty effect with financial incentives. In this light, our algorithmically generated anomalies yield expected utility theory violation rates in line with known anomalies like the Allais paradox and the common ratio effect.
We develop procedures to generate anomalies for an existing theory from predictive algorithms. Our procedures contrast the theory with the predictive model, searching for minimal examples on which the theory cannot explain the black box's predictions. Because supervised learners often uncover signals researchers miss, these anomalies are natural targets for new data collection and formal misspecification tests. A two-step workflow recurs throughout the development of economic theory --- researchers first generate anomalies and then collect data to rigorously test them. Our framework hopefully illustrates that this first step of anomaly generation can be modeled, and as a result we can build procedures to accelerate this process.
We expect anomaly generation to be valuable when two conditions hold: there is ample data to form predictions about an observed outcome; and the theory is a tool for prediction about that same outcome. Our illustration to choice under risk meets both these conditions: there exists large datasets of choices between risky lotteries, and expected utility theory makes sharp predictions about what choices are possible. Other important economic domains fit these conditions as well, such as discrete choice models, choice under ambiguity, and strategic interactions. When these two conditions are met, it is natural to ask: what is implied by predictive algorithms that would conflict with the theory? Anomaly generation procedures are suited to help answer that question.
There are many promising avenues for further work. We placed no constraints on the feature space over which our procedures optimized; adding restrictions (e.g., only search over round numbers) could yield more interpretable anomalies. As mentioned, an active literature in adversarial learning offers many gradient-based methods MokhtariEtAl(20), RazaviyaynEtAl(20), and specific techniques from interpretability and explainability may be adapted for anomaly generation Molnar(25). Our evaluation metrics provide a common yardstick for future comparisons. Finally, our empirical testing collects new data on algorithmically generated anomalies; this mirrors holdout evaluations in supervised machine learning. While feasible in many settings, it is worth exploring whether uncertainty quantification for the predictive algorithm $\widehat{f}^*$ can be directly translated into tests of the generated anomalies. More broadly, it is our hope to spur interest in this overlooked step in theory development.
\singlespacing
\subfile{Supplement-Sept2025}