6em

M. Prabhushankar and G. AlRegib, ”Stochastic Surprisal: An inferential
measurement of Free Energy in Neural Networks,” _Frontiers in Neuroscience -
Perception Science_ , 17, 2023.

Data of Initial Submission : 22 April 2022
Date of First Revision : 13 Dec 2022
Date of Second Revision : 08 Feb 2023
Date of Acceptance: 09 Feb 2023

https://github.com/olivesgatech/Stochastic-Surprisal

©2023 Prabhushankar and AlRegib. This is an open-access article distributed
under the terms of the Creative Commons Attribution License (CC BY). The use,
distribution or reproduction in other forums is permitted, provided the
original author(s) or licensor are credited and that the original publication
in this journal is cited, in accordance with accepted academic practice. No
use, distribution or reproduction is permitted which does not comply with
these terms.

<EMAIL_ADDRESS>OR<EMAIL_ADDRESS>
https://ghassanalregib.info/

# Stochastic Surprisal: An inferential measurement of Free Energy in Neural
Networks

Mohit Prabhushankar ∗, Ghassan AlRegib

###### Abstract

This paper conjectures and validates a framework that allows for action during
inference in supervised neural networks. Supervised neural networks are
constructed with the objective to maximize their performance metric in any
given task. This is done by reducing free energy and its associated surprisal
during training. However, the bottom-up inference nature of supervised
networks is a passive process that renders them fallible to noise. In this
paper, we provide a thorough background of supervised neural networks, both
generative and discriminative, and discuss their functionality from the
perspective of free energy principle. We then provide a framework for
introducing action during inference. We introduce a new measurement called
stochastic surprisal that is a function of the network, the input, and any
possible action. This action can be any one of the outputs that the neural
network has learnt, thereby lending _stochasticity_ to the measurement.
Stochastic surprisal is validated on two applications: Image Quality
Assessment and Recognition under noisy conditions. We show that, while noise
characteristics are ignored to make robust recognition, they are analyzed to
estimate image quality scores. We apply stochastic surprisal on two
applications, three datasets, and as a plug-in on twelve networks. In all, it
provides a statistically significant increase among all measures. We conclude
by discussing the implications of the proposed stochastic surprisal in other
areas of cognitive psychology including expectancy-mismatch and abductive
reasoning.

##  1 Keywords:

Free Energy Principle, Neural Networks, Stochastic Surprisal, Image Quality
Assessment, Robust Recognition, Human Visual Saliency, Abductive Reasoning,
Active Inference

##  2 Introduction

The human visual system is the resultant of an evolutionary process influenced
and constrained by the natural visual stimuli present in the outside
environment (Geisler, 2008; Sebastian et al., 2017). The free energy principle
is an over-arching theory that provides a mathematical framework for this
evolutionary process (Friston, 2009). The principle provides a theory of
cognition that can unify and discuss relationships among fundamental
psychological concepts such as memory, attention, value, reinforcement, and
salience (Friston, 2009). It decomposes the visual system into perception and
action modalities and argues that the visual system is an inference engine
whose objective is to perceive the outside environment as best as it can. If
this perception is insufficient for making an inference, an action is taken to
achieve the objective by influencing the outside environment. While the action
is dependent on the type of inference that is to be made, perception is
dependent on the natural visual stimuli. Hence, a study of the human visual
system warrants a study of the patterns that it is sensitive to. Broadly,
these patterns are classified under natural scene statistics (Geisler, 2008).
Color, luminance, spatio-temporal structures and spectral residues are some
statistics that are useful in performing fundamental visual tasks including
image quality assessment (Zhang and Li, 2012), visual saliency detection (Hou
and Zhang, 2007), and object detection and recognition (Sebastian et al.,
2017).

Image quality assessment is the objective assessment of subjective quality of
images. Visual saliency detection finds those regions in an image that attract
significant human attention. Object recognition attempts to recognize any
given object in an image. Methods like (Hou and Zhang, 2007; Murray et al.,
2013) use spectral residue to detect salient regions. Hou and Zhang (2007)
extend their spectral residue-based saliency detection algorithm to show that
object detection is possible. The spectral residual concept is used in SR-SIM
(Zhang and Li, 2012) and BleSS (Temel and AlRegib, 2016a) to utilize the
frequency characteristics to quantify residuals for IQA. All three disparate
applications share commonalities in their spectral residual statistics that
are used to show comparable performance within each application. Hence,
natural scene statistics and their governing visual system principles are
building blocks of computational machine vision systems that attempt to mimic
human perception.

One such a principle is the consistency in spatial structures that allows for
a sparse set of convolutional kernels to represent natural scenes. Large-scale
neural networks are built on this principle. Neural networks are empowered to
mimic human vision by performing the same tasks as the human visual system
including image quality assessment (Temel et al., 2016), visual saliency
detection (Sun et al., 2020), and object recognition (Krizhevsky et al., 2012)
among others. Recently the generalization capabilities of neural networks has
led to their widespread adoption in a number of computational fields. Neural
networks have produced state-of-the-art results on multifarious data ranging
from natural images (Krizhevsky et al., 2012), computed seismic (Shafiq et
al., 2018b, a), and biomedical images (Prabhushankar et al., 2022;
Prabhushankar and AlRegib, 2021b). In object recognition on Imagenet dataset
(Deng et al., 2009), He et al. (2016) surpassed the top-$5$ human accuracy of
$94.9\%$. In the application of image quality assessment, Bosse et al. (2017)
extracted patch-wise distortion characteristics from images using deep neural
networks before fusing them to obtain an objective quality score. The authors
in Liu et al. (2017) device a sparse representation-based entropic measure of
quality that is inspired by the free energy principle. This is extended in Liu
et al. (2019) where the authors use the free energy principle as a plug-in on
top of existing blind image quality assessment techniques. In both these
works, free energy principle is seen as a technique that measures the
disparity between an outside environment and the the expectation of that
environment through some biologically plausible mechanism. Other existing
works, including (Zhai et al., 2011; Gu et al., 2014), quantify this disparity
to estimate quality.

Hence, from the perspective of free energy principle, neural networks act as
biologically plausible mechanisms to perceive the outside environment. This is
done by supervising the networks to learn particular tasks. Prabhushankar and
AlRegib (2021a) describe supervised learning as associative learning where a
set of learned features is associated with any given class. This class can be
an objective score in image quality assessment or an object class from
recognition. The learned features are associated with a specific dataset and
application, and are not easily transferable (Temel et al., 2018). A number of
recent works including (Temel et al., 2017; Goodfellow et al., 2014; Hendrycks
and Dietterich, 2019) describe the fallibility of neural networks to
adversarial noise and slight perturbations in data arising from acquisition or
environmental errors. The feature representation space can be altered
significantly by noise that is sometimes non-noticeable in data. This is in
contrast with the spectral residual feature which is used to infer both object
(Hou and Zhang, 2007) and image quality (Zhang and Li, 2012; Temel and
AlRegib, 2016a).

We posit that these shortcomings of supervised neural networks are a resultant
of neural networks exclusively utilizing the perception modality of free
energy principle. In other words, the passivity of neural networks during
inference leads to their non-robust nature. This view is corroborated by
Demekas et al. (2020) who identify three challenges in supervised learning.
Firstly, they claim that neural networks lack an explicit control mechanism of
incorporating prior beliefs into predictions. Secondly, neural networks train
via a scalar loss function that does not allow for incorporating uncertainty
in action. Lastly, neural networks do not perform any action during inference
that would elicit changes in the input from the outside environment.

In this paper, we tackle the above challenges by introducing a framework for
action during inference. This is opposed to the free energy principle based
works in Liu et al. (2017, 2019) where the methodology does not require
actions at inference. Based on the free energy principle, we treat any trained
neural network as an inference engine. We define a quantity called _stochastic
surprisal_ that is a function of a neural network’s inference and some action
performed on this inference. Reducing surprisal is generally seen as a single
action that reduces the distributional difference between two quantities.
However, during inference, we have access to only a single data point. We
overcome this challenge by considering that all possible actions that the
network can undertake are equally likely. The term _stochastic_ is derived
based on this assumption of action-randomness. Stochastic surprisal acts on
top of _any_ existing neural networks to address the challenge of passive
inference. Existing neural networks can either be generative or
discriminative. We evaluate stochastic surprisal on two applications including
image quality assessment and robust object recognition. In image quality
assessment, we evaluate our technique to assess the quality of distorted
images at different levels of distortions. Similarly, in robust object
recognition, we recognize distorted images when the original neural network is
only trained on pristine images. In other words, we propose a concept that is
able to assess the noise characteristics in images to assign objective
quality, as well as ignore the same noise characteristics to robustly classify
images. The contributions of this paper include,

  1. 1.

We unify the concepts of image quality assessment and robust object
recognition. We show that the features that are extracted from neural networks
simultaneously characterize the scene and context within the image for
recognition as well as the noise perturbing it’s quality.

  2. 2.

We term our features as _stochastic surprisal_ and relate them to the free
energy principle. We provide a mathematical framework to extract stochastic
surprisal from both discriminative and generative neural networks as a
function of some action.

  3. 3.

We discuss the implications of our proposed method from an abductive reasoning
as well as expectancy-mismatch perspective. Both these concepts lead to
separate applications including context and relevance based contrastive visual
explanations and human visual saliency detection.

We first describe the free energy principle in Section 3.1.1. The free energy
principle is then related to neural networks in Section 3.1.2 before
describing stochastic surprisal. The generation of stochastic surprisal in
generative and discriminative networks is described in Sections 3.1.2 and
3.1.2 respectively. Finally, the applications of image quality assessment and
robust recognition and our methodology is discussed in Section 3.3. The
results are provided in Section 4. We further discuss the implications of the
proposed stochastic surprisal on other cognitive concepts and conclude in
Section 5.

##  3 Theoretical Overview and Methodology

In this section, we provide a thorough background of the free energy principle
and its application in neural networks, both generative and discriminative. We
then define and detail the framework for the extraction of stochastic
surprisal. This is followed by the application of stochastic surprisal in
image quality assessment and robust recognition.

###  3.1 Background

####  3.1.1 Free Energy Principle

The Free Energy Principle (FEP) proposes a theory to explain the self-
organizing capability of any intelligent and adaptive system (Friston, 2009).
FEP assumes the demarcation of a _system_ that exists in an _environment_
through a functional _Markov Blanket_. The Markov Blanket (Hipólito et al.,
2021) provides statistical independence to the system from its environment,
thereby imbuing the system with a sense of _self_. A consequence of this
separation is that the system only experiences the environment through the
Markov Blanket based on a limited set of sensory inputs. These sensory inputs
are used to create a generative model of the outside environment within the
system. The system then performs a limited set of actions affecting the
outside environment while updating its internal model of the outside
environment. The FEP provides a mathematically concrete set of principles to
bound the long-term entropy of the internal generative model that is confined
in the set of all possible sensory inputs and its possible performative
actions. Friston (2019) argues that the assumption of the Markov Blanket and
the ensuing FEP is an overarching theory that provides a tool to study and
explain self-organization at any spatio-temporal scale from infinitesimal
quantum mechanics to generational biological evolution.

