SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Visual mental imagery refers to the ability to create mental representations or pictures of visual information in the absence of actual sensory input (Pearson et al., 2015; Colombo, 2012). A key distinction between mental imagery and hallucinations is that mental imagery involves voluntarily creating mental images through imagination, while hallucinations are involuntary sensory perceptions. To implement the voluntary, top-down activation of a percept (e.g. '9'), we add the average activation pattern of the category in the latent layer to each recursion in the inference algorithm. Presumably, the brain has a recollection of the category which can be read out from memory during mental imagery. Figure 6 shows that as noise in the inference goes higher, so does the quality of the imagined digits.
We acknowledge several limitations of the Feedback-Feedforward Alignment (FFA) framework in its current form. One key limitation is the difficulty of scaling FFA to larger datasets such as ImageNet. While we observed gaps in performance compared to classical backpropagation (BP) on CIFAR10, we found little difference compared to the Feedback Alignment (FA) baseline in discrimination performance on smaller datasets such as CIFAR10. However, it is yet possible that FFA could be more suitable at large scale for specific architectures, such as transformers, where layer sizes do not decrease towards the output layer. Scaling up FFA requires further theoretical and empirical exploration. Another limitation is related to the assessment of the generated inferences. Currently, the evaluation relies primarily on visual inspection. Although we included classifier accuracy reports for denoising, it assumes that perception arises solely from top activations and that bottom hierarchy activation (such as V1) does not directly contribute to perception. Enhancing the evaluation methodology to incorporate more objective measures and quantitative assessments of generated inferences would strengthen the framework. Furthermore, while FFA demonstrates a balance between discrimination performance, efficient learning, and robust recurrent inference, it is important to acknowledge that FFA may not fully capture all aspects of the biological brain. The
Figure 6: Visual imagery. Generated samples (upper panels) using the inference algorithm on the FFA-trained network when top-down signal '5' (left) and '3' (right) was activated. The sample iterations (equally spaced) for sample generations were shown in the lower panel. Each row corresponds to an inference noise level. Refer to Section 8.7 for iteration and  $\beta$  values
framework represents a step towards understanding the brain's mechanisms but may still fall short in faithfully replicating the intricacies of neural processing such as the precise dynamics of neural responses or differences in tuning among feedforward and feedback neural subtypes, though it takes a step toward those directions. Overall, these limitations highlight the need for further research and development to address the scalability of FFA, refine evaluation methodologies, and gain deeper insights into the biological plausibility of the framework. Overcoming these limitations will pave the way for more effective and robust alternatives to BP, advancing the understanding and application of neural network training algorithms to neurobiology.
In moving beyond classical error backpropagation training of a single-objective, feedforward network, we have presented a feedforward-feedback algorithm that trains neural networks to achieve mutualistic optimization of dual objectives. Co-optimization provides attendant advantages: avoids weight transport, increases robustness to noise and adversarial attack, and gives feedback its own runtime function that allows closed-loop inference. Through our experiments, we demonstrated that the network trained using the FFA approach supports various visual inference tasks.
This work has broader impacts that include advancing our understanding of human perception, enhancing the robustness and performance of neural networks, helping to identify the emergence of closed-loop inference in larger networks for real-time applications, and potential implications for clinical research of mental disorders. By studying the neural mechanisms underlying visual perception, this research contributes to our understanding of natural and artificial vision.
T.T. is supported by NIH 1K99EY035357-01. This work was supported by NIH RF1DA056397, NSF 1707398, Gatsby Charitable Foundation GAT3708, NIH R34 (NS116739), Klingenstein-Simons fellowship, Sloan Foundation fellowship and Grossman-Kavli Scholar Award, as well as a NVIDIA GPU grant, and was performed using the Columbia Zuckerman Axon GPU cluster.
Abid, H., Ahmad, F., Lee, S. Y., Park, H. W., Im, D., Ahmad, I., and Chaudhary, S. U. (2016). A functional magnetic resonance imaging investigation of visual hallucinations in the human striate cortex. Behav. Brain Funct., 12(1):31.
Akrout, M. (2019). On the Adversarial Robustness of Neural Networks without Weight Transport. arXiv:1908.03560 [cs, stat]. arXiv: 1908.03560.
Akrout, M., Wilson, C., Humphreys, P. C., Lillicrap, T., and Tweed, D. (2019). Deep Learning without Weight Transport. arXiv:1904.05391 [cs, stat]. arXiv: 1904.05391.
Bartunov, S., Santoro, A., Richards, B. A., Harris, L., Hinton, G. E., and Lillicrap, T. (2018). Assessing the Scalability of Biologically-Motivated Deep Learning Algorithms and Architectures. arXiv:1807.04587 [cs, stat]. arXiv: 1807.04587.
Bengio, Y. (2014). How Auto-Encoders Could Provide Credit Assignment in Deep Networks via Target Propagation. arXiv:1407.7906 [cs]. arXiv: 1407.7906.
Choksi, B., Mozafari, M., O'May, C. B., Ador, B., Alamia, A., and VanRullen, R. (2021). Predify: Augmenting deep neural networks with brain-inspired predictive coding dynamics.
Clark, A. (2013). Whatever next? predictive brains, situated agents, and the future of cognitive science. *Behav. Brain Sci.*, 36(3):181-204.
Colombo, B. (2012). Mental imagery. In Encyclopedia of the Sciences of Learning, pages 2187-2191. Springer US, Boston, MA.
Crafton, B., Parihar, A., Gebhardt, E., and Raychowdhury, A. (2019). Direct feedback alignment with sparse connections for local learning. Front. Neurosci., 13:525.
Debes, S. R. and Dragoi, V. (2023). Suppressing feedback signals to visual cortex abolishes attentional modulation. Science, 379(6631):468-473.
Dijkstra, N., Bosch, S. E., and van Gerven, M. A. J. (2017). Vividness of visual imagery depends on the neural overlap with perception in visual areas. J. Neurosci., 37(5):1367-1373.
Echeveste, R. and Lengyel, M. (2018). The redemption of noise: Inference with neural populations. Trends Neurosci., 41(11):767-770.
Findling, C. and Wyart, V. (2021). Computation noise in human learning and decision-making: origin, impact, function. Curr. Opin. Behav. Sci., 38:124-132.
Friston, K. (2009). The free-energy principle: a rough guide to the brain? Trends Cogn. Sci., 13(7):293-301.
Ganis, G., Thompson, W. L., and Kosslyn, S. M. (2004). Brain areas underlying visual mental imagery and visual perception: an fMRI study. Cognitive Brain Research, 20(2):226-241.
Gilbert, C. D. and Sigman, M. (2007). Brain states: top-down influences in sensory processing. *Neuron*, 54(5):677-696.
Goodfellow, I. J., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., and Bengio, Y. (2014). Generative adversarial networks.
Goodfellow, I. J., Shlens, J., and Szegedy, C. (2015). Explaining and Harnessing Adversarial Examples. arXiv:1412.6572 [cs, stat]. arXiv: 1412.6572.
Wen, H., Han, K., Shi, J., Zhang, Y., Culurciello, E., and Liu, Z. (2018). Deep predictive coding network for object recognition. In Dy, J. and Krause, A., editors, Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 5266-5275. PMLR.
Whittington, J. C. R. and Bogacz, R. (2017). An approximation of the error backpropagation algorithm in a predictive coding network with local hebbian synaptic plasticity. Neural Comput., 29(5):1229-1262.
Yamins, D. L. K., Hong, H., Cadieu, C. F., Solomon, E. A., Seibert, D., and DiCarlo, J. J. (2014). Performance-optimized hierarchical models predict neural responses in higher visual cortex. Proc. Natl. Acad. Sci. U. S. A., 111(23):8619-8624.
8 Supplementary
8.1 Model architectures
For the experiment on a fully connected architecture, we used a 4-layer network with [1024, 256,256,10] neurons in each layer and ReLU non-linearity between layers. For the experiment on a convolutional architecture, we used a modified version of ResNet (He et al., 2015), where the last convolutional layer has the same number of channels as classes, and an adaptive average pooling operator is used to read out of each channel (see below). Since the last layer doesn't have any learnable parameters, the penultimate layer can be as large as desired which works fine for FFA. The convolutional architecture consists of 11 convolutional layers with 658,900 trainable parameters in total. For autoencoder controls (trained under BP or FA), we additionally trained a linear decoder on the activations of the penultimate layer to assess the linear separability of the representation learned by autoencoders.
Code is available at: https://github.com/toosi/Feedback_Feedforward_Alignment
8.2 More control networks: autoencoders
Figure 7: Co-optimization in FFA compared to single objective (either discrimination or reconstruction) control networks for MNIST and CIFAR10 (extensive version of Figure 2).
8.3 Alignment between feedback and feedforward
Figure 8: Alignment of feedback (FB) and feedforward (FF) weights for A) MNIST B) CIFAR10 datasets over the course of training shown in the first column. The smaller the angle between the FF and FB weights, the higher the alignment. The second and third columns show discrimination and reconstruction performances on test sets.
8.4 Robustness assessment
We added Gaussian noise with zero mean and varied the variance  $\sigma^2 = [0.0, 0.2, 0.4, 0.8, 1.0]$  to assess the robustness of models to input noise. We also performed a widely used white box adversarial attack Fast Gradient Sign Method (FGSM) (Goodfellow et al., 2015). FGSM can be summarized by
$$
x ^ {\prime} = x + \epsilon \operatorname {s i g n} \left(\Delta_ {x} J (x, y ^ {*})\right)
$$
where  $\sigma$  is the magnitude of the perturbation,  $J$  is the loss function and  $y^{*}$  is the label of  $x$ . While in BP this perturbation is computed through transposed forward parameters, for FFA and FA, we used their gradient pass parameters which are learned feedback and random feedback, respectively. We used a range of  $\epsilon$  to cover the interval between 0 to 1.
8.5 Visual inference algorithm
We adapt the sampling algorithm developed in (Kadkhodaie and Simoncelli, 2021) to implement the visual inference in FFA-trained networks.  $\beta$  parameter which varies between 0 and 1 controls the proportion of injected noise ( $\beta = 1$  indicates no noise). The injected noise together with the gradient step size controls the number of iterations for convergence.
Figure 9: Robustness to Gaussian noise and adversarial attacks for MNIST. Robustness to noise and adversarial attacks in input (image) space for FFA and control algorithms. FA and FFA both exhibit more robustness than BP-trained discriminators.
Algorithm 2 The core visual inference algorithm
(adapted with minimal modification from Kadkhodaie and Simoncelli (2021)))
parameters:  $\sigma_0,\sigma_L,h_0,\beta$
initialization:  $t = 1$ , draw  $x_0 \sim \mathcal{N}(0.5, \sigma_0^2 I)$
$\mathcal{F}$  : trained feedforward
$\mathcal{B}$  : trained feedback
while  $\sigma_{t - 1}\leq \sigma_L$  do
$h_t = \frac{h_0t}{1 + h_0(t - 1)}$ $\hat{x}_{t - 1} = \mathcal{B}(\mathcal{F}(x_{t - 1}))$ $d_{t} = x_{t - 1} - \hat{x}_{t - 1}$ $\sigma_t^2 = \frac{\|d_t\|^2}{N}$ $\gamma_t^2 = \left((1 - \beta h_t)^2 -(1 - h_t)^2\right)\sigma_t^2$  Draw  $z_{t}\sim \mathcal{N}(0,I)$ $x_{t}\gets x_{t - 1} + h_{t}d_{t} + \gamma_{t}z_{t}$ $t\gets t + 1$
8.6 Visual occlusion
Figure 10: Visual occlusion related to Figure 4 in the main text.
8.7 Visual imagery
$\beta = 0.80$ $\beta = 1.00$
$\beta = 0.20$ $\beta = 0.40$
$\beta = 0.20$
$\beta = 1.00$
$\beta = 0.80$
$\beta = 0.40$
Figure 11: Sample visual imagery related to Figure 6 in the main text.
8.8 Hallucinations
Figure 12: Sample hallucinations related to Figure 5 in the main text.