Manuscript Offprint

arXiv:2608.22154

More accurate behavioral predictions with hybrid Bayesian-connectionist models

Brenden M. Lake, Akshay K. Jagadish, Guangyuan Jiang

Brenden M. Lake 1∗^{1*}, Akshay K. Jagadish 2^{2}, and Guangyuan Jiang 3^{3}

1^{1}Departments of Computer Science and Psychology, Princeton University

2^{2}Princeton AI Lab, Princeton University

3^{3}Department of Brain and Cognitive Sciences, Massachusetts Institute of Technology

*To whom correspondence should be addressed; E-mail: brenden@princeton.edu

Researchers must often choose between Bayesian or neural network models of behavior, two paradigms with complementary strengths and weaknesses. An ideal paradigm would facilitate testing many kinds of representations and inductive biases; Bayesian models make this easy, while neural networks do not. Similarly, an ideal paradigm would avoid over-simplifications; neural networks make this easy, while Bayesian models do not. Here, we introduce Bayesian distillation with Behavioral Tuning (BBT) as an approach to getting the best of both traditions. BBT offers a simple recipe for model building: first, a neural network is trained to mimic a Bayesian model through synthetic data, and second, the network is fine-tuned on human behavior to capture additional structure and nuance. Across four case studies in human concept learning, we find that BBT outperforms traditional approaches at predicting human behavior while also revealing psychological insights, resulting in models that can both mimic Bayesian priors and capture heuristics and biases that violate simple modeling assumptions.

Two major paradigms for cognitive modeling, Bayesian models and neural networks, have historically been in tension (see [1] and [2], respectively, for contrasting reviews). The Bayesian tradition typically follows a top-down approach, in the spirit of Marr's levels of analysis [3]: researchers characterize a computational problem and its ideal solution, which is then compared to human behavior. Often, this involves formulating hypotheses as structured representations (rules, grammars, programs, etc.), priors as probabilistic beliefs over hypotheses, and learning as Bayesian updating of these beliefs [1, 4]. The neural network (also known as connectionist) tradition follows a more emergentist approach [5]: researchers construct systems of simple, interacting processing units and study the representations and behaviors that emerge through learning their connection weights, comparing these emergent behaviors to human behaviors [6, 7, 8]. Often, connectionists consider the kinds of symbolic representations commonplace in Bayesian models as approximate characterizations of more emergent, sub-symbolic processes [2]. Historically, this has led to two different views of the mind (Fig. 1): one emphasizing symbolic representations and strong inductive biases, and one emphasizing sub-symbolic representations and more generic learning mechanisms [1, 2].

These two views have also led to distinct modeling paradigms and toolkits. It is challenging to build models that are not strictly one kind or the other, or that achieve a combination of both paradigms' strengths, leading to tradeoffs. A relative advantage of Bayesian models is the ability to test different kinds of prior knowledge and representations that people may bring to the problem at hand (e.g., rules, programs, or vector spaces [1]); in contrast, traditional neural networks lack an analogous mechanism for examining qualitatively different kinds of representations. Another advantage of Bayesian models, stemming from their use of richer priors, is their human-like ability to learn from just one or a few examples [9, 4, 10]; in contrast, traditional neural networks are notoriously data hungry and can struggle to make meaningful inferences from just a few examples [11], although this characterization is changing with recent

Figure

Figure 1: The Bayesian and connectionist paradigms occupy opposite ends of a spectrum. Our Bayesian distillation with Behavioral Tuning (BBT) approach moves along this spectrum in two stages. First, a neural network is pretrained to mimic a Bayesian model through Bayesian distillation (marked as “start” in the figure). The network is then fine-tuned on human behavioral data, shifting it towards the connectionist end of the spectrum until performance on held-out data plateaus (marked as “stop”). Depending on the nature of the behavioral data, the model may stop anywhere along the spectrum. Note that this is a model-fitting procedure and not a hypothesis about cognitive development.

developments in architecture and pre-training [12, 13].

There are also challenges for Bayesian models that correspond to relative advantages of neural networks. Bayesian models risk oversimplification, both in how hypotheses are represented (e.g., the symbolic rules, grammars, or programs they use may only be first approximations) and through the parametric and independence assumptions used to define priors (e.g., Gaussian, categorical, or uniform distributions), limiting what they can capture about real-world structure. In contrast, neural networks typically rely on more general assumptions and can more flexibly capture the complexity of naturalistic data. (For two case studies, compare the Bayesian models for discovering semantic structure [14] or generating handwritten characters [10] with related neural network approaches in [15] and [16], respectively.) The two approaches also differ in the computational demands of inference: making predictions with many Bayesian models requires averaging over large hypothesis spaces (Eq. 1), which can be intractable or require coarse approximations [17]; in contrast, neural networks are demanding to train, but once trained, making predictions requires only a fast forward pass.