In this paper, we are interested in the FEP’s application to visual processes
related to the human brain. The applicability of FEP across concepts such as
memory, attention, value, and reinforcement (Friston, 2009) is possible
because of the central assumption that the  _limited_ sensory inputs from the
outside environment to the brain are also  _likely_ sensory inputs. In other
words, the human brain only allows for a _limited_ set of _likely_ encounters
(Demekas et al., 2020). The term _likely_ is a function of the expectation set
by the internal generative model within the brain. Hence, the brain is
considered to encode a bayesian recognition density that predicts the sensory
inputs based on some hypothesis regarding their cause. This leads to the
proposition that the brain is an inverse generative model where it expects to
sense only a limited set of likely inputs from the environment. Any mismatch
to this expectation is handled in two stages. Firstly, the internal model is
updated with the mismatched sensory input to improve the _perception_.
Secondly, an action is performed to change the environment. This way, the
environment and the model are made to fit each other by reducing the
mismatched input. A mismatched input is typically termed as a _surprising_
event (Buckley et al., 2017). Self-organization in the brain creates an
imperative to minimize the  _surprisal_ of any event and the FEP provides a
mathematical theory of this minimization by providing a tractable upper bound
to the surprisal. Mathematically, average surprisal is the entropy of the
distribution of all events. More _unlikely_ an event, more  _surprisal_ it
creates in the internal model. The free energy decomposed using surprisal
(Demekas et al., 2020) is given by,

$\text{Free Energy}=\text{Divergence}+\text{Surprisal}.$ (1)

Here, divergence is the difference between the variables representing the
outside environment that generate the sensory inputs and the variables in the
internal generative model that mimic the outside world.

####  3.1.2 Free Energy Principle in Neural Networks

The assumption of the existence of an internal tractable generative model that
is an inference engine has been adopted in the construction of early neural
networks. Hinton and Zemel (1993) describe the Helmholtz free energy that is
used to construct autoencoders as agents that minimize the reconstruction cost
and the code cost. The code cost is a function of the entropy of the
probability distribution given a vector. In FEP, this code cost is the
surprisal. Variational Autoencoders (Kingma and Welling, 2019) minimize
Variational Free Energy (VFE) and consequently surprisal. VFE is a
generalization of the Helmholtz free energy where the divergence of the
approximate and true probabilities are minimized (Gottwald and Braun, 2020).
While the generative models of autoencoders lend themselves directly to the
FEP, the discriminative models also train themselves using some variation of a
loss function that resembles free energy. In this paper, we use both
generative and discriminative models and we introduce them in terms of the
free energy principle.

Figure 1: Block diagram for perception (in blue) and proposed action (in red)
for a sparse autoencoder. The image $x$ is taken from the CURE-TSR dataset
(Temel et al., 2017). The training loss function is $J(\theta,\phi)$. The
latent representation $z=f_{\theta}(\cdot)$ is $z_{g}$. The reconstructed
image is shown as $\hat{x}$. This forms the perception pipeline. The action
pipeline is shown in red where the action $\mathcal{A}_{g}$ is backpropagated
through the decoder to the latent representation space. The learned blue
perception representation space $z_{g}$ changes to the action space
$z_{g}^{a}$ as a consequence of $\mathcal{A}_{g}$. This change is stochastic
surprisal, given by $\frac{\partial\mathcal{A}_{g}(x,\hat{x})}{\partial\phi}$.

##### Generative Networks

In this section, we consider a general autoencoder as our generative model. An
autoencoder is an unsupervised learning network which learns a regularized
representation of inputs to reconstruct them as its output (Hinton and Zemel,
1993; Kwon et al., 2019). Since Hinton and Zemel (1993), a number of
variations have been proposed to autoencoders to construct either application-
specific or property-specific networks. These variations generally deal with
constraining the latent representations learned by an autoencoder. For
instance, Ng (2011) constrain the latent representation to be sparse, thereby
constructing sparse autoencoders. Kingma and Welling (2013) constrain the
latent representation to follow a Gaussian distribution. These are termed as
variational autoencoders. These are two instances of property-specific
autoencoders. Application-specific autoencoders include fully-connected
networks used for image compression (Gedeon and Harris, 1992), and
convolutional autoencoders for image denoising (Mao et al., 2016).

All these autoencoders consist of the same base architecture as shown in Fig.
1. They consist of an encoder $f_{\theta}(\cdot)$, parameterized by $\theta$
to map inputs $x$ to a latent representation $z_{g}$. These latent
representations $z_{g}$ are used to reconstruct the same input $\hat{x}$ using
a decoder $g_{\phi}(\cdot)$. This operation is mathematically represented as,

$z=f_{\theta}(x)\quad\hat{x}=g_{\phi}(z)=g_{\phi}(f_{\theta}(x)),$ (2)

For a natural image input, $x\in\mathbb{R}^{H\times W\times C}$, where $H,W,C$
are height, width, channel of input image, respectively. The encoder and
decoder are trained jointly by minimizing a loss function $J(\theta,\phi)$
defined as:

$J(\theta,\phi)=\mathcal{L}(x,g_{\phi}(f_{\theta}(x)))+\Omega(z_{g};\theta,\phi),\vspace{-1.5mm}$
(3)

where $\mathcal{L}$ is a reconstruction error which measures the dissimilarity
between the input $x$, and the reconstructed image $\hat{x}$. $\Omega$ is a
regularization term added to avoid overfitting the network to the training set
and to imbue the required constraints. For a sparse autoencoder, $\Omega$ is
an $l_{1}$ sparsity constraint. However, since the $l_{1}$ constraint is not
differentiable, a practical solution for constructing this sparsity constraint
is to use KL-Divergence on $z_{g}$. Specifically, the sum of $z_{g}$ is
constrained to either zero or a very small value using a distance metric like
KL-Divergence. This is shown in Fig. 1 in blue.

During training, the network parameters, $\theta$ and $\phi$ are updated by
backpropagating the gradients of $J(\theta,\phi)$ w.r.t. the parameters. The
update rule is given by,

$\theta^{\prime}=\theta-\frac{\partial
J(\theta,\phi)}{\partial\theta},\quad\phi^{\prime}=\phi-\frac{\partial
J(\theta,\phi)}{\partial\phi},$ (4)

The two gradients provide the change in the network parameters required to
incorporate better perception capabilities as measured by the loss function
$J(\theta,\phi)$.

Consider Eq. 3 and compare this against the free energy decomposition in Eq.
1. The $\mathcal{L}$ reconstruction error measures the divergence. The
regularization is the surprisal. Technically, regularization prevents the
network from reconstructing $x$ exactly. Hence, surprisal is _added_ in
generative networks to make them generalizable. A thorough analysis of
regularization for reconstruction and feature transfer of autoencoders to
multiple tasks is provided in Prabhushankar et al. (2018). While
regularization impacts the reconstruction negatively, it enhances the
adaptability and usability of features for generalized tasks and test sets.

##### Discriminative Networks

Discriminative networks are neural networks whose function is to assign labels
to input data. While the required training data in generative networks are
images $x\in\mathbb{R}^{H\times W\times C}$, the training data for
discriminative networks are $(x,y)$, where $x\in\mathbb{R}^{H\times W\times
C}$ and $y\in[1,N]$. Here, $y$ is an integer label assigned to $x$, ranging
between $1$ and the total number of classes $N$. The goal of a discriminative
network is to assign the label $y$, given $x$ at inference. The simplest
discriminative network is an image classification network. Consider an
$L$-layered network $f(\cdot)$ trained to classify images on a domain
$\mathcal{X}$. For the task of classification, where $f(\cdot)$ is trained to
classify between $N$ classes, the last layer is commonly a fully connected
layer consisting of $N$ weights or filters. During inference, the
representation space $z_{d}=f_{L-1}(x)$ after the first $(L-1)$ layers are
projected independently onto each of the $N$ filters. The filter with the
maximum projection is inferred as the class $\hat{y}$ to which $x$ belongs.
Mathematically, $z_{d}$ and $\hat{y}$ are related as,

$\displaystyle z_{d}=f_{L-1}(x),$ (5)
$\displaystyle\tilde{y}=\operatorname*{arg\,max}$
$\displaystyle(W_{L}^{T}z_{d}+b_{L}),\quad\hat{y}=\operatorname*{arg\,max}(\tilde{y})$
(6) $\displaystyle\forall W_{L}\in\Re^{d_{L-1}\times N},$ $\displaystyle
z\in\Re^{d_{L-1}\times 1},b_{L}\in\Re^{N\times 1},\tilde{y}\in\Re^{N\times
1},\hat{y}\in[1,N],$ (7)

where $W_{L}$ and $b_{L}$ are the parameters of the final fully connected
layer. Note our choice of the variable $z_{d}$. This is a similar variable
that is used to denote the latent representation in Eq. 2. Similar to the
decoder $g_{\phi}(\cdot)$ acting on $z_{g}$ in generative networks, we have
the final fully connected layer $W_{L}$ and $b_{L}$ acting on $z_{d}$. This
forms the perception pipeline that classifies $x$ as $\hat{y}$. This is shown
in blue in Fig. 2.

Training an image classification technique requires a loss function
$J(\hat{y},y;\theta)$, where $\theta$ are the network parameters and $(x,y)$
are the image-label pairs required for training. A common choice of $J(\cdot)$
is the cross-entropy loss. Considering $\sigma(\tilde{y})$ to be the softmax
probability distribution of the output vector from $f(\cdot)$, the cross-
entropy loss interms of KL-Divergence and entropy can be expressed as,

$J(\cdot)=\text{KL}(y||\sigma(\tilde{y}))-\sum_{i=1}^{N}(\sigma(\tilde{y_{i}}))ln(\sigma(\tilde{y_{i}})).$
(8)

Here, $\text{KL}(||)$ refers to the KL-divergence between the probability
output of the network and the label vector $y$ expressed as a one-hot
probability distribution. Notice the similarity between Eqs. 1 and 8. The
divergence in the FEP is the KL divergence and the surprisal is the entropy
given by the second term in Eq. 8. Unlike the generative networks, surprisal
is not introduced into the network. Rather, the existing surprisal is
minimized. A number of foundational works in FEP (Friston, 2009, 2019) use the
entropy of a distribution to describe free energy. The network is then trained
by backpropagating the errors w.r.t $\theta$ similar to Eq. 4.

Figure 2: Block diagram for perception (in blue) and proposed action (in red)
for a classification network. The image $x$ is taken from the CURE-TSR dataset
(Temel et al., 2017). The perception pipeline is shown in blue where the
network assigns a class $3$ to $x$. The action pipeline is shown in red where
the action $\mathcal{A}_{d},a=1$ is backpropagated through the final fully
connected layer to the learned blue perception manifold $z_{d}$. $z_{d}$
changes to the action manifold $z_{d}^{a}$ as a consequence of
$\mathcal{A}_{d}$. This change is stochastic surprisal, given by
$\frac{\partial\mathcal{A}_{d}(\hat{y},i;W)}{\partial W_{L}}$.

##### Terminologies

