Manuscript Offprint

arXiv:2610.11534

HAND: A Biologically-Inspired Activation Function that Improves Generalisation and Sample Efficiency in Image Classification

Michael W. Spratling, Heiko H. Schütt

Abstract

DNNs exhibit robustness and generalisation issues not seen in humans. They are also far less data-efficient learners, requiring considerably more training samples to accurately classify novel exemplars. Inductive bias could help with these issues by providing in-built mechanisms to improve generalisation, and hence, reduce reliance on learning from data. We incorporate a biologically-inspired inductive bias into a new activation function, HAND (Homeostasis, Accelerating Nonlinearity, and Divisive-normalisation), and show its effectiveness with CNNs trained on image classification. Using HAND a ConvNeXt-tiny required 25 training epochs to reach the same accuracy on ImageNet1k as the unmodified model achieved after 200 epochs. Consistent with the effects of an inductive bias, the performance gap reduced with training time and increased data augmentation. When the volume of training data was reduced and unevenly distributed between classes (Long-tailed ImageNet) the improvements in accuracy were even larger and did not reduce with increased training time. Generalisation performance with the common-corruptions data, and the ability to reject samples from unknown classes, were unaffected or improved by HAND. Results generalised across CNN architectures and training data-sets. HAND can, therefore, reduce the required training time and/or the required volume and variety of training data, helping to improve sample efficiency.

Keywords: generalisation, data efficiency, inductive bias, competition, class imbalance, robustness, divisive-normalisation, image classification, convolutional neural networks

Code: https://codeberg.org/mwspratling/HAND

1 Introduction

A deep neural network (DNN) of sufficient size can approximate any arbitrary mapping from a set of inputs to a set of outputs (Cybenko., 1989; Hornik, 1991; Hornik et al., 1989; Kidger & Lyons, 2020; Zhang et al., 2017). Hence, given sufficient training samples and time to search for the weights that produce the desired mapping, any image classification problem can be learnt without the need for strong, built-in, inductive biases. Inductive bias may, therefore, have limited influence on the final, optimised, solution learned from large data-sets. However, it can narrow down the range of putative solutions to guide learning towards a good solution in less time and with fewer training samples. Such behaviour would address multiple aims of frugal AI (Girdhar et al., 2025).

Despite these potential advantages, most work in deep learning has aimed to reduce inductive biases: relying on scaling-up (the size of the training data-set, the model, and the computational resources) to bring about improvements in performance. Similarly, most work in frugal AI is focused on enhancing the efficiency of models at inference time rather than the efficiency with which models are learnt (indeed most frugal AI methods increase training inefficiency). In opposition to this overwhelming trend, some have advocated for the introduction of new biologically-inspired inductive biases into DNNs (Celeghin et al., 2023; Hassabis et al., 2017; Linsley et al., 2025; Malhotra et al., 2020; Roy et al., 2024; Zador, 2019; Zhu et al., 2020). However, the only well-known examples of work in this direction modify the first stage of a DNN to simulate the function of the retina (Kim et al., 2015; Stracke et al., 2025), the lateral geniculate nucleus (Bertoni et al., 2022), or V1 (Dapello et al., 2020; Evans et al., 2022; Strisciuglio et al., 2020). The effects of such “front-ends” are limited as they only change one stage out of many, and these effects could alternatively be produced by using an unmodified architecture with appropriate data-augmentations. More effective inductive biases are yet to be proposed.

Here we propose a in-built inductive bias inspired by a fundamental constraint in vision: that only one feature can occupy each individual location in an image. This implies that there should be competition between neurons which represent different interpretations of the same image patch. Neurophysiological evidence suggests that this is the case in the cerebral cortex (Carandini & Heeger, 2011; Lehky et al., 2005; Olshausen & Field, 1997; Tolhurst et al., 2009; Vinje & Gallant, 2000), and computational neuroscience suggests multiple different mechanisms by which this could be achieved (Beyeler et al., 2019; Földiák, 1990; Grossberg, 1987; Harpur & Prager, 1994; Hoyer, 2003; Rozell et al., 2008; Song et al., 2000; Spratling, 2014; Spratling & Johnson, 2001, 2004; Zylberberg et al., 2011). While a number of attempts to add competition to convolutional neural networks (CNNs) have been made in the past (Section 2), it remains missing from popular, contemporary, models. We hypothesised that introducing competition into CNNs would enable better discrimination between distinct patterns, and hence, improve classification accuracy. Furthermore, we expected competition to reduce redundancy by encouraging neurons to represent distinct patterns. Current DNNs contain a high proportion of redundant neurons that serve no useful purpose (Dalvi et al., 2020). This fact is exploited in many methods.

of network pruning (Nowak et al., 2023; Sehwag et al., 2020; Wang et al., 2022), which aim to produce more efficient inference models by removing redundant neurons and/or connections from a pre-trained model. Such post-hoc pruning is inefficient as it relies on a large, redundant, model being trained first. Using competition to reduce redundancy should make more efficient use of the available neurons, without the need for pruning.

To test these hypotheses we designed a new activation function (HAND) that uses divisive-normalisation: a simple competition mechanism that is a canonical computation in neurophysiology (Albrecht & Geisler, 1991; Carandini & Heeger, 1994; Carandini & Heeger, 2011; Heeger, 1991, 1992b; Heeger & Zemlianova, 2020; Wainwright et al., 2001). Our version of divisive-normalisation is applied across the channels to produce competition between neurons sharing the same RF location. HAND was used to replace the standard activation function in different CNN architectures. We evaluated the performance of HAND-based networks to their unmodified baselines using three metrics: accuracy classifying the standard test dataset (“clean accuracy”), accuracy classifying the common corruptions data (“corrupt accuracy”), and ability to reject out-of-distribution samples (“OOD rejection”). We found that HAND typically led to improvements in all three performance metrics. This improvement was largest when the number of parameter updates was limited (i.e., using few training epochs), or the training data was limited in variety (i.e., using few training-time augmentations), or the training data was limited in volume (using reduced and imbalanced data): exactly those conditions in which a useful inductive bias should be most effective. Divisive-normalisation therefore seems to act as an inductive bias that increases data efficiency while maintaining or improving generalisation and robustness.

References (100)

Couldn't load all references. Reload the page to try again.