Table of Contents
Fetching ...

Human-like Category Learning by Injecting Ecological Priors from Large Language Models into Neural Networks

Akshay K. Jagadish, Julian Coda-Forno, Mirko Thalmann, Eric Schulz, Marcel Binz

TL;DR

This work leverages large language models to generate ecologically valid category-learning tasks and trains a memory-based, transformer-driven meta-learning model (ERMI) to learn Bayes-optimal inference on those tasks. ERMI closely matches human learning patterns, including task difficulty, exemplar-based strategy shifts, and generalization, while also achieving state-of-the-art results on OpenML-CC18 benchmarks. The results support ecological rationality as a practical framework for cognitive modeling and demonstrate scalable methods to study human-like learning and improve real-world classification. Overall, the approach provides a principled bridge between ecological priors, human cognition, and machine learning performance across domains.

Abstract

Ecological rationality refers to the notion that humans are rational agents adapted to their environment. However, testing this theory remains challenging due to two reasons: the difficulty in defining what tasks are ecologically valid and building rational models for these tasks. In this work, we demonstrate that large language models can generate cognitive tasks, specifically category learning tasks, that match the statistics of real-world tasks, thereby addressing the first challenge. We tackle the second challenge by deriving rational agents adapted to these tasks using the framework of meta-learning, leading to a class of models called ecologically rational meta-learned inference (ERMI). ERMI quantitatively explains human data better than seven other cognitive models in two different experiments. It additionally matches human behavior on a qualitative level: (1) it finds the same tasks difficult that humans find difficult, (2) it becomes more reliant on an exemplar-based strategy for assigning categories with learning, and (3) it generalizes to unseen stimuli in a human-like way. Furthermore, we show that ERMI's ecologically valid priors allow it to achieve state-of-the-art performance on the OpenML-CC18 classification benchmark.

Human-like Category Learning by Injecting Ecological Priors from Large Language Models into Neural Networks

TL;DR

This work leverages large language models to generate ecologically valid category-learning tasks and trains a memory-based, transformer-driven meta-learning model (ERMI) to learn Bayes-optimal inference on those tasks. ERMI closely matches human learning patterns, including task difficulty, exemplar-based strategy shifts, and generalization, while also achieving state-of-the-art results on OpenML-CC18 benchmarks. The results support ecological rationality as a practical framework for cognitive modeling and demonstrate scalable methods to study human-like learning and improve real-world classification. Overall, the approach provides a principled bridge between ecological priors, human cognition, and machine learning performance across domains.

Abstract

Ecological rationality refers to the notion that humans are rational agents adapted to their environment. However, testing this theory remains challenging due to two reasons: the difficulty in defining what tasks are ecologically valid and building rational models for these tasks. In this work, we demonstrate that large language models can generate cognitive tasks, specifically category learning tasks, that match the statistics of real-world tasks, thereby addressing the first challenge. We tackle the second challenge by deriving rational agents adapted to these tasks using the framework of meta-learning, leading to a class of models called ecologically rational meta-learned inference (ERMI). ERMI quantitatively explains human data better than seven other cognitive models in two different experiments. It additionally matches human behavior on a qualitative level: (1) it finds the same tasks difficult that humans find difficult, (2) it becomes more reliant on an exemplar-based strategy for assigning categories with learning, and (3) it generalizes to unseen stimuli in a human-like way. Furthermore, we show that ERMI's ecologically valid priors allow it to achieve state-of-the-art performance on the OpenML-CC18 classification benchmark.
Paper Structure (69 sections, 12 equations, 13 figures, 7 tables)

This paper contains 69 sections, 12 equations, 13 figures, 7 tables.

Figures (13)

  • Figure 1: LLM generates ecologically valid category learning tasks: Mean task performance of the logistic regression model measured over trials (first column). Histogram of Pearson's correlation coefficients computed between pairs of features (second column). Histogram of Gini coefficients computed over the logistic regression weights (third column). Linearity of the category learning task (fourth column) computed for (a) 28 different real-world binary classification tasks from the OpenML-CC18 benchmarking suite (b) ecologically valid category learning tasks generated from Claude-v2 and (c) synthetic category learning tasks derived using the Bayesian logistic regression prior that were used to train the meta-learned inference (MI) model (d) synthetic category learning tasks with nonlinear decision boundary derived using the Bayesian neural network prior that were used to train prior-fitted networks (PFN) model.
  • Figure 2: ERMI shows human-like learning difficulties: (a-c) Average error probabilities for each task type in each block of 16 trials for (a) humans, (b) ERMI, and (c) MI. (d) The posterior model frequency of participants' choices in the Badham2017-hc study for eight computational models. Human data in (a) was reproduced from Table 1 in Nosofsky1994-hw. ERMI and MI were simulated on type 1-6 tasks for 50 runs with the inverse temperature that resulted in the lowest mean-squared error compared to humans, which was $\beta=0.4$ for ERMI, and $\beta=0.9$ for MI.
  • Figure 3: ERMI becomes more exemplar-based with learning: (a-c) The average error of exemplar- and prototype-based models fitted to (a) human choices, (b) simulated choices from ERMI, and (c) simulated choices from MI for each block of 56 trials. (d) The posterior model frequency of participants’ choices in the devraj2021dynamics study for seven computational models. Human data in (a) was reproduced from smith1998prototypes. ERMI and MI were simulated using inverse temperature values fitted to participants' choices in devraj2021dynamics. The mean of the fitted inverse temperature and its standard error were $0.09 \pm 0.01$ for ERMI and $0.17 \pm 0.02$ for MI, respectively. The shaded region shows the standard error of the mean.
  • Figure 4: ERMI displays human-like generalization:(a-c) Average categorization probabilities of transfer stimuli T1-T7 for (a) humans (b) ERMI (c) MI. (d) The encoding scheme used for the seven transfer stimuli. Human data in (a) was reproduced from Johansen2002-xe. ERMI and MI were simulated on the same experiment for 77 runs, with inverse temperature settings that resulted in the lowest mean-squared error compared to humans, which was $\beta=$ 0.9 for ERMI, and $\beta=$ 0.1 for MI.
  • Figure 5: Frequency of different features in claude-v2 synthesized category learning tasks: Counts for the top-50 most frequently occurring task features in the 23421, 20690, and 13693 category learning tasks generated for three (a), four (b), and six-dimensional features respectively.
  • ...and 8 more figures