Before describing our contributions, we summarize a few key terminologies that
are extensively used within the FEP setup and how they relate to neural
networks.

External state of the world $\mathcal{X}$ is the observed distribution of the
outside world and each $x\in\mathcal{X}$ is an instance of this distribution.
When describing discriminative systems, data is denoted as $(x,y)$ where $x$
is the data point and $y$ is its label. When dealing with generative models,
data is $x$ only. When there is some distortion associated with the outside
environment, the sampled data is $x^{\prime}$ and the distribution is
$\mathcal{X}^{\prime}$. We will see $\mathcal{X}^{\prime}$ and $x^{\prime}$ in
IQA and recognition experiments when input data are distorted by noise.

System A neural network $f(\cdot)$ trained on a distribution $\mathcal{X}$. A
trained system is one that does not take in any external inputs to change or
update its weights. We consider that a trained system is at NESS density. For
a discriminative network, $f(\cdot)$ is the entire system and its training
data is denoted by $(x,y)$. For a generative network, $f_{\theta}(\cdot)$ is
an encoder trained to produce a latent representation space $z_{g}$ given data
denoted by $x$ and $g_{\phi}(\cdot)$ is the decoder trained to reconstruct the
image given a latent representation $z_{g}$.

Markov Blanket The part of the system that produces the latent representation
$z$. In a generative system the markov blanket is the encoder
$f_{\theta}(\cdot)$ and in a discriminative system, the markov blanket is the
initial part of the network from Eq. 5, $f_{L-1}(\cdot)$.

Internal State of the system Let $z$ denote the internal state of the latent
representation within a system. Given a generative network, the latent
representation after the encoder, $z_{g}=f_{\theta}(x)$ is the internal state.
Given a discriminative network, the internal state is $z_{d}=f_{L-1}(x)$. The
internal states of both the networks are interchangeably referred to as latent
representations or as perception manifolds. Note that similar to external
state, if an input $x$ is distorted to $x^{\prime}$, its internal state is
also distorted and we will use either $z^{\prime}_{d}$ or $z^{\prime}_{g}$ to
denote the internal state of the system. Given any action, $a$, the internal
state shifts to $z^{a}$ to accommodate this action without necessarily
changing $x$. All these states are shown in Figs. 1 and 2.

###  3.2 Stochastic Surprisal

During inference, the networks are passive. As discussed in Section 2 and
noted by Demekas et al. (2020), there is no mechanism to include a non-scalar
surprisal that allows for an action during inference. In this paper, we
alleviate this challenge by defining a new quantity called _stochastic
surprisal_ as a function of a hypothetical action. Consider the differences in
the existing definitions of surprisal. In generative networks from Eq. 3,
surprisal is the induced regularization that prevents overfitting and creates
specific constraints for a latent representation $z_{g}$. In discriminative
networks from Eq. 8, surprisal is the entropy of the network’s predicted
distribution obtained from a linear combination on $z_{d}$. While the
surprisal in Eq. 1 deals with bounding the system’s surprise of the
distributional divergence between the internal model and external environment,
the regularization-based and entropy-based definitions provide a
mathematically-tractable definition in neural networks. In this paper, we
provide a new mathematically-tractable definition of surprisal that is
inherently a function of an action $\mathcal{A}$ and its effect on the
network. A formal definition is provided first.

######  Definition 3.1 (Stochastic Surprisal).

Given a trained neural network $f_{\theta}(\cdot)$ parameterized by $\theta$,
the gradient change $\frac{\partial\mathcal{A}}{\partial\theta}$ with respect
to the network parameters for all possible actions $\mathcal{A}$ from the
perspective of $f_{\theta}(\cdot)$ is termed stochastic surprisal.

Stochastic surprisal measures the change required in the trained perception
network to measure any given action $\mathcal{A}$. It is stochastic since it
does not measure the divergence between distributions but rather a single data
point’s influence on the network. It is a non-scalar value that acts on the
network parameters according to Eq. 4. Note that we do not actually update the
network. Rather, we only measure the network update and use it as a surprisal
quantity. This update is possible based on some action all of which are
considered equally likely. A thorough discussion of the naming is provided in
Section 5.1.

####  3.2.1 Action and Stochastic Surprisal

Action is a function of any application. We first define it in a general
fashion for generative and discriminative networks. In Section 3.3, we define
it specifically for image quality assessment and robust recognition.

##### Generative Networks

The action in generative networks is straightforward. Given an image $x$ and
its reconstructed image $\hat{x}$, the possible action is to change the weight
parameters in a way that reduces the disparity between $x$ and $\hat{x}$. In
this paper, we quantify this disparity as the Mean Square Error given by
$\lVert x-\tilde{x}\rVert_{2}^{2}$. However, as described in Section 3.1.2,
the surprisal is present in the regularization terms. Hence, any action
performed has to account for this surprisal. In this paper, we use the elastic
net regularization. The overall action that induces a change in the network is
given by,

$\mathcal{A}_{g}=\lVert x-\hat{x}\rVert_{2}^{2}+\beta\sum_{j=1}^{h}{\rm
KL}(z_{j}||\hat{\rho}_{j})+\lambda\lVert W\rVert_{2}^{2}.$ (9)

where $\mathcal{A}_{g}$ is a generative action. $\lVert
x-\hat{x}\rVert_{2}^{2}$ is the MSE loss function, and $\lVert
W\rVert_{2}^{2}$ is the regularization on the weights. $\sum_{j=1}^{h}{\rm
KL}(z_{j}||\hat{\rho}_{j})$ is the sparsity constraint denoted as the
divergence between the latent representation and some small value
$\hat{\rho}_{j},j\in[1,h]$ where $h$ is the size of the latent representation.
By minimizing the KL divergence, the latent variables $z_{j},j\in[1,h]$ are
made sparse. $\beta$ and $\lambda$ are hyperparameters controlling the
regularization.

Stochastic surprisal is the the gradient of this action $\mathcal{A}_{g}$ with
respect to the decoder weights. The action pipeline along with the stochastic
surprisal generation is shown in Fig. 1 in red. At inference, a test image is
passed through a trained network and reconstructed. The action from Eq. 9 is
calculated and backpropagated to the latent representation space $z_{d}$. The
change, measured as the gradients, creates a change in $z_{d}$ and the new
action manifold is termed $z_{d}^{a}$. A toy example of the geometric
interpretation of this change is also shown Fig. 1. The blue perception
manifold $z_{g}$ that reconstructs $\hat{x}$ is acted on by $\mathcal{A}_{g}$
to obtain a new red action manifold $z_{d}^{a}$. The decoder can use this
space to reconstruct $x$ exactly. In Section 4, we show how these generated
gradients can be used as features for image quality assessment. Note that we
keep the perception pipeline as is and make no changes to the training
process.

##### Discriminative Networks

The action $\mathcal{A}_{d}$ in discriminative networks is more involved than
generative networks. While in generative networks, the possible action is to
reconstruct the image with higher fidelity, in discriminative networks, the
action can take any one of $N$ outcomes. At inference, discriminative networks
are given an image $x$ and asked to predict its label $y$. Assuming that
$\hat{y}$ is the prediction, the action we use to elicit change in the network
parameters is by backpropagating an action class $a$ in the loss function
$J(\hat{y},a;W),a\in[1,N]$.

$\mathcal{A}_{d}=\lVert a_{i}-\tilde{y}\rVert_{2}^{2},i\in[1,N].$ (10)

Here $a_{i}$ is the action class defined as a Kronecker delta function given
by,

$a_{i}=\begin{cases}1,&\text{if }i=\text{class},\\\
0,&\text{otherwise}\end{cases}$ (11)

There is no regularization added to the discriminative action since the
probability distribution $\sigma(\tilde{y})$ derived from $\tilde{y}$ is a
function of its surprisal entropy. Note that we use an MSE function for
$\mathcal{A}_{d}$ in Eq. 10 similar to $\mathcal{A}_{g}$ from Eq. 9. An
important difference between Eqs. 9 and 10 is the number of possible actions.
In discriminative networks that classify between $N$ classes, there are $N$
possible $i$ in Eq. 10. Hence, there are $N$ possible actions
$\mathcal{A}_{d}$ and $N$ possible surprisals
$\frac{\partial\mathcal{A}_{d}^{i}}{\partial W_{L}},\forall i\in[1,N]$. The
action pipeline for discriminative network for a toy example where the
predicted class is $3$ and the action class is $1$ is shown in Fig. 2 in red.
The surprisals are the red gradients from the final fully connected layer. We
also show the geometric interpretation of a given action on the learned
representation space $z_{d}$. The blue perception manifold is acted upon by
$\mathcal{A}_{d}^{1}$ through $\frac{\partial\mathcal{A}_{d}^{1}}{\partial
W_{L}}$ to obtain the red action manifold. Note that there are $N$ such
possible red $z_{d}^{a}$ due to the $N$ possible actions. This idea of $N$
separate gradients to characterize data is not new. In Settles et al. (2007),
the authors construct positive and negative instance labels for a given input
$x$ in a binary decision setting. This is done to quantify uncertainty in an
active learning setting. In this paper, we extend this characterization to
$N$-label settings and use the image-label pairs to extract stochastic
surprisal from the network.

Notice the difference in the definitions of action. In FEP, the generative
model acts on the outside world creating a change that reduces its surprisal.
Our definition in Eq. 10 is the same one that is used in I-FGSM (Goodfellow et
al., 2014) adversarial generation technique. Eq. 10 is continuously applied
and a gradient w.r.t. the input, i.e. $\frac{\partial\mathcal{A}_{d}}{\partial
x}$, is added to $x$ until the prediction changes adversarially. Changing the
input would be a true action from the FEP sense. However, in this paper, we do
not explicitly change the outside world or $x$. Rather, we measure the effect
of such a change on the network using $\frac{\partial\mathcal{A}_{d}}{\partial
W_{L}}$ without making said change.

###  3.3 Methodology

We validate the effectiveness of stochastic surprisal during inference on two
applications: Image Quality Assessment (IQA) and Robust Classification. The
action gradients, $\frac{\partial\mathcal{A}}{\partial\phi}$ are used in two
ways. The first approach is to use the surprisal gradients as error
directions. This is done by projecting images with and without distortions
onto the gradient space and comparing them. In this case, the surprisal acts
as a measurement between the images and acts as a Full-Reference IQA metric.
The second approach is to directly use surprisal gradients as feature vectors.
The directional change caused by the actions is dependent on the network, the
input and the action class. By keeping the network same across action classes,
surprisal becomes a characteristic of the data. This approach is explored for
the application of robust classification.

Figure 3: Block diagram of the proposed framework of IQA as a plug-in on top
of Temel et al. (2016).

####  3.3.1 Image Quality Assessment

