Humans and animals have a unique capacity to generalize and learn in novel circumstances, including "0-shot" inference (ZI) and continual learning (CL) -- two powerful cognitive abilities. Despite this importance, efforts to model ZI and CL are seriously limited in several ways. First, existing models typically lack components critical to ZI and CL in the brain, namely, strong inductive biases (for ZI) and autonomous control of learning (for CL). Second, models can be less tractable to analysis if model components are overly complex (lacking simplicity), or too task-restricted if model components are overly bespoke (lacking expressivity). Here we introduce autonomous Hebbian networks ("AutoHebb"), a class of online learning feedforward neural networks that realize strong inductive biases and autonomously controlled learning, and are both simple and expressive. Unlike standard models that learn via externally controlled optimization (e.g. gradient descent), AutoHebb networks combine external feedback with internally generated activity to produce a global learning signal ('neuromodulator') fed back to the network. The neuromodulator in turn gates a biologically grounded local learning rule (3-factor Hebbian rule) that updates networks' plastic weights. Using meta-learning to search for fixed (non-plastic) weights, we find that AutoHebb networks (1) succeed on ZI tasks, (2) show emergent (untrained) ZI/CL abilities, (3) admit reverse-engineering into explicit algorithms, and (4) outperform modern learning models on ZI/CL tasks. Lastly, performance comparisons to related models implied an essential role for three model components: meta-learning, Hebbian plasticity, and autonomous control of learning. These findings indicate that AutoHebb may be useful in hypothesis generation, analysis, and discovery of biologically grounded forms of learning and generalization.
Figures & tables
Figure 1: AutoHebb architecture . Network weights ( W ) are either fixed (black) or plastic (red). The architecture consists of a "main" network (here an MLP with hidden layers h ) and an auxiliary "control" network (here an MLP with hidden layers c ) that receives two inputs: (1) internally generated activity from the main network (here from last hidden layer hlast ), and (2) external input reflecting environmental (external) feedback given an output ( y ) generated by the network. The control network generates a scalar-valued neuromodulatory signal ( m , red circle) that gates changes to the plastic weights within network (here Wn∗ ). See Appendix E for further details; additional network variants in Figure 16 .
Figure 2: Meta-learning in AutoHebb. In AutoHebb networks, fixed (non-plastic) network weights were identified through meta-learning optimization, which involves two levels of adaptation: an "inner" and "outer" loop. In the inner loop, corresponding to learning, (3-factor Hebbian) plastic updates to the network occur across an episode, i.e. a sequence of trials (where each trial involves input, output, control, and update steps; see main text). At the start of each episode, fixed weights are frozen and plastic weights are set to 0. In the outer loop, corresponding to meta-learning (or meta-training), the network’s fixed weights are updated via optimization based on performance within the episode and/or testing following the episode.
Figure 3: Task items and trial structure. In the present study, a given task involves a set of items (item panel) that correspond to arbitrary sensory stimuli, such as fractal images. Trials consist of four steps: (1) presentation of two items (input), (2) generation of a binary output (e.g. choose item 1 vs. 2) by the model or participant (output), (3) generation of a learning control signal by the model or participant upon receiving external feedback from the environment (e.g. cash reward) (control), and (4) a learning or plasticity update (update), as governed by the control signal.
Figure 4: Transitive inference (TI) task and performance of representative models. TI tests 0-shot inference (ZI) of ranking. a , Task schematic. Items (A to H) belong to an unseen underlying ranking, and a pair of items are presented in each trial. In training trials, only adjacent items are presented; in test trials, non-adjacent items are presented; inferential (infer) trials are test trials that do not contain the first or last item. b , Average model output after training trials. c , Model performance by trial type. Trial types (item pairs) are grouped based on the difference in rank between items ("symbolic distance" Jensen (2017) ; Jensen et al. (2019) ). Solid lines and shaded regions represent the mean and IQR, respectively. Example outputs across all models in Figures 17 and 18 . Model performance across all models reported in Table 1 .
Figure 5: Transitive equivalence (TE) task and performance of representative models. TE tests 0-shot inference (ZI) of grouping. a , Task schematic. Items (A, B, C, etc.) belong to multiple unseen underlying groups (e.g. ABC and JKL), and pairs of items are presented in each trial. In training trials, particular item pairs are omitted both within- (e.g. AC and CA) and across- (AL and LA) group: these item pairs are testing trials, here equivalent to inferential (infer) trials. b , Average model output after training trials. c , Model performance across trial types. Trial types (item pairs) are separated based on same group (choice 1) or different group (choice 2). Example outputs across all models in Figure 19 . Model performance across all models reported in Table 1 .
Model
TI
TE
MAML Finn et al. (2017)
0.697±0.025
0.502±0.010
Reptile Nichol et al. (2018)
0.744±0.012
0.509±0.010
MER Riemer et al. (2019)
0.500±0.009
0.495±0.002
OML Javed and White (2019)
0.603±0.015
0.503±0.003
FLP Lindsey and Litwin-Kumar (2020)
0.845±0.011
0.504±0.002
ANML Beaulieu et al. (2020)
0.702±0.011
0.831±0.005
Table 1: Model performance on two ZI tasks: TI and transitive equivalence TE tasks. Best scores are bolded . Both AutoHebb models outperform all other methods on TI and TE. Among other models on TI, MAML, Reptile, ANML, FLP, and 2F-ABCD methods show viable performance on TI, whereas MAML, OML, and 2F-A perform relatively poorly. On TE, apart from Autohebb, ANML, 2F-A, and 2F-ABCD show strong performance, while all other models do not perform above chance. Trial type-based breakdowns of TE performance are reported in Table 4 .
Model
TI-L
TE-L Original
TE-L New Item
TE-L Total
MAML Finn et al. (2017)
0.621±0.035
0.498±0.006
0.501±0.005
0.500±0.005
Reptile Nichol et al. (2018)
0.726±0.008
0.510±0.009
0.500±0.003
0.505±0.005
MER Riemer et al. (2019)
0.504±0.011
0.499±0.008
0.493±0.014
0.496±0.004
OML Javed and White (2019)
0.663±0.015
0.501±0.017
0.509±0.012
0.505±0.012
FLP Lindsey and Litwin-Kumar (2020)
0.761±0.020
0.500±0.009
0.497±0.014
0.499±0.004
ANML Beaulieu et al. (2020)
0.601±0.017
0.816±0.012
0.736±0.013
0.776±0.011
Table 2: Model performance on two CL tasks: TI-L and TE-L. Best scores are bolded . TE-L Original corresponds to ZI performance on the originally presented groups after the networks are shown the new item. TE-L New Item is the ZI performance on all test trials that have the new item as one input. TE-L Total is the equal-weighted average of the two scores. On TI-L, both AutoHebb models (AH-1NM and AH-2NM) outperform all other models. Both 2-factor models (2F-A, 2F-ABCD) and FLP also show successful linking. On TE-L, both AutoHebb models outperform on both the original TE task (TE-L Original) after being presented the linking trial, as well as the linking task (TE-L New Item), with AH-1NM slightly outperforming AH-2NM. Among other models, ANML shows the strongest linking ability. Trial type-based breakdowns of TE performance are reported in Table 5 .
Figure 6: Two continual learning (CL) tasks and performance of representative models. a and c , Task schematics. Each task (TI-L and TE-L) is based on the ZI tasks TI and TE, respectively, and tests 0-shot inference following presentation of a new item pair (new input; diagramed in green). In TI-L, also known as "list-linking" Treichler and Van Tilburg (1996) ; Nelli et al. (2023) ; Miconi and Kay (2025) , the item pair is a "linking pair" (here DE or ED) that connects separate previously learned rankings (here A to D and E to H). In TE-L, the new input is an item pair (here CD/DC) containing a novel item (here D) and previously presented item (here C). Note that both tasks test the ability to perform structure-sensitive transfer to items beyond that of the new item pair. b and d , Average model output (across all item pairs) following presentation of the new item pair. See Figures 17 and 18 for example outputs across all models. Model performance across all models reported in Table 2 .
TI → TE
TE → TI
Model
TI
TE
TI
TE
MAML Finn et al. (2017)
0.545±0.010
0.518±0.003
0.552±0.008
0.517±0.009
Reptile Nichol et al. (2018)
0.585±0.030
0.517±0.006
0.614±0.034
0.525±0.008
MER Riemer et al. (2019)
0.500±0.006
0.495±0.005
0.502±0.005
0.503±0.010
OML Javed and White (2019)
0.502±0.007
0.502±0.005
0.513±0.010
0.505±0.007
FLP Lindsey and Litwin-Kumar (2020)
0.498±0.006
0.502±0.004
0.490±0.009
0.502±0.008
Table 3: Model performance on multi-task ZI: TI → TE and TE → TI. Best scores are bolded . EWC, SI, A-GEM, and DER are non-meta-learning methods. AutoHebb with two neuromodulators (AH-2NM) is the only model that can continually learn multiple ZI tasks. While ANML shows reasonable performance overall, Table 6 it only performs chance on ZI trials when items belong to the same group. Of the meta-learning models, 2F-A, 2F-ABCD, and AH-1NM show good TI performance in the TI → TE direction. Of the non-meta-learning methods, A-GEM shows strong performance on TI in the TI → TE direction while all other tasks remain at chance performance. Trial type-based breakdowns of TE performance are reported in Table 6 . ∗ Only 3 runs are reported.
Figure 7: Multi-task 0-shot continual learning: model setup, tasks, and performance. Left, schematic of meta-learning and learning modeling procedure. Models were meta-trained on episodes in which 2 to 4 TI and TE tasks (i.e. having different randomly generated items) were serially presented and with variable numbers of trials. Models were then presented with a random sequence of 10 TI and TE tasks at evaluation. Right, performance of models at testing (mean ± 2 s.e., n=100 task sequences). Full details are in Appendix F.4 .
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 8: Anti-correlative relationship between item 1 and item 2 weights in the first layer of an AutoHebb TI model.
Figure 9: TI length generalization with 14 items. Plots follow the format based on Figure 4 , where item pairs (on x-axis) are grouped and organized from left to right with increasing symbolic distance. Each model was meta-trained on 8 items (left) and subsequently evaluated (after meta-training) on 14 items (right). Note that ANML and OML show near-chance performance on many inferential trial types (item pairs) except for item pairs with larger symbolic distances. AutoHebb is the only method with above chance performance on all inferential trial types.
Figure 10: TI length generalization with 20 items. Plots follow the format based on Figure 4 , where item pairs grouped from left to right with increasing symbolic distance. All models are meta-trained on only 8 items (see Figure 9 , left) and evaluated on 20 items. Note that ANML and OML show relatively weaker performance than AutoHebb on inferential trials, though on this more difficult task AutoHebb chance performance on some inferential trials, indicating limitation in length generalization and/or memory capacity (e.g. compare to 14 items Figure 9 ).
Figure 11: Summary plot of length generalization in TI (8 to 20 items). Performance shown for inferential ("0-shot" inference) trials only. AutoHebb consistently outperforms OML and ANML across all numbers of items.
Figure 12: Length generalization on TE with respect to numbers of items per group. Top: Heatmaps show average model choices (1 for same group, 2 for different group, see Figure 5 ), from 3 items per group to 6 items per group (left to right). In contrast to OML and ANML, AutoHebb generalizes to 4 items per group, though has limited ability on more than 4 items. Bottom: accuracy (calculated the same way as in Section 4.1 ) and F1 plots, where F1 is computed for same-group ZI trials.
Figure 13: Length generalization on TE with respect to numbers of groups. Top: Heatmaps show average model choices (1 for same group, 2 for different group, see Figure 5 ), from 3 groups of 3 items to 6 groups (left to right). AutoHebb shows successful ZI ability up to 6 groups. Notably, though ANML shows weaker generalization up to 5 groups, its overall accuracy outperforms the other two models after 6 groups. Generally, AutoHebb maintains its same-group ZI ability while its different-group accuracy decays, even for training trials. In contrast, ANML maintains its different group bias and loses its same group accuracy, even on training trials. These behaviors suggest different underlying inductive biases, as would be expected given the models’ different architecture and learning rules. OML has similar behavioral bias as ANML, though OML cannot infer on same-group trials at any group size. Bottom: accuracy (calculated the same way as in Section 4.1 ) and F1 plots, where F1 is computed for same-group ZI trials.
Figure 14: Performance of three representative models on TI before vs. after overexposure of a single trial type (item pair DE). Plot follows the format of Figure 4, where trial types are ordered by symbolic distance. (Left) Performance after the standard 20 training trials are shown, (Middle) Performance after an additional 40 trials of DE are shown, (Right) Performance after an additional (from standard training trials) 100 trials of DE are shown. Results are averaged over 100 episodes with 2 s.e. bands. Note that for OML and AMNL, several trial types approach (or reach) chance performance, indicating lack of robustness to the overexposure manipulation; in contrast, AutoHebb trials remain well above chance.
Figure 15: Neuromodulator in AutoHebb network during overexposure to single trial type (item pair DE). The x-axis shows the trial index of the repeat presentation of item pair DE. Note that the neuromodulator is fully suppressed after approximately 20 trials. Results are averaged over 100 episodes, and show mean ± 2 s.e.
Figure 16: AutoHebb networks benchmarked in the present study: 1- and 2-neuromodulator AutoHebb (AH-1NM and AH-2NM). For both models, the main network was chosen to be a multi-layer perceptron (MLP) with four hidden layers; the models differed by the number of neuromodulators (and corresponding control network; in the 2-neuromodulator network, the control networks were parallel, as diagrammed). AH-2N is loosely inspired by the existernce of multiple neuromodulatory systems in the brain, and was included in benchmarking to evaluate the possibility that parallel neuromodulated plastic architecture would enhance task performance. Note that each set of plastic weights at a given layer in the 2-neuromodulator network were summed (Eq. 18 ). Top, AH-1N, Bottom, AH-2NM. Note that additional AutoHebb networks were also investigated in this study, and are indicated accordingly were applicable. Implementation details can be found in Appendix E .
Figure 17: TI and TI-L tasks: model performance by trial type. Plots follow the convention in Figure 4 c, where within each plot, trial types (item pairs) are organized by symbolic distance. Plotted are model outputs for an example model instance for each indicated model. Note that on TI-L, various models such as MAML, Reptile, OML, ANML show overtly inconsistent performance across trial types, in contrast to FLP, 2F-A, 2F-ABCD, AH-1NM, and AH-2NM.
Figure 18: TI and TI-L tasks: average model outputs. Plots follow the convention in Figures 4 and 6 . Plotted are model outputs for an example model instance for each indicated model.
Figure 19: TE and TE-L tasks: average model outputs. Plots follow the convention in Figures 5 and 6 . Plotted are model outputs for an example model instance for each indicated model.
Model
Diff-group
Same-group
MAML [ 51 ]
0.731±0.010
0.273±0.024
Reptile [ 69 ]
0.822±0.042
0.196±0.043
MER [ 71 ]
0.948±0.008
0.042±0.011
OML [ 70 ]
0.929±0.007
0.077±0.008
FLP [ 73 ]
0.820±0.015
0.187±0.018
ANML [ 72 ]
0.959±0.006
0.703±0.008
Appendix
Table 4: Model performance on TE by trial type (See Figure 5 a). Note that models generally show a bias to output "different" by default on the task, resulting in high performance on different-group trials.
TE-L Original
TE-L New Item
Model
Diff-group
Same-group
Diff-group
Same-group
MAML [ 51 ]
0.273±0.015
0.724±0.020
0.066±0.005
0.935±0.011
Reptile [ 69 ]
0.273±0.059
0.748±0.057
0.109±0.037
0.890±0.039
MER [ 71 ]
0.505±0.159
0.493±0.156
0.478±0.153
0.508±0.167
OML [ 70 ]
0.763±0.014
0.240±0.024
0.636±0.020
0.381±0.035
FLP [ 73 ]
0.753±0.039
0.247±0.037
0.693±0.036
0.302±0.039
Appendix
Table 5: Model performance on TE-L by trial type (See Figure 6 c). Results are separated into "Original" trials – ZI trials involving only the three originally -presented groups as shown in Figure 5 a – and "New Item" trials – ZI trials involving the new item and items not seen during the linking phase of training as shown in Figure 6 c. In contrast to Table 4 , the linking trials reduce the bias towards predicting "different" on TE-L Original trials and, in some cases, improve the models’ predictions. However, the majority of models have chance or below chance on one category of the TE-L New Item trials.
TI → TE
TE → TI
Model
Diff-group
Same-group
Diff-group
Same-group
MAML [ 51 ]
0.765±0.014
0.271±0.016
0.735±0.012
0.299±0.016
Reptile [ 69 ]
0.856±0.006
0.177±0.015
0.809±0.008
0.241±0.022
MER [ 71 ]
0.845±0.013
0.145±0.012
0.623±0.023
0.382±0.036
OML [ 70 ]
0.954±0.009
0.050±0.005
0.899±0.004
0.111±0.012
FLP [ 73 ]
0.953±0.011
0.050±0.010
0.745±0.032
0.259±0.031
Appendix
Table 6: Model performance on multi-task ZI on TE, by task order and trial type (See Figure 5 a). Note a strong different-group bias appears for all models in both task orders (TI to TE and TE to TI). ∗ Only 3 runs are reported.
Signal Processing Research Centre, Tampere University, Tampere, Finland · Department of Electronics, Information and Bioengineering (DEIB), Politecnico di Milano, Italy