Here, we introduce the Bayesian distillation with Behavioral Tuning (BBT) approach for achieving key advantages of both Bayesian and neural network models of human behavior

Figure

Figure 2: The recipe for BBT modeling involves 1) distilling a Bayesian model into a neural network (via synthetic data from forward sampling; no Bayesian inference required), and then 2) fine-tuning the network on human behavioral data (potentially very limited). During a training “episode”, the network receives a query input xm+1x_{m+1} (here, on the right, the network is queried on a small blue triangle) and a study set (objects XmX_m and labels YmY_m), which are concatenated and presented together as input. The network then produces a predicted query output ym+1y_{m+1} (e.g., “no”) which is compared to a target.

and for building cognitive models that, like cognition itself, do not fall neatly into traditional categories, such as symbolic versus sub-symbolic representations or strong inductive biases versus generic learning processes (Fig. 1). Recent work [18] has proposed meta-learning as a means of bridging these traditions and Marr's levels [3] more generally, allowing neural networks to acquire properties of Bayesian models through synthetic data [19, 20, 18, 21, 22, 23]. BBT builds on this work by introducing a modeling recipe for training powerful, task-specific transformer [24] neural networks from scratch to predict and analyze human behavior, even when the behavioral data is highly limited. The two-stage procedure for building BBT models (shown in Fig. 2) involves 1) specifying the desired prior knowledge and inductive biases as a Bayesian model and distilling them into a neural network through synthetic data, and 2) then fine-tuning that network on human behavioral data to capture additional predictable structure. This recipe allows BBT models to interpolate between modeling paradigms, as illustrated in Fig. 1: the first stage initializes the model as an approximation to a Bayesian model, and the second stage fine-tunes it away from that initialization in a data-driven fashion, adaptively stopping based on the quality of the predictions. We applied BBT to four diverse concept learning domains, including Tenenbaum's Number Game [9], Piantadosi et al.'s complex logical concepts [25], Shepard, Hovland, and Jenkins' classic boolean concepts [26], and Lake and Baroni's compositional instruction learning [20]. Across each of these domains, the resulting BBT models can, like people, express strong prior knowledge, make computationally efficient inferences from just one or a few examples, and demonstrate complex behavior that goes beyond traditional Bayesian modeling assumptions.

A limitation is that although BBT aims to faithfully model human inductive biases, the two-stage model building procedure, which allows BBT to incorporate the traditional strengths of Bayesian models and neural networks while also going beyond them, does not reflect the process by which humans acquire those inductive biases. We conclude with a discussion of how human minds could develop this distinctive set of computational strengths drawn from the two traditional approaches.

Modeling paradigm

In this article, we focus on a family of learning tasks defined by a mapping h∈Hh \in H from inputs xix_i to outputs yiy_i. For instance, hh could be a logical rule, set of rules, or symbolic program. A learner observes a set of input examples Xm=x1,…,xmX_m = x_1, \ldots, x_m (e.g., objects) matched to their corresponding outputs Ym=y1,…,ymY_m = y_1, \ldots, y_m (e.g., category labels), as specified by yi=h(xi)y_i = h(x_i). Given a set of input-output examples for a given task ( XmX_m and YmY_m), a BBT model seeks to predict how a human participant would respond ( ym+1y_{m+1}) to a new input ( xm+1x_{m+1}) (see Fig. 2 right).

The process of developing a BBT model is shown in Fig. 2. Developing a BBT model begins with a Bayesian model. The modeler uses the well-established Bayesian toolkit to specify prior knowledge about the task, or inductive biases they posit humans use to solve the problem. The prior P(h)P(h) defines a hypothesis space h∈Hh \in H and how certain hypotheses should be favored over others. The likelihood P(Ym∣h;Xm)=∏i=1mP(yi∣h;xi)P(Y_m|h; X_m) = \prod_{i=1}^m P(y_i|h; x_i) specifies how the hypotheses hh relate to the input-output transformation, e.g., if hh is a logical rule as in Fig. 2 panel 1, then P(yi=1∣h;xi)P(y_i = 1|h; x_i) could equal 1 when xix_i follows the rule hh and 0 otherwise. It follows through Bayes’ rule that the posterior probability of a hypothesis given the current input-output mappings is P(h∣Ym;Xm)∝P(Ym∣h;Xm)P(h)P(h|Y_m; X_m) \propto P(Y_m|h; X_m)P(h). Finally, relating to what BBT ultimately seeks to predict, Bayesian predictions for the output ym+1y_{m+1} in response to new input xm+1x_{m+1} can be computed as follows (see queries in Fig. 2 for examples),