Image quality assessment is a field of image processing that objectively
estimates the perceptual quality of a degraded image. Multiple methods have
been proposed to predict the subjective quality of images (Ponomarenko et al.,
2011; Wang et al., 2004, 2003; Wang and Li, 2011; Sampat et al., 2009; Zhang
and Li, 2012; Zhang et al., 2011; Mittal et al., 2012; Temel and AlRegib,
2019; Prabhushankar et al., 2017a, 2018). All these methods extract structure
related hand-crafted features from both reference and distorted images and
compare them to predict the quality. Recently, machine learning models
directly extract features from images Temel et al. (2016); Prabhushankar et
al. (2017b); Bosse et al. (2017). The authors in (Bosse et al., 2017) propose
to do so in either the presence or absence of the original pristine image. In
Ma et al. (2021), the authors propose a free energy inspired technique to
predict the quality. They use a Generative-Adversarial Network as the base
perception module and an additional CNN to model content and degradation
dependent characteristics. In this paper, we approach the action module in FEP
as a function of the perception module itself. We do so by extracting
stochastic surprisal from the same perception network. Hence, our method acts
as a plug-in on top of existing quality estimators. In this paper, we show
quantitative results by plugging-in on top of UNIQUE (Temel et al., 2016) and
qualitative results on top of Bosse et al. (2017). We first describe and
motivate the usage of UNIQUE for quantitative results.

UNIQUE: We choose UNIQUE as the base technique since it follows the generative
process described in Section 3.1.2 and Fig. 1. This allows for the generation
of stochastic surprisal from Eq. 3 based on the Action in Eq. 9. The authors
in Temel et al. (2016) train a sparse autoencoder with a one layer encoder and
decoder and a sigmoid non-linearity on $100,000$ patches of size $8\times
8\times 3$ extracted from ImageNet (Deng et al., 2009) testset. The
autoencoder is trained with MSE reconstruction loss. This network is
$f(\cdot)$ from Eq. 3. UNIQUE follows a full reference IQA workflow which
assumes access to both reference and distorted images while estimating
quality. The reference and distorted images are converted to YGCr color space
and converted to $8\times 8\times 3$ patches. These patches are mean
subtracted and ZCA whitened before being passed through the trained encoder.
The activations of all reference patches in the latent space are extracted and
concatenated. Activations lesser than a threshold of $0.025$ are suppressed to
$0$. The choice of threshold $0.025$ is made based on the sparsity coefficient
used during training. Similar procedure is followed for distorted image
patches. The suppressed and concatenated features of both the reference and
distorted images are compared using Spearman correlation. The resultant is the
estimated quality of the distorted image.

##### Proposed Methodology

We provide the block diagram for the proposed methodology in Fig. 3. Both the
pristine and distorted images go through the same pre-processing steps
detailed in UNIQUE (Temel et al., 2016) and are projected onto the stochastic
surprisal gradients of the decoder. The gradients
$\frac{\partial\mathcal{A}_{g}}{\partial\phi}$ are extracted by
backpropagating Eq. 9. In this paper, we use the same hyperparameters
$\beta=3$, $\lambda=3e^{-3}$, and $\rho_{j}=0.035$ as used in Temel et al.
(2016). Once projected, the resultant is passed through an inverse sigmoidal
layer to obtain the latent representation. Note that the latent representation
is $z_{g}$ for the pristine image and $z^{\prime}_{g}$ for the distorted
image. Once passed through the inversion layer, both the magnitude and phase
of each latent representation is concatenated and their spearman correlation
coefficient is taken to estimate the quality score of the image.

####  3.3.2 Robust Classification

The goal is to characterize an image $x$ using all $N$ actions. Consider an
image $x$ whose class as predicted by $f_{\theta}(\cdot)$ is $\hat{y}$.
Stochastic surprisal of $x$ against class $1$ is provided by backpropagating a
loss between $\hat{y}$ and $1$ and obtaining corresponding gradients. The
gradient is proportional to $\mathcal{A}_{d}(\hat{y},1;W_{L})$, where $W$ is
the weight parameters and $1$ is the action class. Specifically, it is
$\nabla_{W_{L}}\mathcal{A}_{d}(\hat{y},1;W_{L})$ for weights in layer $L$ and
class $i\in[1,N]$. We backpropagate over all $N$ classes to obtain the overall
surprisal features across all classes. The final feature, $r_{x}$ for an image
$x$, is given by concatenating all individual features and $r_{x}$ is
characteristic of image $x$. Hence,

$\begin{gathered}r_{i}=(\nabla_{W_{L}}\mathcal{A}_{d}(\hat{y},i;W_{L}))),\forall
i\in[1,N],\\\ r_{x}=[r_{1},r_{2}\dots r_{N}].\end{gathered}$ (12)

Given a trained feed-forward network $f(\cdot)$ and image $x$, we extract
gradients using Eq. 12 which serve as our features. Gradients as features are
used in diverse applications including visual explanations (Selvaraju et al.,
2017; Prabhushankar et al., 2020; Prabhushankar and AlRegib, 2021b),
adversarial attacks (Goodfellow et al., 2014), anomaly detection (Kwon et al.,
2020), and image quality assessment (Kwon et al., 2019) among others. In this
work, we use gradients as features to characterize data.

Table 1: Structure of $\mathcal{H}(\cdot)$ for different ResNet architectures as $f(\cdot)$. Network $f(\cdot)$ |  Structure of $\mathcal{H}(\cdot)$ \- All layers separated by sigmoid
---|---
ResNet-18,34 | $640\times 300-300\times 100-100\times 10$
ResNet-50, 101 | $2560\times 300-300\times 100-100\times 10$

MLP ($\mathcal{H}(\cdot)$): Once $r_{x}$ is obtained for all $N$ classes, the
surprisal feature is now analogous to $z_{d}$ from Eq. 5. However, $r_{x}$ is
of dimensionality $\Re^{(N\times d_{L-1})\times 1}$ since it is a
concatenation of $N$ gradients. To account for the larger dimension size, we
classify $r_{x}$ by training an MLP $\mathcal{H}(\cdot)$ on top of $r_{x}$
derived from training data. In this paper, we use a simple three layered MLP
as $\mathcal{H}(\cdot)$ with sigmoid activations. The exact structure of the
MLP is dependent on $d_{L-1}$ of the base $f(\cdot)$ network and is given in
Table 1 for ResNets 18,34,50, and 101 (He et al., 2016) that are considered in
Section 4.

Training $\mathcal{H}(\cdot)$: The concatenated $r_{x}$ features for all
training data are extracted and normalized. $\mathcal{H}(\cdot)$ is trained on
all training $r_{x}$ using the same training procedure as the perception
network $f(\cdot)$. $\mathcal{H}(\cdot)$ is trained for $200$ epochs with SGD
optimizer and cross-entropy loss, momentum $=0.9$, weight decay $=5e-4$, and
adaptive learning rates of $0.1,0.02,0.004$ changed at epochs $60,120,160$
respectively.

Testing using $f(\cdot)$ and $\mathcal{H}(\cdot)$: During test time, the
proposed framework operates in three steps. In step 1, as shown in Eq. 13, the
given image passes through the perception network to provide a coarse
estimation $\hat{y}$. In step 2, the stochastic surprisal features $r_{x}$ are
extracted according to Eq. 14 and concatenated. In step 3, $r_{x}$ is
normalized and passed through the MLP $\mathcal{H}(\cdot)$ to obtain the final
prediction $\tilde{y}$. This is shown in Eq. 15.

$\displaystyle\hat{y}=\operatorname*{arg\,max}f(x),$ (13) $\displaystyle
r_{x}=[(\nabla_{W_{L}}\text{MSE}(\hat{y},\delta^{i}_{i})),\forall i\in[1,N]],$
(14) $\displaystyle\tilde{y}=\mathcal{H}(r_{x}),$ (15)

Note that we substituted $\mathcal{A}_{d}$ in Eq. 14 with the MSE formulation
of action from Eq. 10.

##  4 Results

Table 2: Overall performance of image quality estimators.

