SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$$
E (\theta , s) := \sum_ {k = 1} ^ {5} \frac {1}{2} \| s _ {k} \| ^ {2} + \sum_ {k = 1} ^ {4} E _ {k} ^ {\text {c o n v}} \left(w _ {k}, s _ {k - 1}, s _ {k}\right) + E _ {5} ^ {\text {d e n s e}} \left(w _ {5}, s _ {4}, s _ {5}\right) + \sum_ {k = 1} ^ {5} E _ {k} ^ {\text {b i a s}} \left(b _ {k}, s _ {k}\right), \tag {18}
$$
where  $\theta = \{w_k, b_k \mid 1 \leq k \leq 5\}$  is the set of model parameters, and  $E_k^{\mathrm{conv}}$ ,  $E_k^{\mathrm{dense}}$  and  $E_k^{\mathrm{bias}}$  are energy terms defined as
$$
E _ {k} ^ {\text {c o n v}} := - s _ {k} \bullet \mathcal {P} (w _ {k} \star s _ {k - 1}), \quad E _ {k} ^ {\text {d e n s e}} := - s _ {k} ^ {\top} w _ {k} s _ {k - 1}, \quad E _ {k} ^ {\text {b i a s}} := - b _ {k} ^ {\top} s _ {k}. \tag {19}
$$
Specifically,  $E_{k}^{\mathrm{conv}}$  is the energy function of a convolutional interaction between layers  $k - 1$  and  $k$ , parameterized by the kernel  $w_{k}$  (the weights), where  $\star$  is the convolution operation,  $\mathcal{P}$  is the max pooling operation, and  $\bullet$  is the scalar product for pairs of tensors.  $E_{k}^{\mathrm{dense}}$  is the energy of a dense interaction between layers  $k - 1$  and  $k$ , parameterized by the  $\dim(s_{k-1}) \times \dim(s_k)$  matrix  $w_{k}$ . Finally,  $E_{k}^{\mathrm{bias}}$  is the energy term of  $b_{k}$ , the bias of layer  $k$ .
Cost function. For the equilibrium propagation learning rules, we use the squared error cost function  $C(o,y) = \| o - y\| ^2$ , where  $o = s_5$  is the output layer and  $y$  is the one-hot code of the label (associated to image  $x$ ).
State space. Given an input  $x$ , the steady state of the model is  $(h_{\star}, o_{\star}) = \operatorname*{arg min}_{(h, o) \in S} E(\theta, x, h, o)$ , where  $S$  is the state space, i.e., the space of configurations for the hidden and output variables. We use  $S = \prod_{k=1}^{4} [0, 1]^{\dim(s_k)} \times \mathbb{R}^{\dim(s_5)}$ , where  $[0, 1]$  is the closed interval of  $\mathbb{R}$  with bounds 0 and 1, and  $\dim(s_k)$  is the number of units in layer  $k$ .
Energy minimization via asynchronous updates. In order to compute the steady states (free state and perturbed states) of the learning algorithms presented in section 2, we use a novel procedure for DCHNs using 'asynchronous updates' for the state variables, as opposed to the 'synchronous updates' used in other works [Ernoult et al., 2019, Laborieux et al., 2021, Laydevant et al., 2021, Laborieux and Zenke, 2022]. This asynchronous procedure proceeds as follows: at every iteration, we first update the layers of even indices in parallel (the first half of the layers) and then we update the layers of odd indices (the other half of the layers). Updating all the layers once (first the even layers, then the odd layers) constitutes one 'iteration'. We repeat as many iterations as necessary until convergence to the steady state. See Appendix C for a detailed explanation of the asynchronous procedure, and for a comparison with the synchronous procedure used in other works. Although we do not have a proof of convergence of this asynchronous procedure for DCHNs when  $\mathcal{P}$  is the max pooling operation, we find experimentally that it converges faster than the synchronous procedure (for which there is no proof of convergence anyway).
4 Simulations
4.1 Comparative study of EBL algorithms
Setup. We compare with simulations the seven energy-based learning (EBL) algorithms of section 2 on the deep convolutional Hopfield network (DCHN) of section 3. To do this, we train a DCHN on MNIST, Fashion-MNIST, SVHN, CIFAR-10 and CIFAR-100 using each of the seven EBL algorithms. We also compare the performance of these algorithms to two baselines: recurrent backpropagation (RBP) and truncated backpropagation (TBP), detailed below. For each simulation, the DCHN is trained for 100 epochs. Each run is performed on a single A100 GPU. A run on MNIST and FashionMNIST takes 3 hours 30 minutes; a run on SVHN takes 4 hours 45 minutes; and a run on CIFAR-10 and CIFAR-100 takes 3 hours. All these simulations are performed with the same network using the same initialization scheme and the same hyperparameters. Details of the training experiments are provided in Appendix D and the results are reported in Table 1.
First baseline: recurrent backpropagation (RBP). As the equilibrium state  $o_{\star}$  of an EBL model is defined implicitly as the minimum of an energy function, the gradient of the cost  $C(o_{\star}, y)$  can be computed via implicit differentiation, or more specifically via an algorithm called recurrent backpropagation [Almeida, 1987, Pineda, 1987].
Second baseline: truncated backpropagation (TBP). Our second baseline uses automatic differentiation (i.e. backpropagation) as follows. First, we compute the free state  $(h_{\star},o_{\star})$ . Then, starting
The code is available at https://github.com/rain-neuromorphics/energy-based-learning
from the free state  $(h_0,o_0) = (h_\star ,o_\star)$  we perform  $K$  iterations of the fixed point dynamics; we arrive at  $(h_K,o_K)$ , which is also equal to the free state. We then compute the gradient of  $C(o_{K},y)$  with respect to the parameters  $(\theta)$ , without backpropagating through  $(h_0,o_0)$ . This is a truncated version of backpropagation, where we only backpropagate through the last  $K$  iterations but not through the minimization of the energy function. This baseline is also used by Arnoult et al. [2019].
Table 1: Results obtained by training the deep convolutional Hopfield network (DCHN) of Section 3 with the EBL algorithms of Section 2: contrastive learning (CL), equilibrium propagation (EP) and coupled learning (CpL). EP and CpL are tested in their positively-perturbed (P-), negatively-perturbed (N-) and centered (C-) variants. We also report two baselines: truncated backpropagation (TBP) and recurrent backpropagation (RBP). Train and Test refer to the training and test error rates, in %. For each of these 45 experiments, we perform three runs and report the mean values. See Appendix D for the complete results with std values. The hyperparameters used for this study are reported in Table 5.
MNIST	FashionMNIST	SVHN	CIFAR-10	CIFAR-100
Test	Train	Test	Train	Test	Train	Test	Train	Test	Train
TBP	0.42	0.23	6.12	3.09	3.76	2.37	10.1	3.1	33.4	17.2
RBP	0.44	0.33	6.28	3.70	3.87	3.43	10.7	5.2	34.4	18.2
CL	0.61	2.39	10.10	15.49	6.1	15.8	31.4	45.2	71.4	88.6
P-EP	1.66	2.29	90.00	89.99	83.9	81.9	72.6	79.5	89.4	95.5
N-EP	0.42	0.19	6.22	3.87	80.4	81.1	11.9	6.2	44.7	40.1
C-EP	0.44	0.20	6.47	4.01	3.51	3.01	11.1	5.6	37.0	26.0
P-CpL	0.66	0.59	64.70	65.31	40.1	50.8	46.9	57.7	77.9	91.0
N-CpL	0.50	0.88	6.86	6.27	80.4	81.1	13.5	10.2	51.9	50.6
C-CpL	0.44	0.38	6.91	5.29	4.23	5.05	14.9	14.6	46.5	37.9
We draw several lessons from Table 1.
Algorithms perform alike on MNIST. Little difference is observed in the test performance of the algorithms on MNIST, ranging from  $0.42\%$  to  $0.66\%$  test error rate for six of the seven EBL algorithms. This result confirms the current trend in the literature, often skewed towards simple tasks, which sometimes goes to treat all EBL algorithms as one and the same.
Weak positive perturbations perform worse than strong ones. P-EP fails on most datasets (Fashion-MNIST, SVHN, CIFAR-10 and CIFAR-100). P-CpL (the other weakly positively-perturbed algorithm) performs better than P-EP on all tasks, but also fails on CIFAR-100 (91% training error). It is noteworthy that CL, which employs full clamping to the desired output (i.e. a strong positive perturbation), performs better than these two algorithms on all tasks, sometimes by a very large margin (Fashion-MNIST and SVHN).
Negative perturbations yield better results than positive ones. On Fashion-MNIST, CIFAR-10 and CIFAR-100, algorithms employing a negative perturbation (N-EP and N-CpL) perform significantly better than those employing a positive perturbation (CL, P-EP and P-CpL). Theorem 2 sheds light on why N-EP performs better than P-EP: N-EP optimizes an upper bound of the cost function, whereas P-EP optimizes a lower bound. We note however that on SVHN, the results obtained with N-EP and N-CpL are much worse than CL – in Appendix E we perform additional simulations where we change the weight initialization of the network; we find that N-EP and N-CpL generally perform much better than CL, P-EP and P-CpL, supporting our conclusion.
Two-sided perturbations (i.e. centered algorithms) yield better results than one-sided perturbations. While little difference in performance between the centered (C-EP and C-CpL) and negatively-perturbed (N-EP and N-CpL) algorithms is observed on MNIST, FashionMNIST and CIFAR-10, the centered algorithms unlock training on SVHN and significantly improve the test error rate on CIFAR-100 (by  $\geq 5.4\%$ ). Theorem 3 sheds light on why C-EP performs better than N-EP: the loss function  $\mathcal{L}_{-\beta; +\beta}^{\mathrm{EP}}$  of C-EP better approximates the cost function (up to  $O(\beta^{2})$ ) than the loss function  $\mathcal{L}_{-\beta}^{\mathrm{EP}}$  of N-EP (up to  $O(\beta)$ ).
The EP perturbation method yields better results than the one of CpL. While little difference in performance is observed between C-EP and C-CpL on MNIST and FashionMNIST, C-EP significantly outperforms C-CpL on CIFAR-10 and CIFAR-100, both in terms of training error rate ( $\geq 11.9\%$  difference) and test error rate ( $\geq 3.8\%$  difference). The same observations hold between N-EP and N-CpL. We also note that the CpL learning rules seem to be less theoretically grounded than the EP learning rules, as detailed in Appendix B.
4.2 State-of-the-art DCHN simulations (performance and speed)
The comparative study conducted in the previous subsection highlights C-EP as the best EBL algorithm among the seven algorithms considered in this work. Using C-EP, we then perform additional simulations on MNIST, CIFAR-10 and CIFAR-100, where we optimize the hyperparameters of training (weight initialization, initial learning rates, number of iterations, value of the nudging parameter and weight decay) to yield the best performance. We use the hyperparameters reported in Table 5 (Appendix D). We report in Table 2 our fastest simulations (100 epochs) as well as the ones that yield the lowest test error rate (300 epochs), averaged over three runs each. We also compare our results with existing works on deep convolutional Hopfield networks (DCHNs).
Table 2: We achieve state-of-the-art results (both in terms of speed and accuracy) with C-EP-trained DCHNs on MNIST, CIFAR-10 and CIFAR-100. The results are averaged over 3 runs, and compared with the existing literature on DCHNs. Top1 (resp. Top5) refers to the test error rate for the Top1 (resp. Top5) classification task. Wall-clock time (WCT) is reported as HH:MM. The hyperparameters used for these simulations are reported in Table 5 (Appendix D).
MNIST	CIFAR-10	CIFAR-100
Top1	WCT	Top1	WCT	Top1	Top5	WCT
Ernoult et al. [2019]	1.02	8:58
Laborieux et al. [2021]	11.68	N.A.
Laydevant et al. [2021]	0.85	N.A.	13.78	~ 120:00
Luczak et al. [2022]	20.03	N.A.
Laborieux and Zenke [2022]	11.4	~ 24:00	38.4	14.0	~ 24:00
This work (100 epochs)	0.44	3:30	10.40	3:18	34.2	14.2	3:02
This work (300 epochs)	9.70	9:54	31.6	14.1	9:04
Table 2 shows that we achieve better simulation results than existing works on DCHNs on all three datasets, both in terms of performance and speed. For instance, our 100-epoch simulations on CIFAR-10 take 3 hours 18 minutes, which is 7 times faster than those reported in [Laborieux and Zenke, 2022] (1 day), and 36 times faster than those reported in Laydevant et al. [2021] (5 days), and our 300-epoch simulations on CIFAR-10 yield  $9.70\%$  test error rate, which is significantly lower than [Laborieux and Zenke, 2022]  $(11.4\%)$ . On CIFAR-100, it is interesting to note that our 300-epoch simulations yield a significantly better Top-1 error rate than Laborieux and Zenke [2022]  $(31.6\%$  vs  $38.4\%)$ , but a slightly worse Top-5 error rate  $(14.1\%$  vs  $14.0\%)$ ; we speculate that this might be due to our choice of using the mean-squared error instead of the cross-entropy loss used in Laborieux and Zenke [2022]. Since no earlier work on DCHNs has performed simulations on Fashion-MNIST and SVHN, our results reported in Table 1 are state-of-the-art on these datasets as well.
Our important speedup comes from our novel energy-minimization procedure based on "asynchronous updates", combined with 60 iterations at inference (free phase) and the use of 16-bit precision. In comparison, Laborieux et al. [2021] used "synchronous updates" with 250 iterations and 32-bit precision. We show in Appendix C that these changes result in a  $13.5\mathrm{x}$  speedup on the same device (a A100 GPU) without degrading the performance (test error rate).
We also stress that there still exists an important gap between our SOTA DCHN results and SOTA computer vision models. For example, Dosovitskiy et al. [2020] report  $0.5\%$  test error rate on CIFAR-10, and  $5.45\%$  top-1 test error rate on CIFAR-100.
Our comparative study of energy-based learning (EBL) algorithms delivers a few key take-aways: 1) simple tasks such as MNIST may suggest that all EBL algorithms work equally well, but more difficult tasks such as CIFAR-100 magnify small algorithmic differences, 2) negative perturbations yield better results than positive ones, 3) two-sided (centered) perturbations perform better than one-sided perturbations, and 4) the perturbation technique of equilibrium propagation yields better results than the one of coupled learning. These findings highlight the centered variant of equilibrium propagation (C-EP) as the best EBL algorithm among those considered in the present work, outperforming the second-best algorithm on CIFAR-100 (N-EP) by a significant margin. Our results also challenge some common views. First, it is noteworthy that CL (which uses clamping to the desired output, i.e. a strong positive perturbation) yields better results than P-CpL and P-EP (which use weak positive perturbations): this is contrary to the prescription of Stern et al. [2021] to use small positive perturbations, and opens up questions in the strong perturbation regime [Meulemans et al., 2022]. Second, it is interesting to note that CL [Movellan, 1991, Baldi and Pineda, 1991], EP [Scellier and Bengio, 2017] and CpL [Stern et al., 2021] were originally introduced around the same intuition of bringing the model output values closer to the desired outputs; the fact that the four best-performing algorithms of our study (C-EP, N-EP, C-CpL and N-CpL) all require a negative perturbation suggests on the contrary that the crucial part in EBL algorithms is not to pull the model outputs towards the desired outputs, but to push away from the desired outputs. Third, Laborieux et al. [2021] explained the very poor performance of P-EP by it approximating the gradient of the cost function up to  $O(\beta)$ , but our observation that N-EP considerably outperforms P-EP while also possessing a bias of order  $O(\beta)$  shows that this explanation is incomplete; Theorem 2 provides a complementary explanation: P-EP optimizes a lower bound of the cost function, whereas N-EP optimizes an upper bound.
Our work also establishes new state-of-the-art results for deep convolutional Hopfield networks (DCHNs) on all five datasets, both in terms of performance (accuracy) and speed. In particular, thanks to the use of a novel "asynchronous" energy-minimization procedure for DCHNs, we manage to reduce the number of iterations required to converge to equilibrium to 60 - compared to 250 iterations used in Laborieux et al. [2021]. Combined with the use of 16-bit precision (instead of 32-bit), this leads our simulations to be 13.5 times faster than those of Laborieux et al. [2021] when run on the same hardware (a A100 GPU).
While our theoretical and simulation results seem conclusive, we also stress some of the limiting aspects of our study. First, our comparative study of EBL algorithms was conducted only on the DCHN model; further studies will be required to confirm whether or not the conclusions that we have drawn extend to a broader class of models such as resistive networks [Kendall et al., 2020] and elastic networks [Stern et al., 2021]. Second, in our simulations of DCHNs, the performance of the different EBL methods depends on various hyperparameters such as the perturbation strength  $(\beta)$ , the number of iterations performed to converge to steady state, the weight initialization scheme, the learning rates, the weight decay, etc. Since a different choice of these hyperparameters can lead to different performance, it is not excluded that a deeper empirical study could lead to slightly different conclusions.
Ultimately, while our work is concerned with simulations, EBL algorithms are most promising for training actual analog machines; we believe that our findings can inform the design of such hardware as well [Dillavou et al., 2022, 2023, Yi et al., 2023, Altman et al., 2023]. Finally, we contend that our theoretical insights and experimental findings may also help better understand or improve novel EBL algorithms [Anisetti et al., 2022, Laborieux and Zenke, 2022, Hexner, 2023, Anisetti et al., 2023], and more generally guide the design of better learning algorithms for bi-level optimization problems [Zucchet and Sacramento, 2022], including the training of Lagrangian systems [Kendall, 2021, Scellier, 2021], meta-learning [Zucchet et al., 2022, Park and Simeone, 2022], direct loss minimization [Song et al., 2016] and predictive coding [Whittington and Bogacz, 2019, Millidge et al., 2022].
The authors thank Mohammed Fouda, Ludmila Levkova, Nicolas Zucchet, Axel Laborieux, Nachi Stern, Sam Dillavou and Arvind Murugan for discussions. This work was funded by Rain AI. Rain AI has an interest in commercializing technologies based on brain-inspired learning algorithms.
B. Scellier and Y. Bengio. Equilibrium propagation: Bridging the gap between energy-based models and backpropagation. Frontiers in computational neuroscience, 11:24, 2017.
B. Scellier, S. Mishra, Y. Bengio, and Y. Ollivier. Agnostic physics-driven deep learning. arXiv preprint arXiv:2205.15021, 2022.
Y. Song, A. Schwing, R. Urtasun, et al. Training deep neural networks via direct loss minimization. In International conference on machine learning, pages 2169-2177. PMLR, 2016.
M. Stern and A. Murugan. Learning without neurons in physical systems. Annual Review of Condensed Matter Physics, 14:417-441, 2023.
M. Stern, D. Hexner, J. W. Rocks, and A. J. Liu. Supervised learning in physical networks: From machine learning to learning machines. Physical Review X, 11(2):021045, 2021.
M. Stern, S. Dillavou, M. Z. Miskin, D. J. Durian, and A. J. Liu. Physical learning beyond the quasistatic limit. *Physical Review Research*, 4(2):L022037, 2022.
M. Stern, S. Dillavou, D. Jayaraman, D. J. Durian, and A. J. Liu. Physical learning of power-efficient solutions. arXiv preprint arXiv:2310.10437, 2023.
M. Watfa, A. Garcia-Ortiz, and G. Sassatelli. Energy-based analog neural network framework. Frontiers in Computational Neuroscience, 17:1114651, 2023.
J. C. Whittington and R. Bogacz. Theories of error back-propagation in the brain. Trends in cognitive sciences, 23(3):235-250, 2019.
J. Wycoff, S. Dillavou, M. Stern, A. Liu, and D. Durian. Desynchronous learning in a physics-driven learning network. The Journal of Chemical Physics, 156(14):144903, 2022.
H. Xiao, K. Rasul, and R. Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017.
S.-i. Yi, J. D. Kendall, R. S. Williams, and S. Kumar. Activity-difference training of deep neural networks using memristor crossbars. Nature Electronics, 6(1):45-51, 2023.
N. Zucchet and J. Sacramento. Beyond backpropagation: bilevel optimization through implicit differentiation and equilibrium propagation. Neural Computation, 34(12):2309-2346, 2022.
N. Zucchet, S. Schug, J. Von Oswald, D. Zhao, and J. Sacramento. A contrastive rule for meta-learning. Advances in Neural Information Processing Systems, 35:25921-25936, 2022.
A Loss functions of the equilibrium propagation learning rules
In this appendix, we prove Theorems 2 and 3. To do so, we state and prove Theorems 4 and 5 below, of which Theorems 2 and 3 are direct consequences.
In this appendix, the input  $x$  and label  $y$  are fixed, so we omit them in the notation for simplicity. For fixed  $\theta$ , we define for any value of  $\beta$  the minimum of the augmented energy when  $h$  and  $o$  are free:
$$
F (\beta , \theta) := \inf  _ {h, o} \left\{E (\theta , h, o) + \beta C (o) \right\}. \tag {20}
$$
We further define the contrastive functions (or 'surrogate functions')
$$
\mathcal {L} _ {\beta} ^ {\mathrm {E P}} (\theta) := \frac {F (\beta , \theta) - F (0 , \theta)}{\beta}, \quad \beta \in \mathbb {R} \backslash \{0 \}, \tag {21}
$$
$$
\mathcal {L} _ {- \beta ; + \beta} ^ {\mathrm {E P}} (\theta) := \frac {F (\beta , \theta) - F (- \beta , \theta)}{2 \beta}, \quad \beta > 0. \tag {22}
$$
We also recall the definition of the steady state values of output variables:
$$
o (\theta) := \underset {o} {\arg \min } \underset {h} {\min } E (\theta , h, o). \tag {23}
$$
Finally, we recall that the equilibrium propagation (EP) perturbed state (4) is defined as
$$
\left(h _ {\beta} ^ {\mathrm {E P}}, o _ {\beta} ^ {\mathrm {E P}}\right) := \arg \min  _ {(h, o)} \{E (\theta , h, o) + \beta C (o) \} \tag {24}
$$
and that the EP learning rules (5) and (6) read
$$
\Delta^ {\mathrm {E P}} \theta := \frac {\eta}{\beta} \left(\frac {\partial E}{\partial \theta} \left(\theta , h _ {0} ^ {\mathrm {E P}}, o _ {0} ^ {\mathrm {E P}}\right) - \frac {\partial E}{\partial \theta} \left(\theta , h _ {\beta} ^ {\mathrm {E P}}, o _ {\beta} ^ {\mathrm {E P}}\right)\right) \tag {25}
$$
$$
\Delta^ {\mathrm {C} - \mathrm {E P}} \theta := \frac {\eta}{2 \beta} \left(\frac {\partial E}{\partial \theta} \left(\theta , h _ {- \beta} ^ {\mathrm {E P}}, o _ {- \beta} ^ {\mathrm {E P}}\right) - \frac {\partial E}{\partial \theta} \left(\theta , h _ {\beta} ^ {\mathrm {E P}}, o _ {\beta} ^ {\mathrm {E P}}\right)\right). \tag {26}
$$
In particular,  $o_0^{\mathrm{EP}} = o(\theta)$  by definition.
Theorem 4. The derivative of the function  $\beta \rightarrow F(\beta, \theta)$  at  $\beta = 0$  is equal to  $C(o(\theta))$ . In particular, as  $\beta \rightarrow 0$ , we have
$$
\mathcal {L} _ {\beta} ^ {\mathrm {E P}} (\theta) = C (o (\theta)) + O (\beta) \quad a n d \quad \mathcal {L} _ {- \beta ; + \beta} ^ {\mathrm {E P}} (\theta) = C (o (\theta)) + O \left(\beta^ {2}\right). \tag {27}
$$
Furthermore, we have for any  $\beta > 0$
$$
\mathcal {L} _ {\beta} ^ {\mathrm {E P}} (\theta) \leq C (o (\theta)) \leq \mathcal {L} _ {- \beta} ^ {\mathrm {E P}} (\theta). \tag {28}
$$
Theorem 5. The equilibrium propagation learning rules satisfy
$$
\Delta^ {\mathrm {E P}} \theta = - \eta \frac {\partial \mathcal {L} _ {\beta} ^ {\mathrm {E P}}}{\partial \theta} (\theta), \quad \Delta^ {\mathrm {C} - \mathrm {E P}} \theta = - \eta \frac {\partial \mathcal {L} _ {- \beta ; + \beta} ^ {\mathrm {E P}}}{\partial \theta} (\theta). \tag {29}
$$
Theorem 4 is borrowed from Scellier et al. [2022], where these statements are proved in the context of 'agnostic equilibrium propagation'. Theorem 5 is a new contribution. For clarity to ensure the manuscript is self-contained, we provide here proofs for both Theorem 4 and Theorem 5.
First, we introduce a new notation: we introduce the function
$$
\bar {F} (\beta , \theta , h, o) := E (\theta , h, o) + \beta C (o). \tag {30}
$$
Using this notation, for every  $\beta \in \mathbb{R}$ , the first order conditions for the steady state  $(h_{\beta}^{\mathrm{EP}}, o_{\beta}^{\mathrm{EP}})$  read:
$$
\frac {\partial \bar {F}}{\partial h} (\beta , \theta , h _ {\beta} ^ {\mathrm {E P}}, o _ {\beta} ^ {\mathrm {E P}}) = 0, \quad \frac {\partial \bar {F}}{\partial o} (\beta , \theta , h _ {\beta} ^ {\mathrm {E P}}, o _ {\beta} ^ {\mathrm {E P}}) = 0, \tag {31}
$$
and the function  $F$  (20) rewrites
$$
F (\beta , \theta) = \bar {F} (\beta , \theta , h _ {\beta} ^ {\mathrm {E P}}, o _ {\beta} ^ {\mathrm {E P}}). \tag {32}
$$
Proof of Theorem 4. Using the chain rule of differentiation, we have