Submitted:
18 October 2026
Posted:
20 October 2026
You are already at the latest version
Abstract
A general principle governing the performance of deep learning models as a function of the activation function employed has yet to be identified. In this study, it is demonstrated that the two dominant activation families Sigmoidal and ReLU belong to fundamentally diferent thermodynamic regimes. ReLU functions are shown to exhibit a thermodynamic signature absent in sigmoidal activations, giving rise to qualitatively distinct network behavior. The consequences of these regimes for learning dynamics, generalization capability, and the computational cost for both training and recall (inference) phases are revealed. A new thermodynamic interpretation of the infuence of the activation function in deep learning is thereby introduced, and its predictions are supported through benchmarks experiments specifically designed for empirical validation.
Keywords:
deep learning
; thermodynamics of computations
; learning and generalization
1. Introduction
The rectified linear unit (ReLU hereafter) is currently the most widely used activation function in deep learning models. Its tremendous success is principally due to the fact they mitigate the vanishing gradient problem (Bishop, 1995, 2006) that suffer networks composed of units with sigmoidal and hyperbolic tangent activation functions but also because its computational efficiency. Specifically, the ReLU function only requires comparison with zero and max operation whereas sigmoids require exponentials that are computationally expensive, resulting in faster training that is especially important for hardware accelerators (e.g, GPU´s) in large-scale models but also for mobile deployment. Summarizing, gradients propagate much more efficiently in ReLU deep networks resulting in faster convergence and easier training of very deep models enabling modern deep learning breaktroughs (Chinea, 2023).
In this paper, shallow networks with ReLU and sigmoidal activation functions are studied from a statistical mechanics point of view (Chandler, 1987; Chinea, 2023) aimed at understanding their generalization performance and computational costs associated to the learning and recall phases.It is shown that the typical generalization performance is better for ReLU networks compared to sigmoidal networks due to the fact they store lower amounts of energy (i.e., lower geometrical complexity of the loss landscape (Baldassi et al., 2015, 2016, 2019; Chaudhari et al., 2019; Chinea, 2023)) combined with a higher entropy content (i.e., higher information-storage capacity). Surprisingly, as opposed to the common belief, it is also demonstrated that the thermodynamic efficiency (Bennett, 1982; Wolpert, 2020) of ReLU networks is worst compared to sigmoid and hyperbolic tangent networks resulting in higher computational costs during the training phase for the former depending on the number of units employed and/or the input space dimension because of the strong influence of the activation function in the thermodynamic regimes generated in the resulting networks.
2. Model Description
The methodology grounded in statistical physics presented in (Chinea, 2023) is applied to model shallow networks with inputs composed of a single hidden layer of units with a ReLU activation, and an output layer with a single unit with a sigmoidal activation function following an identical notation. The principal idea behind this modelization is to consider deep networks as thermodynamic systems composed of particles (the artificial neurons) under the presence of an external field (the topology of these networks) that affects the degrees of freedom of the physical system (the neural network), and thus the accesible volume of the phase space. Entropy is used to quantitatively estimate the power of any given architecture (information-storage capacity), the internal energy (its potential energy content) is related with the complexity of the loss landscape, whereas the specific heat is quantitatively related with the speed of computations of these models, that is, the thermodynamic efficiency with which information can be processed when emulated in a computer with a Von Neumann architecture (Chinea, 2023).
Furthermore, both the adaptive weights, and the input/outputs of are represented by a finite set of energy states which permits to abstract the two phases of operation of deep learning models together with the particularities of the dataset and/or learning protocol employed. Accordingly, the generating function of energies of a perceptron with inputs , and a shallow network with inputs and units in the hidden layer, and one output unit with a sigmoidal (i.e., ) or hyperbolic tangent unit (i.e., ) reads respectively (i.e., and ):
In both expressions, the threshold that models the effect of the activation function of the neuron is identical to that used in (Chinea, 2023) for sigmoidal or hyperbolic tangent functions. However, in this case the energy reassignements used to model the effect of the ReLU activation function maps all the combinatorial objects with an energy value below to the ground state (energy value equal to 1 in Figure (1) whereas the rest of energy values remain identical (see the energy reassignements in the top part of Figure (1) ).
3. Theoretical Results
The number of accessible microstates, the entropy and the internal energy can be derived from the mathematical expression of the generating function of energies (2). In turn, the potential energy stored by the networks is obtained substracting the total number of neurons of the network from the expression of the internal energy. All subsequent comparisons between ReLU and sigmoidal shallow networks assume identical structural complexity (equal units and adaptive weights). Under these circunstances, the theoretical capacity for encoding information is exactly the same. Furthermore, two energy levels (i.e., ) were used to represent both, the adaptive weights, and the inputs/outputs of these networks in the graphs of Figures (1) and (2) for reducing the computational complexity of the calculations.
Thus, the entropy (S) for a shallow network with inputs, composed of ReLU units in the hidden layer and one output unit with sigmoidal activation (or hyperbolic tangent) function in the output layer (i.e., reads:
In the equation of the entropy the parameter denoted as represents the number of energy levels at the output of the hidden layer of the shallow network (layer 1), and reads . Similarly, the expression of the potential energy () reads:
Finally, the number of accessible microstates () reads:
The top part of Figure (1) (right side) represents the evolution of the free energy as a function of the hidden layer width for shallow networks with architecture , whereas the bottom part represents respectively the evolution of the quotient entropy versus potential energy (left part), and the heat capacity (right part). Similarly, the top part of Figure (2) represents the the evolution of the quotient entropy versus potential energy (left part), and the heat capacity (right part) as a function of the input space dimension to the networks for shallow networks with architecture .
The free energy is proportional to the logarithm of the partition function (Nishimori, 2001), therefore a lower free energy value (more negative) like those attained by the shallow networks with ReLU units implies a larger partition function which is linked to a higher number of accessible (i.e.,more probable) microstates, and thus linked to a more stable thermodynamic regime (i.e., under the canonical ensemble physical systems tends to minimize its free energy (Chinea, 2023; Hartmann & Weigt, 2005)).
It is important to note that the shallow networks of the graphs of Figures (1) and (2) represent two physical systems with identical theoretical encoding capacity. However, shallow networks composed with ReLU units has more accessible microstates (higher entropy) than the physical system represented by shallow networks with sigmoidal or hyperbolic tangent units, yet surprisingly, storing a lower amount of internal energy. In thermodynamics, this implies that the former has a much higher density of states. The number of accessible microstates is related with the information-storage capacity of a network, thus as larger is the number of accessible microstates of a network as larger will be the accessible volume of the phase space and thus its information storage capacity. Networks with ReLU units have a number of accesible microstates that is exponentially larger compared to networks with sigmoidal (or hyperbolic tangent) units. For example, the number of accessible microstates for a network with , inputs, units in the hidden layer and one output neuron (with sigmoidal or hyperbolic activation function), passes from to when is composed of sigmoidal units or ReLU units respectively.
The quotient entropy versus potential energy provides a quantitative measure of the expected performance of a network in terms of generalization performance and learning speed (i.e.,the number of epochs required to achieve a prescribed training or generalization error) whereas the specific heat (or heat capacity in the graphs) is related with the thermodynamic efficiency with which information can be processed by the networks. More specifically, from a thermodynamics point of view as larger is the value attained by the specific heat as higher will be the capacity for heat absortion of the networks as a result of their computations (i.e, lower dissipation of heat), and thus as better will be its thermodynamic efficiency, that is, lower computational times for the learning and recall phases of those networks when implemented in an computer with a Von Neumann architecture (see (Chinea, 2023) for further details).
When considering the evolution of the entropy to potential energy ratio as a function of the number of units of the hidden layer of the networks it is important to emphasize that this ratio is constant for shallow networks with sigmoidal or hyperbolic tangent activation functions whereas for the ReLU activation function increases with the number of units, that is, it grows very fast up to a value of 500 units, and afterwards grows smoothly with the number of units (although this fact is not appreciated in the graph). Similarly, the quotient entropy versus potential energy grows faster as a function of the input space dimension to the networks for the ReLU activation function compared to the sigmoid (or hyperbolic tangent ) activation function.
With regards to the specific heat the capacity for heat absortion of the networks present a faster increase for shallow networks composed of units with sigmoidal or hyperbolic tangent activation functions with both the number of units of the networks and/or the input space dimension to the networks. Higher specific heat enhances the network’s heat absorption capacity during computation, minimizing heat dissipation. On a Von Neumann computer architecture, this fact reduces computational runtimes during optimization and inference (Chinea, 2023). Theoretically, these metrics indicate that for a given structural complexity, shallow ReLU networks lead to a more stable thermodynamic regime than sigmoidal or hyperbolic tangent architectures. Consequently, depending on the unit count and input dimensionality, the computational costs for training and inference phase might actually be higher for ReLU networks due to how heavily the activation function dictates the system’s thermodynamic regime.
Summarizing, these theoretical results suggest that shallow networks composed of units with ReLU activation functions lead to networks with a larger information-storage capacity (higher entropy content), and presenting a lower complexity of the geometrical structure of the loss landscape (i.e, they store lower amounts of potential energy) but at the cost of a lower efficiency with which information can be processed by these networks. All those facts appearing to suggest that the typical behavior in terms of learning and generalization performance of shallow networks with ReLU units is expected to be better when compared to shallow networks with sigmoidal or hyperbolic tangent units in spite of the fact of leading to larger computational times subject to the number of neurons of the networks or the input space dimension to the networks.
4. Discussion
To validate the theoretical results from the previous section, we utilized datasets from the European research project ELENA (Blayo et al., 1995). Designed to benchmark the performance of machine learning classifiers, the ELENA repository includes both real-world and artificially generated datasets:
- Real-World Data (phoneme.dat): This dataset contains 5,404 samples across two classes (3,818 in class 0; 1,586 in class 1) within a five-dimensional space (). While the sample size is only marginally sufficient for this dimensionality, the theoretical average Bayes error—estimated at 8.97
- Artificial Data (Gauss8d.dat): This synthetic dataset features two fully overlapping Gaussian classes (class 0 and class 1) and is designed to analyze how input dimensionality affects classification error. The theoretical Bayes error (the minimum attainable error) is 9%. Crucially, this dataset intentionally lacks a sufficient number of samples to reliably estimate the underlying probability distribution, making it an excellent test for classifier robustness.
The graphs of Figure (2) represent the performance metrics for a architecture (N = , , ) trained on phoneme.dat via backpropagation. The top graph outlines generalization, while the bottom graph displays average computational runtimes calculated across 1,000 independent learning phases of 50 epochs each.The generalization curves confirm that shallow ReLU networks achieve superior generalization bounds and faster convergence speeds than sigmoidal networks. Furthermore, these results are also in agreement with literature (Dubey et al., 2022; Li et al., 2022), the typical generalization of Convolutional Neural Networks with ReLU units is better that with sigmoidal or hyperbolic tangent units, being the typical generalization performance better for hyperbolic tangent networks since the quotient entropy vs. potential energy is also higher for these networks compared to sigmoidal networks in spite of leading to lower entropy values (i.e., lower information-storage capacities).
Conversely, the training phase computational costs expose a critical trade-off. Contrary to conventional machine learning assumptions, the empirical runtimes validate our theoretical predictions: shallow ReLU networks exhibit worse thermodynamic efficiency than sigmoid and hyperbolic tangent networks, causing training runtimes to escalate alongside hidden layer width. This phenomenon was replicated on the eight-dimensional Gauss8D.dat benchmark. Crucially, this runtime penalty does not affect the recall (inference) phase, which remains consistently faster for ReLU units due to their minimal algorithmic complexity on standard hardware. For low-dimensional data, such as the two dimensional Clouds.dat dataset, this thermodynamic inefficiency only manifests when the network scales to 10,000 units or more.
Thus, taking into consideration the huge amount of neurons employed by state of the art deep learning models suchs as convolutional neural networks or text transformers (from 10 up to approximately 390 millions of neurons) it is worth to rethink both the number of neurons and the activation function used in these models since a better performance might be achieved in learning and generalization performance with both a much lower number of ReLU units, or also using a reduced number of units with sigmoidal or hyperbolic tangent activation functions but trained with a more sophisticated learning protocol.
For example, the generalization performance obtained for the dataset Phoneme.dat for the ReLU network trained 5000 epochs with Backpropagation (see Figure (2)) was obtained using either a ReLU network with architecture trained 5000 epochs with backpropagation, or a Sigmoidal network with architecture trained 50 epochs with scaled conjugate gradients algorithm (Bishop, 1995, 2006) but in both cases with computational times several orders of magnitude lower.
5. Conclusions
In this paper, the effect of the activation function used in the learning and generalization performance of shallow networks has been addressed from a thermodynamics point of view.The results of the analysis revealed that networks (i.e., physical systems) composed of units with rectified linear units (ReLU) are in a more stable thermodynamic regime that store lower amounts of energy and characterized by lower free energy values compared to networks with sigmoidal or hyperbolic tangent functions (with an identical structural complexity) implying larger partition function linked to higher entropy values with a larger number of accessible microstates. This fact leads to networks with larger information-storage capacities, and with a lower geometrical complexity of the loss landscape leading in average to better generalization performance and speed of learning compared to networks with sigmoidal activation functions.
However, in spite of its lower computational cost compared to sigmoidal and hyperbolic tangent functions, from a thermodynamics point of view the computations performed by these networks dissipate more heat when simulated in a computer leading to lower information-processing capacities that increase either with the size of the networks or with the space dimension of the dataset affecting severely their computational times during the training phase.
Thus, taking into consideration the huge amount of artificial neurons employed by state of the art deep learning models suchs as convolutional neural networks or text transformers (from 10 up to approximately 390 millions of artificial neurons) it is worth to rethink both the number of neurons and the activation function used in these models since a better performance might be achieved in learning and generalization performance with both a much lower number of ReLU units, or also using a reduced number of units with sigmoidal or hyperbolic tangent activation functions but trained with a more sophisticated learning protocol.
Acknowledgments
This research was funded by the Nicolaus Copernicus University (UMK) under DAMSI grant (Dynamics,Mathematical Analysis and Artificial Intelligence) of the University Center of Excellence. It was conducted during a four-months visiting researcher position, starting in September 2024, at the Faculty of Physics, Astronomy and Informatics. The author would like also to thank the Thinking about Thinking organization for inviting me to present part of this work at the Mathematics of Neuroscience and AI conference celebrated in Rome in June 2026.
References
- Baldassi C., Ingrosso A., Lucibello C., Saglietti L., & Zecchina R., (2015). Subdominant Dense Clusters Allow for Simple Learning and High Computational Performance in Neural Networks with Discrete Synapses. Physical Review Letters, Vol. 115(12), pp.128101-128106.
- Baldassi C., Ingrosso A., Lucibello C., Saglietti L., & Zecchina R., (2016). Local entropy as a measure for sampling solutions in constraint satisfaction problems. Journal of Statistical Mechanics: Theory and Experiment, Vol. 2, pp. 0233.
- Baldassi C., Pittorino F., & Zecchina R., (2019). Shaping the learning landscape in neural networks around wide flat minima. Proceedings of the National Academy of Sciences USA, Vol. 117(1), pp.161-170.
- Bennett C. H., (1982). The Thermodynamics of Computation. A Review. International Journal of Theoretical Physics, 21(12), pp. 905-940.
- Bishop C.M. (1995). Neural Networks for Pattern Recognition. Oxford University Press.
- Bishop C.M. (2006). Pattern Recognition and Machine Learning. Springer Science+Business Media LLC.
- Blayo F., Cheneval Y., Guérin-Dugué A., et al. (1995), Enhanced Learning for Evolutive Neural Architecture ESPRIT Basic Research Project Number 6891, Deliverable R3-B4-P, Task B4 (Benchmarks).
- Chandler D., (1987). Introduction to Modern Statistical Mechanics. Oxford University Press.
- Chaudhari P., Choromanska A., Soatto S., LeCun Y., Baldassi C., Borgs C., Chayes J., Sagun L., & Zecchina R. (2019). Entropy-SGD: biasing gradient descent into wide valleys. Journal of Statistical Mechanics: Theory and Experiment, Vol 2019 (3).
- Chinea A., (2023). On the Theory of Deep Learning: A Theoretical Physics Perspective (Part I). Journal of Physics A: Mathematical and Theoretical, Vol. 52(20).
- Dubey, S.R., Singh S.K., and Chaudhuri B.B. (2022). Activation Functions in Deep Learning: A Comprehensive Survey and Benchmark. Neurocomputing, vol. 503, pp. 92-108.
- Efron B. (1979). Bootstrap Methods: Another Look at the Jacknife. The Annals of Statistics, Vol. 7, No. 1, pp. 1-26.
- Glorot, X., Bordes, A., & Bengio, Y. (2011). Deep Sparse Rectifier Neural Networks. In Proceedings of the 14th International Conference on Artificial Intelligence and Statistics, pp. 315-323.
- Hartmann, A.K., & Weigt, R. (2005). Phase Transitions in Combinatorial Optimization Problems: Basic Algorithms and Statistical Mechanics. Weinheim, DE: Wiley-Vch Verlag Gmbh & Co.
- Krizhevsky A., Sutskever, I., & Hinton, G. (2012). ImageNet Classification with Deep Convolutional Neural Networks. Advances in Neural Information Processing Systems, Vol. 25, pp. 1097-1105.
- Li Z., Liu F., Yang W., Peng S., & Zhou J. (2022). A Survey of Convolutional Neural Networks: Analysis, Applications and Prospects. IEEE Transactions on Neural Networks and Learning Systems, vol. 33 (12), pp. 6999-7019.
- Nair V., & Hinton G.E. (2010). Rectified linear units improve restricted boltzmann machines. In International Conference on Machine Learning, pp.807–814.
- Nishimori, H. (2001). Statistical Phyiscs of Spin Glasses and Information Processing: An Introduction. Oxford University Press.
- Wolpert D.H., & Kolchinsky A. (2020). Thermodynamics of computing with circuits. New Journal of Physics, vol. 22(6), pp.063047.
Figure 1.
Top panel: Geometric modeling of the ReLU activation function following the procedure in (Chinea, 2023) (left), and free energy evolution (right) as a function of hidden layer width () for shallow networks with sigmoidal and ReLU activation units. Bottom panel: Evolution of the entropy-to-potential-energy ratio (left) and specific heat (right) as a function of hidden layer width () for shallow networks with sigmoidal and ReLU activation units.
Figure 1.
Top panel: Geometric modeling of the ReLU activation function following the procedure in (Chinea, 2023) (left), and free energy evolution (right) as a function of hidden layer width () for shallow networks with sigmoidal and ReLU activation units. Bottom panel: Evolution of the entropy-to-potential-energy ratio (left) and specific heat (right) as a function of hidden layer width () for shallow networks with sigmoidal and ReLU activation units.

Figure 2.
Top panel: Evolution of the entropy-to-potential-energy ratio (left) and specific heat (right) as a function of the input space dimension () for shallow networks with sigmoidal and ReLU activation units. Bottom panel: Empirical generalization performance on the phoneme.dat dataset using backpropagation with a 10-fold cross-validation procedure and 5 averages per fold (Efron, 1979) (left), and corresponding computational runtimes calculated across 1,000 independent learning phases of 50 epochs each (right).
Figure 2.
Top panel: Evolution of the entropy-to-potential-energy ratio (left) and specific heat (right) as a function of the input space dimension () for shallow networks with sigmoidal and ReLU activation units. Bottom panel: Empirical generalization performance on the phoneme.dat dataset using backpropagation with a 10-fold cross-validation procedure and 5 averages per fold (Efron, 1979) (left), and corresponding computational runtimes calculated across 1,000 independent learning phases of 50 epochs each (right).

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.