Databases |  PSNR |  SSIM |  MS |  CW |  IW |  SR |  FSIM |  FSIMc |  BRIS |  BIQI |  BLII |  Per |  CSV |  UNI |  COHER |  SUM |  Proposed
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---
HA |  |  SSIM |  SSIM |  SSIM |  SIM |  |  |  QUE |  |  NDS2 |  SIM |  |  QUE |  ENSI |  MER |
| Outlier Ratio (OR, $\downarrow$)
MULTI |  0.013 |  0.016 |  0.013 |  0.093 |  0.013 |  0.000 |  0.018 |  0.016 |  0.067 |  0.024 |  0.078 |  0.004 |  0.000 |  0.000 |  0.031 |  0.000 |  0.000
TID13 |  0.615 |  0.734 |  0.743 |  0.856 |  0.701 |  0.632 |  0.742 |  0.728 |  0.851 |  0.856 |  0.852 |  0.655 |  0.687 |  0.640 |  0.833 |  0.620 |  0.620
| Root Mean Square Error (RMSE, $\downarrow$)
MULTI |  11.320 |  11.024 |  11.275 |  18.862 |  10.049 |  8.686 |  10.866 |  10.794 |  15.058 |  12.744 |  17.419 |  9.898 |  9.895 |  9.258 |  14.806 |  8.212 |  7.943
TID13 |  0.652 |  0.762 |  0.702 |  1.207 |  0.688 |  0.619 |  0.710 |  0.687 |  1.100 |  1.108 |  1.092 |  0.643 |  0.647 |  0.615 |  1.049 |  0.630 |  0.596
DRv1 |  16.19 |  17.11 |  16.17 |  17.18 |  14.02 |  13.64 |  12.98 |  13.24 |  - |  - |  - |  16.01 |  15.07 |  13.59 |  21.82 |  16.98 |  13.85
DRv2 |  16.47 |  16.42 |  15.76 |  17.48 |  14.04 |  13.17 |  12.82 |  12.92 |  - |  - |  - |  16.23 |  15.35 |  13.19 |  21.57 |  17.59 |  13.24
| Pearson Linear Correlation Coefficient (PLCC, $\uparrow$)
MULTI |  0.801 |  0.813 |  0.803 |  0.380 |  0.847 |  0.888 |  0.818 |  0.821 |  0.605 |  0.739 |  0.389 |  0.852 |  0.852 |  0.872 |  0.622 |  0.901 |  0.908
-1 |  -1 |  -1 |  -1 |  -1 |  0 |  -1 |  -1 |  -1 |  -1 |  -1 |  -1 |  -1 |  -1 |  -1 |  0 |
TID13 |  0.851 |  0.789 |  0.830 |  0.227 |  0.832 |  0.866 |  0.820 |  0.832 |  0.461 |  0.449 |  0.473 |  0.855 |  0.853 |  0.869 |  0.533 |  0.861 |  0.877
-1 |  -1 |  -1 |  -1 |  -1 |  0 |  -1 |  -1 |  -1 |  -1 |  -1 |  -1 |  -1 |  0 |  -1 |  -1 |
DRv1 |  0.731 |  0.693 |  0.732 |  0.586 |  0.800 |  0.819 |  0.833 |  0.830 |  - |  - |  - |  0.738 |  0.738 |  0.820 |  0.432 |  0.698 |  0.800
-1 |  -1 |  -1 |  -1 |  0 |  1 |  1 |  1 |  - |  - |  - |  -1 |  -1 |  1 |  -1 |  -1 |
DRv2 |  0.709 |  0.702 |  0.738 |  0.521 |  0.799 |  0.826 |  0.836 |  0.833 |  - |  - |  - |  0.720 |  0.720 |  0.825 |  0.417 |  0.658 |  0.815
-1 |  -1 |  -1 |  -1 |  -1 |  0 |  1 |  1 |  - |  - |  - |  -1 |  -1 |  0 |  -1 |  -1 |
| Spearman’s Rank Correlation Coefficient (SRCC, $\uparrow$)
MULTI |  0.715 |  0.860 |  0.836 |  0.631 |  0.884 |  0.867 |  0.864 |  0.867 |  0.598 |  0.611 |  0.386 |  0.818 |  0.849 |  0.867 |  0.554 |  0.884 |  0.887
-1 |  0 |  -1 |  -1 |  0 |  0 |  0 |  0 |  -1 |  -1 |  -1 |  -1 |  -1 |  0 |  -1 |  0 |
TID13 |  0.847 |  0.742 |  0.786 |  0.563 |  0.778 |  0.807 |  0.802 |  0.851 |  0.414 |  0.393 |  0.396 |  0.854 |  0.846 |  0.860 |  0.649 |  0.856 |  0.865
-1 |  -1 |  -1 |  -1 |  -1 |  -1 |  -1 |  -1 |  -1 |  -1 |  -1 |  0 |  -1 |  0 |  -1 |  0 |
DRv1 |  0.739 |  0.702 |  0.738 |  0.760 |  0.798 |  0.807 |  0.823 |  0.820 |  - |  - |  - |  0.742 |  0.769 |  0.810 |  0.518 |  0.706 |  0.807
-1 |  -1 |  -1 |  -1 |  -1 |  0 |  1 |  1 |  - |  - |  - |  -1 |  -1 |  0 |  -1 |  -1 |
DRv2 |  0.720 |  0.705 |  0.738 |  0.755 |  0.795 |  0.809 |  0.819 |  0.816 |  - |  - |  - |  0.727 |  0.755 |  0.813 |  0.525 |  0.672 |  0.816
-1 |  -1 |  -1 |  -1 |  -1 |  -1 |  0 |  0 |  - |  - |  - |  -1 |  -1 |  0 |  -1 |  -1 |
| Kendall’s Rank Correlation Coefficient (KRCC, $\uparrow$)
MULTI |  0.532 |  0.669 |  0.644 |  0.457 |  0.702 |  0.678 |  0.673 |  0.677 |  0.420 |  0.440 |  0.268 |  0.624 |  0.655 |  0.679 |  0.399 |  0.698 |  0.702
-1 |  0 |  0 |  -1 |  0 |  0 |  0 |  0 |  -1 |  -1 |  -1 |  -1 |  0 |  0 |  -1 |  0 |
TID13 |  0.666 |  0.559 |  0.605 |  0.404 |  0.598 |  0.641 |  0.629 |  0.667 |  0.286 |  0.270 |  0.277 |  0.678 |  0.654 |  0.667 |  0.474 |  0.667 |  0.677
0 |  -1 |  -1 |  -1 |  -1 |  -1 |  -1 |  0 |  -1 |  -1 |  -1 |  0 |  0 |  0 |  -1 |  0 |
DRv1 |  0.534 |  0.505 |  0.537 |  0.559 |  0.597 |  0.609 |  0.629 |  0.626 |  - |  - |  - |  0.537 |  0.563 |  0.609 |  0.357 |  0.503 |  0.605
-1 |  -1 |  -1 |  -1 |  0 |  0 |  1 |  1 |  - |  - |  - |  -1 |  -1 |  0 |  -1 |  -1 |
DRv2 |  0.517 |  0.509 |  0.539 |  0.553 |  0.595 |  0.613 |  0.626 |  0.623 |  - |  - |  - |  0.525 |  0.594 |  0.613 |  0.342 |  0.475 |  0.616
-1 |  -1 |  -1 |  -1 |  -1 |  0 |  1 |  0 |  - |  - |  - |  -1 |  -1 |  0 |  -1 |  -1 |

###  4.1 Image Quality Assessment

We report the results of the our proposed method in comparison with commonly
cited methods in this section. We first discuss the the datasets used for
comparison as well as the evaluation metrics. We finally show the results in
Table 2 and discuss these results.

Datasets We compare our proposed quality estimation technique on three
datasets - MULTI-LIVE (Jayaraman et al., 2012), TID2013 (Ponomarenko et al.,
2015), and DR IQA (Athar and Wang, 2023). We choose MULTI-LIVE and TID2013
datasets for two reasons. Firstly, our proposed technique is a plug-in
approach on top of an existing technique (Temel et al., 2016). Hence, it is
imperative to compare against and show results on datasets that were used in
Temel et al. (2016). Secondly, the two datasets provide access to seven
categories of distortion among five levels. This is useful in comparison
against the recognition experiments discussed in Section 4.2 which follows a
similar setup. The complex distortions can either be a combination of multiple
distortions such as distortions generated in the MULTI-LIVE dataset Jayaraman
et al. (2012) or the human visual system (HVS) specific peculiar distortions
such as the ones presented in the TID2013 (Ponomarenko et al., 2015) dataset.
A more challenging scenario is presented in DR IQA dataset, where the authors
conjecture a degraded reference setting for image quality assessment. In this
setting, pristine images are unavailable as a reference. Instead, singly
distorted images are used as reference to construct IQA metrics for multiply
distorted images. In Table 2, we provide results for DR IQA dataset as DRv1
and DRv2 based on the author’s division of the dataset. Each of DRv1 and DRv2
have $31,790$ multiply distorted images and $1,122$ singly distorted images.
Additionally, this dataset does not have _true_ subjective quality scores from
humans but is derived from a synthetic quality benchmark. This synthetic score
uses existing Full Reference metrics for quality generation including some of
comparisons in Table 2.

Evaluation metrics The performance is validated using outlier ratio
(consistency), root mean square error (accuracy), Pearson correlation
(linearity), Spearman correlation (rank), and Kendall correlation (rank).
Arrows next to each metric in Table 2 indicate the desirability of a higher
number ($\uparrow$) or a lower number($\downarrow$). Statistical significance
between correlation coefficients is measured with the formulations suggested
in ITU-T Rec. P.1401 ITU-T (2012) and provided below each correlation
coefficient. A 0 value corresponds to statistically similar performance, -1
means the method is statistically inferior to proposed method, and 1 indicates
that the method is statistically superior to proposed method. Two best
performing methods for each metric are highlighted.

Results We compare our proposed stochastic surprisal-based UNIQUE against
other image quality estimators based only on handcrafted features and
perception pipeline in Table 2. These compared full reference estimators
include PSNR-HA (Ponomarenko et al., 2011), SSIM (Wang et al., 2004), MS-SSIM
(Wang et al., 2003), CW-SSIM (Sampat et al., 2009), IW-SIM (Wang and Li,
2011), SR-SIM (Zhang and Li, 2012), FSIM (Zhang et al., 2011), FSIMc (Zhang et
al., 2011), PerSIM (Temel and AlRegib, 2015), CSV (Temel and AlRegib, 2016b),
UNIQUE (Temel et al., 2016). We also compare against no reference metrics
including BRISQUE (Mittal et al., 2012), BIQI (Moorthy and Bovik, 2010), and
BLIINDS2 (Saad et al., 2012). All these techniques were also comapred against
the base UNIQUE algorithm in Temel et al. (2016). In addition to these, we
compare against new estimators including COHERENSI (Temel and AlRegib, 2019)
and SUMMER (Temel and AlRegib, 2019). SUMMER beats UNIQUE among six of the ten
categories. Note that we do not show results for BRISQUE, BIQI, and BLIINDS2
for DR IQA dataset since NR methods, that are generally trained on singly
distorted images, exhibit a large performance gap on multiply distorted images
(Athar and Wang, 2023).

The proposed stochastic surprisal-based method plugs on top of UNIQUE and its
results are provided under the last column in Table 2. It is always in the top
two methods for MULTI-LIVE and TID2013 datasets in all evaluation metrics. In
particular, the proposed method achieves the best performance for all the
categories except in OR and KRCC in TID2013 dataset. UNIQUE, by itself, does
not achieve the best performance for any of the metrics in MULTI dataset.
However, the same network using the proposed gradient features significantly
improves the performance and achieves the best performance on all metrics. For
instance, UNIQUE is the third best performing method in MULTI dataset in terms
of RMSE, PLCC, SRCC, and KRCC. However, the action-based features improve the
performance for those metrics by $1.315$, $0.036$, $0.020$, and $0.023$,
respectively and achieve the best performance for all metrics. This further
reinforces the plug-in capability of the proposed method during inference. On
DR IQA dataset, FSIM and FSIMc perform the best across all categories. The
authors in Athar and Wang (2023) used FSIMc to construct DR IQA models.
However, the proposed algorithm remains competitive among all evaluation
metrics. The results are statistically significant in $53$ of the $78$
compared metrics across both DRv1 and DRv2. Note that a number of these
compared FR-IQA metrics have been utilized to construct the synthetic ground
truth quality scores.

###  4.2 Robust Classification

Neural networks are sensitive to distortions in test that the network was not
privy to during training (Temel et al., 2017, 2018; Hendrycks and Dietterich,
2019). These distortions include image acquisition errors, environmental
conditions during acquisition, transmission and storage errors among others.
CIFAR-10C (Hendrycks and Dietterich, 2019) dataset consists of $19$ real world
distortions each of which has five levels of degradation that distort the
$10000$ images in CIFAR-10 testset. Neural networks that use perception-only
mechanics suffer performance accuracy drops on CIFAR-10C. Current techniques
that alleviate the drop in perception-only accuracy require additional
training data. The authors in Vasiljevic et al. (2016) show that finetuning or
retraining networks using distorted images increases the performance of
classification under the same distortion. However, performance between
different distortions is not generalized well. For instance, training on
gaussian blurred images does not guarantee a performance increase in motion
blur images (Geirhos et al., 2018b). Other proposed methods include training
on style-transferred images (Geirhos et al., 2018a), training on adversarial
images (Hendrycks and Dietterich, 2019), training on simulated noisy virtual
images (Temel et al., 2017), and self-supervised methods like SimCLR Chen et
al. (2020) that train by augmenting distortions. Augmix (Hendrycks et al.,
2019) creates multiple chains of augmentations to train the base network. All
these works require additional training data. Our proposed stochastic
surprisal-based technique is a plug-in on top of any existing method that
increases the base network’s robustness to distortions without any need for
new data.

Experimental setup and dataset: We use CIFAR-10C (Hendrycks and Dietterich,
2019) as our dataset of choice with all its $95$ distortions and degradation
levels. ResNet-18,34,50, and 101 (He et al., 2016) architectures are used as
the base $f(\cdot)$ perception-only networks. These are trained from scratch
on CIFAR-10 dataset. Following the terminologies established in Section 3,
$\mathcal{X}$ is the training set of CIFAR-10 and $\mathcal{X}^{\prime}$ are
the $19$ distorted domains in which the testing set of CIFAR-10C reside. Each
of the $19$ corruptions have $5$ levels of distortions. Higher the level,
higher is the distortion. The distortions include blur characteristics like
gaussian blur, zoom blur, glass blur, and environmental distortions like rain,
snow, fog, haze among others.