P(ym+1∣Ym;xm+1,Xm)=∑hP(ym+1∣h;xm+1)P(h∣Ym;Xm)(1)P(y_{m+1}|Y_{m};x_{m+1},X_{m})=\sum_{h}P(y_{m+1}|h;x_{m+1})P(h|Y_{m};X_{m}) \tag{1} ≈fθ(ym+1;xm+1,Xm,Ym),(2)\approx f_{\theta}(y_{m+1};x_{m+1},X_{m},Y_{m}), \tag{2}

a quantity known as the posterior predictive distribution. Computing this quantity requires a (generally intractable) sum over all possible hypotheses hh (Eq. 1). However, as described in the following paragraphs, BBT involves training a neural network (fθ(⋅)f_{\theta}(\cdot); Eq. 2) to approximate Eq. 1 with just a forward pass; importantly, this approximation means that the sum in Eq. 1 does not need to be computed.

Given a Bayesian model, training a BBT neural network follows a two-stage process (Fig. 2). In stage 1 (henceforth “distillation”), the network fθ(ym+1;xm+1,Xm,Ym)f_{\theta}(y_{m+1}; x_{m+1}, X_m, Y_m) with parameters θ\theta is pre-trained to approximate the posterior predictive distribution (Eq. 2; see work on prior-data fitted networks [19]). For the purposes of this article, fθ(⋅)f_{\theta}(\cdot) is a transformer (although other choices are possible) that takes input xm+1,Xm,Ymx_{m+1}, X_m, Y_m (concatenated together and presented simultaneously) and produces a prediction about the output ym+1y_{m+1}. For successful distillation, this network needs episodes sampled from the joint distribution ym+1,xm+1,Xm,Ymy_{m+1}, x_{m+1}, X_m, Y_m for pre-training (an example episode consists of the study set and query in Fig. 2 panel 1). Fortunately, it is straightforward to generate this kind of synthetic data from the Bayesian model by sampling hh from the prior and then sampling input-output pairs ym+1,xm+1,Ym,Xmy_{m+1}, x_{m+1}, Y_m, X_m based on the likelihood. Although producing these forward samples requires specifying the hypothesis space and the corresponding probabilistic model, it does not require posterior probabilities or posterior sampling. Pre-training the network requires many of these sampled episodes (indexed by ii), each of which can be viewed as a mini-task defined by an unobserved h(i)h^{(i)} and a mini-dataset based on observations Xm(i)X_m^{(i)} and Ym(i)Y_m^{(i)}. Because the network is learning (via gradient-based weight updates) how to learn new episodes ii, this can be viewed as a kind of in-context (or memory-based) meta-learning [27, 19, 20, 28]. At test time, all weights are frozen, and thus test-time learning of a new episode is implemented through just the forward propagation of activation patterns, which is distinct from in-weights meta-learning that instead adapts the weights to each new episode through gradient descent [29, 18]. If distillation is fully successful, the neural network would mimic the behavior of the Bayesian model.

The pre-trained network is not the finished product: BBT aims to make more accurate predictions than is possible with standard Bayesian modeling. To achieve this, in stage 2 (henceforth “fine-tuning”; Fig 2), the modeler fine-tunes the network fθ(⋅)f_{\theta}(\cdot) from stage 1 on examples of human behavior. Specifically, the network is updated based on examples of participants responding with an answer ym+1′y'_{m+1} to a query xm+1′x'_{m+1} after observing XmX_m, YmY_m. 1^{1} Although pre-training helps to shape the fine-tuned network, behavioral fine-tuning is not constrained by the original P(h)P(h), the original likelihood P(Ym∣h;Xm)P(Y_m|h; X_m), or even the logic of Bayesian inference. If supported by the human behavior, BBT could change the prior over hypotheses, how hypotheses relate to data, or add new hypotheses including those that defy straightforward symbolic description.

1^{1}One could consider fine-tuning the Bayesian model directly rather than using the proxy network fθ(⋅)f_{\theta}(\cdot). However, this is often infeasible and/or undesirable: the Bayesian quantity Eq. 1 is usually intractable, the neural network is differentiable while the Bayesian model is usually not, and a key purpose of BBT is not to rigidly follow a Bayesian specification.

BBT was implemented by training the same 30 million parameter architecture for all four of the case studies, highlighting the generality of the approach, although some of the training hyperparameters were allowed to vary, as described in Section M.1. The source code is available on GitHub.

References (57)