Table 3: Stochastic surprisal-based plug-in on top of existing robustness techniques. Methods |  | Accuracy
---|---|---
ResNet-18 | Perception-only | $67.89\%$
| Proposed | $\textbf{71.4}\%$
Denoising | Perception-only | $65.02\%$
| Proposed | $\textbf{68.86}\%$
Adversarial Train (Hendrycks and Dietterich, 2019) | Perception-only | $68.02\%$
| Proposed | $\textbf{70.86}\%$
SimCLR (Chen et al., 2020) | Perception-only | $70.28\%$
| Proposed | $\textbf{73.32}\%$
Augment Noise (Vasiljevic et al., 2016) | Perception-only | $76.86\%$
| Proposed | $\textbf{77.98}\%$
Augmix (Hendrycks et al., 2019) | Perception-only | $89.85\%$
| Proposed | $\textbf{89.89}\%$

Comparison against existing State of the Art Methods: In Table 3, we compare
the Top-$1$ accuracy between perception-only inference and our proposed
stochastic surprisal-based inference. All the state-of-the-art techniques
require additional training data - noisy images (Vasiljevic et al., 2016),
adversarial images (Hendrycks and Dietterich, 2019), self-supervision SimCLR
augmentations (Chen et al., 2020), and augmentation chains (Hendrycks et al.,
2019). We term these perception-only techniques as $f^{\prime}(\cdot)$ and we
actively infer on top of them. For all $f^{\prime}(\cdot)$ other than Augmix,
the base network is a ResNet-18. For Augmix, we use WideResNet architecture
following the authors in Hendrycks et al. (2019). Another commonly used
robustness technique is to pre-process the noisy images to denoise them.
Denoising $19$ distortions is, however, not a viable strategy assuming that
the characteristics of the distortions are unknown. We use Non-Local Means
(Buades et al., 2011) denoising and the results obtained are lower than the
perception-only accuracy by almost $3\%$. However, the proposed technique on
this model increases the results by $3.84\%$. We create untargeted adversarial
images using FGSM attack (Goodfellow et al., 2014) and use them to train a
ResNet-18 architecture. In the experimental setup of augmenting noise
(Vasiljevic et al., 2016), we augment the training data of CIFAR-10 with six
distortions provided by Temel et al. (2018) to randomly distort 500 CIFAR-10
training images to train $f^{\prime}(\cdot)$. For all techniques, the proposed
technique plugs on top of $f^{\prime}(\cdot)$ and increases the accuracy to
create robust networks. Note that in all the perception-only methods in Table
3, we do not use the augmented data to train $\mathcal{H}(\cdot)$. The gain
obtained is by creating actions on only the undistorted data. Even when the
augmented network $f^{\prime}(\cdot)$ gains on non-augmented $f(\cdot)$, the
proposed technique plugs on top of $f^{\prime}(\cdot)$ to provide additional
gains.

Figure 4: Visualization of accuracy gains (in red) of using the proposed
stochastic surprisal-based inference over perception-only inference (in red)
on CIFAR-10C dataset (Hendrycks and Dietterich, 2019) for four networks across
$19$ distortions.

Analyzing distortion-wise accuracy gains: The results of all four ResNet
architectures for each of the $19$ distortions is shown in Fig 4. X-Axis in
each plot shows $19$ distortions averaged over all $5$ distortion levels.
Y-Axis shows Top-$1$ accuracy. The bars in blue show perception-only inference
results and the red region in each bar represents the performance gain
obtained by stochastic surprisal-based inference. There is an increase in
performance across distortions and networks. In $9$ of the $19$ distortions,
the proposed method averages $4\%$ more than its perception-only counterpart.
These include gaussian blur, gaussian noise, glass blur, impulse noise, motion
blur, pixelate, shot noise, speckle noise, and zoom blur. The highest increase
is $8.22\%$ for glass blur. In $2$ of the distortions, brightness and
saturate, the results increase by less than $0.4\%$ averaged over all levels.
This is because of the statistics that the distortions affect. Distortions can
change either the local or global statistics within images. Distortions like
saturate, brightness, contrast, fog, and frost change the low level or global
statistics in the image domain. Neural networks are actively trained to ignore
such changes so that their effects are not propagated beyond the first few
layers. Hence, gradients derived from the final fully connected layer do not
capture the necessary changes required within $f(\cdot)$ to compensate for
these distortions. Therefore, both the proposed and perception-only inference
follow each other closely in distortions like brightness and saturate.

Figure 5: Visualization of accuracy gains (in red) of using the proposed
stochastic surprisal-based inference over perception-only inference (in blue)
on CIFAR-10C dataset (Hendrycks and Dietterich, 2019) for four networks (a)
averaged across $19$ distortions and $5$ levels (b) shown across $5$ levels of
distortion.

Level-wise Recognition on CIFAR-10C:  In Fig. 5b, the proposed performance
gains for the four networks are categorized based on the distortion levels.
All $19$ categories of distortion on CIFAR-10C are averaged for each level and
their respective perception-only accuracy and stochastic surprisal-based gains
are shown. Note that the levels are progressively more distorted. Hence, level
1 distribution $\mathcal{X}^{\prime}$ is similar to the training distribution
$\mathcal{X}$ when compared to level 5 distributions. As the distortion level
increases, the proposed method’s accuracy gains also increase. This is
because, with a larger distributional shift, more characteristic is the action
required w.r.t. the network parameters. In Fig. 5a, we show the distortion-
wise and level-wise accuracy gains for each network. Note that, a stochastic
surprisal-based ResNet-18 performs similarly to a perception-only ResNet-50.

##  5 Discussion

We conclude this paper by considering the terminology of stochastic surprisal
as well as some of the broader implications of the proposed technique. These
include the abductive reasoning module and expectancy-mismatch hypothesis in
cognitive science.

###  5.1 Choice of the terminology of Stochastic Surprisal

We motivate the terminology of _stochastic surprisal_ in two ways:

  1. 1.

As an analogy to  _gradient descent_ and _stochastic gradient descent_ :
Gradient descent requires the gradients from the all available training data
to update the weights. However, since this is computationally infeasible for
large neural networks, stochastic gradient descent allows using a single
training datapoint to estimate gradients, repeated across all data. In
_stochastic surprisal_ , we use the single data point, available at inference,
under all allowable actions to estimate surprisal.

  2. 2.

Meaning of stochastic: The word stochastic implies some randomness within the
setting. This randomness is derived from the possible set of all actions. In
discriminative networks in Eq. 10, $a_{i},i\in[1,N]$ is the set of all
possible actions with $N$ being the number of trained classes. This suggests
that we allow a datapoint to be any available class, all of which are equally
likely. Similarly, in generative networks in Eq. 9, we add random
perturbations at the output of the autoencoder. Hence, there is an inherent
randomness within the actions that allow for the usage of the word
_stochastic_.

###  5.2 Abductive Reasoning

The free energy principle postulates that the brain encodes a Bayesian
recognition density that predicts sensory data based upon some hypotheses
about their causes. This mode of inference is called inference to the best
explanation. The underlying reasoning model is abductive reasoning. Abductive
reasoning was introduced by the philosopher Charles Sanders Peirce (Peirce,
1931), who saw abduction as a reasoning process from effect to cause (Paul,
1993). An abductive reasoning framework creates a hypothesis and tests its
validity without considering the cause. A hypothesis can be considered as an
answer to one of the three following questions: a causal _‘Why P?’_ question,
a counterfactual _‘What if?’_ question, and a contrastive _‘Why P, rather than
Q?’_ question (AlRegib and Prabhushankar, 2022). Here $P$ is the prediction
and $Q$ is any contrast class. The action considered in this paper is the
latter contrastive question of the form _‘Why P, rather than Q?’_. Stochastic
surprisal measures the answer to this question. We explore this further in
AlRegib and Prabhushankar (2022); Prabhushankar et al. (2020). We borrow the
visualization procedure from Prabhushankar et al. (2020) to visually analyze
stochastic surprise in the applications of IQA and recognition in Fig. 6. We
do so to illustrate the broader impact of action at inference time. As in
Section 3.3.1, we use stochastic surprisal as a plug-in approach.

Figure 6: Stochastic surprisal answers contrastive questions. The highlighted
regions in each image provides a visual explanation to the question beneath
it. While Grad-CAM (Selvaraju et al., 2017) shows all the perceived regions in
the image, the stochastic surprisal provides fine-grained answers to
contrastive questions. Best viewed in color.

For IQA visualizations, we use a trained full-reference metric DIQaM-FR Bosse
et al. (2017) as our perception model. In Fig. 6a, the pretrained network from
Bosse et al. (2017) provides a quality score of $0.58$ to the distorted
lighthouse image. Here $0.58$ acts as $P$ in the contrastive question. We use
MSE loss function as $\mathcal{A}_{d}$ and a real number $Q\in[0,1]$ to
calculate stochastic surprisal. Contrastive explanations of $Q$ values
including $0.25,0.75,\text{ and }1$ along with Grad-CAM results are shown in
Fig. 6a. Grad-CAM highlights the entire image indicating that the network
estimates the quality based on the whole image. While this builds trust in the
network, it does not help us understand the network decision. The stochastic
surprisal, however, provides fine-grained explanations. Consider the
contrastive questions asking why the quality is neither $1\text{ nor }0.75$.
The network estimates this to be primarily due to distortions concentrating in
the foreground portion of the image. This explanation is inline with previous
works in IQA that posit that distortions in the more salient foreground or
edge features cause a larger drop in perceptual quality than that in color or
background (Prabhushankar et al., 2017b)(Chandler, 2013). When the contrastive
question asks why the prediction is not $0.25$, the network highlights the sky
indicating its good quality for a higher score of $0.58$.

Fig. 6b shows the contrastive questions answered by the stochastic surprisal
for the application of recognition. Given an image of a spoonbill from
ImageNet dataset (Deng et al., 2009), a VGG-16 network highlights the body,
feathers, legs and beak of the bird in the Grad-CAM (Selvaraju et al., 2017)
explanation. Consider a more fine grained contrastive question regarding the
difference between a spoonbill and flamingo. The stochastic surprisal
highlights regions in the neck of the spoonbill indicating that the contrast
between the input spoonbill image and the network’s notion of a flamingo lies
in the spoonbill’s lack of S-shaped neck. Similarly, the contrast between a
spoonbill and a crane is in the color of the spoonbill’s feathers. The
contrast between a pig and a spoonbill is in the shape of neck and legs in the
spoonbill which is emphasized. All these visualizations serve to illustrate
the stochastic nature of the proposed method. It is stochastic in the sense
that it individually depends on the network, the data, as well as the action.
In this case, the action of not predicting a flamingo has a different
explanation compared to the action of not predicting a pig.

###  5.3 Expectancy-Mismatch

The expectancy-mismatch hypothesis in cognitive science is a way to quantify
and analyze human attention. According to this hypothesis, human attention
mechanism suppresses expected messages and focuses on the unexpected ones
(Summerfield and Egner, 2009; Krebs et al., 2012; Horstmann et al., 2016;
Horstmann, 2002; Becker and Horstmann, 2011; Sun et al., 2020). Becker and
Horstmann (2011) shows that a message which is unexpected, captures human
attention. Then, the human visual system establishes whether the input matches
the observers’ expectation. If they are conflicting, error neurons in the
human brain encode the prediction error and pass the error message back to the
representational neurons. The proposed method uses gradients with respect to
the network parameters to measure an action. In both the generative and
discriminative networks, this action takes the form of a change in the output
thereby creating a mismatch with the network’s expected result. Hence, the
proposed method can act as a framework for exploring expectancy-mismatch in
future works.

###  5.4 Related Learning Paradigms

The proposed stochastic surprisal decomposes the decision making and training
process of a neural network into perception and action phases. A number of
other machine learning paradigms including continual and lifelong learning
(Parisi et al., 2019), online learning (Hoi et al., 2021), and introspective
learning (Prabhushankar and AlRegib, 2022) also have multiple stages. Online
learning assumes an exploration and exploitation stage in a neural network’s
training process. Hence, the differentiation in the training stages is based
on time rather than the proposed action. Continual and lifelong learning is a
research paradigm that tackles the topic of catastrophic forgetting when a
neural network is trained to perform multiple tasks. Introspective learning
conjectures reasons in the form of counterfactual or contrastive questions in
its two stages to make predictions. Hence, while there are multiple machine
learning paradigms that conjecture decomposition of neural network’s training
and decision processes, the proposed framework that is based on the FEP is
unique in its decomposition. The field of active learning (Logan et al., 2022;
Benkert et al., 2022) involves actions within the training and decision making
processes. However, active learning requires actions from the users while the
considered actions in the proposed methodology are with respect to the neural
network.

###  5.5 Conclusion

In this paper, we examine supervised learning from the perspective of Free
Energy Principle. The learning process of both generative and discriminative
models can be decomposed into divergence and surprisal measures. Surprisal is
introduced in generative models via regularization and constraints that allow
a generative aspect to their functionality. While this complicates the action
itself, the set of possible actions is still limited. Discriminative networks
follow the traditional route of free energy minimization by defining surprisal
in terms of recognition entropy and minimizing it. This allows the action
itself to be a simple fidelity-based reconstruction error. However, in
discriminative networks, there are $N$ set of possible actions, $N$ being the
number of classes in the recognition density. We account for both these
peculiarities in defining our action space. We use a fidelity-based MSE loss
for both generative and discriminative networks. In addition, generative
networks are reinforced with KL-divergence based elastic net regularization,
and in discriminative networks we backpropagate $N$ possible actions. We
measure this scalar action quantity in terms of a vector quantity called
stochastic surprisal that is a function of the network parameters and an
individual data point rather than a distribution. We use stochastic surprisal
to assess distortions in image quality assessment and disregard distortions in
robust recognition. We then discuss the implications of stochastic surprisal
in other areas of cognitive science including abductive reasoning and
expectancy-mismatch. A computational bottleneck within the framework is the
consideration of all $N$ possible actions to estimate the surprisal feature
$r_{x}$. $r_{x}$ scales linearly with $N$ thereby becoming prohibitive on
datasets with a large number of classes. Selecting only a subset of the most
likely actions is one plausible solution to the challenge of scalability.

## References

  * AlRegib and Prabhushankar (2022) AlRegib, G. and Prabhushankar, M. (2022).  Explanatory paradigms in neural networks.  _arXiv preprint arXiv:2202.11838_
  * Athar and Wang (2023) Athar, S. and Wang, Z. (2023).  Degraded reference image quality assessment.  _IEEE Transactions on Image Processing_
  * Becker and Horstmann (2011) Becker, S. I. and Horstmann, G. (2011).  Novelty and saliency in attentional capture by unannounced motion singletons.  _Acta Psychologica_ 136, 290 – 299.  https://doi.org/10.1016/j.actpsy.2010.12.002
  * Benkert et al. (2022) Benkert, R., Prabhushankar, M., and AlRegib, G. (2022).  Forgetful active learning with switch events: Efficient sampling for out-of-distribution data.  In _2022 IEEE International Conference on Image Processing (ICIP)_ (IEEE), 2196–2200
  * Bosse et al. (2017) Bosse, S., Maniry, D., Müller, K.-R., Wiegand, T., and Samek, W. (2017).  Deep neural networks for no-reference and full-reference image quality assessment.  _IEEE Transactions on image processing_ 27, 206–219
  * Buades et al. (2011) Buades, A., Coll, B., and Morel, J.-M. (2011).  Non-local means denoising.  _Image Processing On Line_ 1, 208–212
  * Buckley et al. (2017) Buckley, C. L., Kim, C. S., McGregor, S., and Seth, A. K. (2017).  The free energy principle for action and perception: A mathematical review.  _Journal of Mathematical Psychology_ 81, 55–79
  * Chandler (2013) Chandler, D. M. (2013).  Seven challenges in image quality assessment: past, present, and future research.  _ISRN Signal Processing_ 2013
  * Chen et al. (2020) Chen, T., Kornblith, S., Norouzi, M., and Hinton, G. (2020).  A simple framework for contrastive learning of visual representations.  _arXiv preprint arXiv:2002.05709_
  * Demekas et al. (2020) Demekas, D., Parr, T., and Friston, K. J. (2020).  An investigation of the free energy principle for emotion recognition.  _Frontiers in Computational Neuroscience_ 14, 30
  * Deng et al. (2009) Deng, J., Dong, W., Socher, R., Li, L.-J., Li, K., and Fei-Fei, L. (2009).  Imagenet: A large-scale hierarchical image database.  In _2009 IEEE conference on computer vision and pattern recognition_ (Ieee), 248–255
  * Friston (2009) Friston, K. (2009).  The free-energy principle: a rough guide to the brain?  _Trends in cognitive sciences_ 13, 293–301
  * Friston (2019) Friston, K. (2019).  A free energy principle for a particular physics.  _arXiv preprint arXiv:1906.10184_
  * Gedeon and Harris (1992) Gedeon, T. and Harris, D. (1992).  Progressive image compression.  In _[Proceedings 1992] IJCNN International Joint Conference on Neural Networks_ (IEEE), vol. 4, 403–407
  * Geirhos et al. (2018a) Geirhos, R., Rubisch, P., Michaelis, C., Bethge, M., Wichmann, F. A., and Brendel, W. (2018a).  Imagenet-trained cnns are biased towards texture; increasing shape bias improves accuracy and robustness.  _arXiv preprint arXiv:1811.12231_
  * Geirhos et al. (2018b) Geirhos, R., Temme, C. R., Rauber, J., Schütt, H. H., Bethge, M., and Wichmann, F. A. (2018b).  Generalisation in humans and deep neural networks.  In _Advances in Neural Information Processing Systems_. 7538–7550
  * Geisler (2008) Geisler, W. S. (2008).  Visual perception and the statistical properties of natural scenes.  _Annu. Rev. Psychol._ 59, 167–192
  * Goodfellow et al. (2014) Goodfellow, I. J., Shlens, J., and Szegedy, C. (2014).  Explaining and harnessing adversarial examples.  _arXiv preprint arXiv:1412.6572_
  * Gottwald and Braun (2020) Gottwald, S. and Braun, D. A. (2020).  The two kinds of free energy and the bayesian revolution.  _PLoS computational biology_ 16, e1008420
  * Gu et al. (2014) Gu, K., Zhai, G., Yang, X., and Zhang, W. (2014).  Using free energy principle for blind image quality assessment.  _IEEE Transactions on Multimedia_ 17, 50–63
  * He et al. (2016) He, K., Zhang, X., Ren, S., and Sun, J. (2016).  Deep residual learning for image recognition.  In _Proceedings of the IEEE conference on computer vision and pattern recognition_. 770–778
  * Hendrycks and Dietterich (2019) Hendrycks, D. and Dietterich, T. (2019).  Benchmarking neural network robustness to common corruptions and perturbations.  _arXiv preprint arXiv:1903.12261_
  * Hendrycks et al. (2019) Hendrycks, D., Mu, N., Cubuk, E. D., Zoph, B., Gilmer, J., and Lakshminarayanan, B. (2019).  Augmix: A simple data processing method to improve robustness and uncertainty.  _arXiv preprint arXiv:1912.02781_
  * Hinton and Zemel (1993) Hinton, G. E. and Zemel, R. (1993).  Autoencoders, minimum description length and helmholtz free energy.  _Advances in neural information processing systems_ 6
  * Hipólito et al. (2021) Hipólito, I., Ramstead, M. J., Convertino, L., Bhat, A., Friston, K., and Parr, T. (2021).  Markov blankets in the brain.  _Neuroscience & Biobehavioral Reviews_ 125, 88–97
  * Hoi et al. (2021) Hoi, S. C., Sahoo, D., Lu, J., and Zhao, P. (2021).  Online learning: A comprehensive survey.  _Neurocomputing_ 459, 249–289
  * Horstmann (2002) Horstmann, G. (2002).  Evidence for attentional capture by a surprising color singleton in visual search.  _Psychological Science_ 13, 499–505.  10.1111/1467-9280.00488.  PMID: 12430832
  * Horstmann et al. (2016) Horstmann, G., Becker, S., and Ernst, D. (2016).  Perceptual salience captures the eyes on a surprise trial.  _Attention, Perception, & Psychophysics_ 78, 1889–1900
  * Hou and Zhang (2007) Hou, X. and Zhang, L. (2007).  Saliency detection: A spectral residual approach.  In _2007 IEEE Conference on computer vision and pattern recognition_ (Ieee), 1–8
  * ITU-T (2012) ITU-T (2012).  _P.1401: Methods, metrics and procedures for statistical evaluation, qualification and comparison of objective quality prediction models_.  Tech. rep., ITU Telecom. Stand. Sector
  * Jayaraman et al. (2012) Jayaraman, D., Mittal, A., Moorthy, A. K., and Bovik, A. C. (2012).  Objective quality assessment of multiply distorted images.  In _Asilomar Conf. Sig. Syst. Comp._ 1693–1697
  * Kingma and Welling (2013) Kingma, D. P. and Welling, M. (2013).  Auto-encoding variational bayes.  _arXiv:1312.6114_
  * Kingma and Welling (2019) Kingma, D. P. and Welling, M. (2019).  An introduction to variational autoencoders.  _arXiv preprint arXiv:1906.02691_
  * Krebs et al. (2012) Krebs, R., Fias, W., Achten, E., and Boehler, C. (2012).  Stimulus conflict and stimulus novelty trigger saliency signals in locus coeruleus and anterior cingulate cortex.  In _Front. Hum. Neurosci. Conference Abstract: Belgian Brain Council. doi: 10.3389/conf. fnhum_. vol. 114
  * Krizhevsky et al. (2012) Krizhevsky, A., Sutskever, I., and Hinton, G. E. (2012).  Imagenet classification with deep convolutional neural networks.  _Advances in neural information processing systems_ 25
  * Kwon et al. (2019) Kwon, G., Prabhushankar, M., Temel, D., and AlRegib, G. (2019).  Distorted representation space characterization through backpropagated gradients.  In _2019 IEEE International Conference on Image Processing (ICIP)_ (IEEE), 2651–2655
  * Kwon et al. (2020) Kwon, G., Prabhushankar, M., Temel, D., and AlRegib, G. (2020).  Backpropagated gradient representations for anomaly detection.  In _European Conference on Computer Vision_ (Springer), 206–226
  * Liu et al. (2019) Liu, Y., Gu, K., Zhang, Y., Li, X., Zhai, G., Zhao, D., et al. (2019).  Unsupervised blind image quality evaluation via statistical measurements of structure, naturalness, and perception.  _IEEE Transactions on Circuits and Systems for Video Technology_ 30, 929–943
  * Liu et al. (2017) Liu, Y., Zhai, G., Gu, K., Liu, X., Zhao, D., and Gao, W. (2017).  Reduced-reference image quality assessment in free-energy principle and sparse representation.  _IEEE Transactions on Multimedia_ 20, 379–391
  * Logan et al. (2022) Logan, Y.-y., Prabhushankar, M., and AlRegib, G. (2022).  Decal: Deployable clinical active learning.  _arXiv preprint arXiv:2206.10120_
  * Ma et al. (2021) Ma, J., Wu, J., Li, L., Dong, W., Xie, X., Shi, G., et al. (2021).  Blind image quality assessment with active inference.  _IEEE Transactions on Image Processing_ 30, 3650–3663
  * Mao et al. (2016) Mao, X., Shen, C., and Yang, Y.-B. (2016).  Image restoration using very deep convolutional encoder-decoder networks with symmetric skip connections.  _Advances in neural information processing systems_ 29
  * Mittal et al. (2012) Mittal, A., Moorthy, A. K., and Bovik, A. C. (2012).  No-reference image quality assessment in the spatial domain.  _IEEE Trans. Image Proc._ 21, 4695–4708
  * Moorthy and Bovik (2010) Moorthy, A. K. and Bovik, A. C. (2010).  A two-step framework for constructing blind image quality indices.  _IEEE Sig. Proc. Let._ 17, 513–516
  * Murray et al. (2013) Murray, N., Vanrell, M., Otazu, X., and Parraga, C. A. (2013).  Low-level spatiochromatic grouping for saliency estimation.  _IEEE transactions on pattern analysis and machine intelligence_ 35, 2810–2816
  * Ng (2011) Ng, A. (2011).  Sparse autoencoder.  _CS294A Lecture notes_ 72, 1–19
  * Parisi et al. (2019) Parisi, G. I., Kemker, R., Part, J. L., Kanan, C., and Wermter, S. (2019).  Continual lifelong learning with neural networks: A review.  _Neural Networks_ 113, 54–71
  * Paul (1993) Paul, G. (1993).  Approaches to abductive reasoning: an overview.  _Artificial intelligence review_ 7, 109–152
  * Peirce (1931) Peirce, C. S. (1931).  _Collected papers of charles sanders peirce_ (Harvard University Press)
  * Ponomarenko et al. (2011) Ponomarenko, N., Ieremeiev, O., Lukin, V., Egiazarian, K., and Carli, M. (2011).  Modified image visual quality metrics for contrast change and mean shift accounting.  In _Proc. CADSM_. 305–311
  * Ponomarenko et al. (2015) Ponomarenko, N., Jin, L., Ieremeiev, O., Lukin, V., Egiazarian, K., Astola, J., et al. (2015).  Image database tid2013: Peculiarities, results and perspectives.  _Signal Processing: Image Communication_ 30, 57–77
  * Prabhushankar and AlRegib (2021a) Prabhushankar, M. and AlRegib, G. (2021a).  Contrastive reasoning in neural networks.  _arXiv preprint arXiv:2103.12329_
  * Prabhushankar and AlRegib (2021b) Prabhushankar, M. and AlRegib, G. (2021b).  Extracting causal visual features for limited label classification.  In _2021 IEEE International Conference on Image Processing (ICIP)_ (IEEE), 3697–3701
  * Prabhushankar and AlRegib (2022) Prabhushankar, M. and AlRegib, G. (2022).  Introspective learning: A two-stage approach for inference in neural networks.  _arXiv preprint arXiv:2209.08425_
  * Prabhushankar et al. (2022) Prabhushankar, M., Kokilepersaud, K., Logan, Y.-y., Corona, S. T., AlRegib, G., and Wykoff, C. (2022).  Olives dataset: Ophthalmic labels for investigating visual eye semantics.  _arXiv preprint arXiv:2209.11195_
  * Prabhushankar et al. (2018) Prabhushankar, M., Kwon, G., Temel, D., and AIRegib, G. (2018).  Semantically interpretable and controllable filter sets.  In _2018 25th IEEE International Conference on Image Processing (ICIP)_ (IEEE), 1053–1057
  * Prabhushankar et al. (2020) Prabhushankar, M., Kwon, G., Temel, D., and AlRegib, G. (2020).  Contrastive explanations in neural networks.  In _2020 IEEE International Conference on Image Processing (ICIP)_ (IEEE), 3289–3293
  * Prabhushankar et al. (2017a) Prabhushankar, M., Temel, D., and AlRegib, G. (2017a).  Generating adaptive and robust filter sets using an unsupervised learning framework.  In _2017 IEEE International Conference on Image Processing (ICIP)_ (IEEE), 3041–3045
  * Prabhushankar et al. (2017b) Prabhushankar, M., Temel, D., and AlRegib, G. (2017b).  Ms-unique: Multi-model and sharpness-weighted unsupervised image quality estimation.  _Electronic Imaging_ 2017, 30–35
  * Saad et al. (2012) Saad, M. A., Bovik, A. C., and Charrier, C. (2012).  Blind image quality assessment: A natural scene statistics approach in the dct domain.  _IEEE Trans. on Image Proc._ 21, 3339–3352
  * Sampat et al. (2009) Sampat, M. P., Wang, Z., Gupta, S., Bovik, A. C., and Markey, M. K. (2009).  Complex wavelet structural similarity: A new image similarity index.  _IEEE Trans. Image Proc._ 18, 2385–2401
  * Sebastian et al. (2017) Sebastian, S., Abrams, J., and Geisler, W. S. (2017).  Constrained sampling experiments reveal principles of detection in natural scenes.  _Proceedings of the National Academy of Sciences_ 114, E5731–E5740
  * Selvaraju et al. (2017) Selvaraju, R. R., Cogswell, M., Das, A., Vedantam, R., Parikh, D., and Batra, D. (2017).  Grad-cam: Visual explanations from deep networks via gradient-based localization.  In _Proceedings of the IEEE international conference on computer vision_. 618–626
  * Settles et al. (2007) Settles, B., Craven, M., and Ray, S. (2007).  Multiple-instance active learning.  _Advances in neural information processing systems_ 20
  * Shafiq et al. (2018a) Shafiq, M., Prabhushankar, M., and AlRegib, G. (2018a).  Leveraging sparse features learned from natural images for seismic understanding.  In _80th EAGE Conference and Exhibition 2018_ (European Association of Geoscientists & Engineers), vol. 2018, 1–5
  * Shafiq et al. (2018b) Shafiq, M. A., Prabhushankar, M., Di, H., and AlRegib, G. (2018b).  Towards understanding common features between natural and seismic images.  In _SEG Technical Program Expanded Abstracts 2018_ (Society of Exploration Geophysicists). 2076–2080
  * Summerfield and Egner (2009) Summerfield, C. and Egner, T. (2009).  Expectation (and attention) in visual cognition.  _Trends in Cognitive Sciences_ 13, 403 – 409.  https://doi.org/10.1016/j.tics.2009.06.003
  * Sun et al. (2020) Sun, Y., Prabhushankar, M., and AlRegib, G. (2020).  Implicit saliency in deep neural networks.  In _2020 IEEE International Conference on Image Processing (ICIP)_ (IEEE), 2915–2919
  * Temel and AlRegib (2015) Temel, D. and AlRegib, G. (2015).  PerSIM: Multi-resolution image quality assessment in the perceptually uniform color domain.  In _IEEE Int. Conf. Image Proc._ 1682–1686
  * Temel and AlRegib (2016a) Temel, D. and AlRegib, G. (2016a).  Bless: Bio-inspired low-level spatiochromatic similarity assisted image quality assessment.  In _2016 IEEE International Conference on Multimedia and Expo (ICME)_ (IEEE), 1–6
  * Temel and AlRegib (2016b) Temel, D. and AlRegib, G. (2016b).  CSV: Image quality assessment based on color, structure, and visual system.  _Sig. Proc.: Image Comm._ 48, 92 – 103.  http://dx.doi.org/10.1016/j.image.2016.08.008
  * Temel and AlRegib (2019) Temel, D. and AlRegib, G. (2019).  Perceptual image quality assessment through spectral analysis of error representations.  _Sig. Proc.: Image Comm._
  * Temel et al. (2017) Temel, D., Kwon, G., Prabhushankar, M., and AlRegib, G. (2017).  Cure-tsr: Challenging unreal and real environments for traffic sign recognition.  _arXiv preprint arXiv:1712.02463_
  * Temel et al. (2018) Temel, D., Lee, J., and AlRegib, G. (2018).  Cure-or: Challenging unreal and real environments for object recognition.  In _2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA)_ (IEEE), 137–144
  * Temel et al. (2016) Temel, D., Prabhushankar, M., and AlRegib, G. (2016).  UNIQUE: Unsupervised image quality estimation.  _IEEE Sig. Proc. Let._ 23, 1414–1418
  * Vasiljevic et al. (2016) Vasiljevic, I., Chakrabarti, A., and Shakhnarovich, G. (2016).  Examining the impact of blur on recognition by convolutional networks.  _arXiv preprint arXiv:1611.05760_
  * Wang et al. (2004) Wang, Z., Bovik, A. C., Sheikh, H. R., and Simoncelli, E. P. (2004).  Image quality assessment: from error visibility to structural similarity.  _IEEE Trans. Image Proc._ 13, 600–612
  * Wang and Li (2011) Wang, Z. and Li, Q. (2011).  Information content weighting for perceptual image quality assessment.  _IEEE Trans. Image Proc._ 20, 1185–1198
  * Wang et al. (2003) Wang, Z., Simoncelli, E. P., and Bovik, A. C. (2003).  Multiscale structural similarity for image quality assessment.  In _Asilomar Conf. Sig., Syst. & Comp._ vol. 2, 1398–1402
  * Zhai et al. (2011) Zhai, G., Wu, X., Yang, X., Lin, W., and Zhang, W. (2011).  A psychovisual quality metric in free-energy principle.  _IEEE Transactions on Image Processing_ 21, 41–52
  * Zhang and Li (2012) Zhang, L. and Li, H. (2012).  Sr-sim: A fast and high performance iqa index based on spectral residual.  In _2012 19th IEEE international conference on image processing_ (IEEE), 1473–1476
  * Zhang et al. (2011) Zhang, L., Zhang, L., Mou, X., Zhang, D., et al. (2011).  Fsim: a feature similarity index for image quality assessment.  _IEEE Trans. Image Proc._ 20, 2378–2386