Answers.Body: <p>Regarding the typical choices of the reference distribution <span class="math-container">$P_z$</span> as a uniform distribution over a finite set or a standard Gaussian over a vector space, they're similar idea as Bayesian neural networks (BNNs) to account for epistemic uncertainties in the model's inferred parameters but their ENNs implementation is supposed to be much more efficient than BNN ensemble <em>particles</em>.</p>
  <p>When <span class="math-container">$P_z$</span> is a uniform distribution over a finite set, it essentially means that each element in the set corresponds to a distinct neural network configuration or weight initialization or some other hyperparameter values. A finite set allows for a manageable number of models making it computationally feasible to work with the ensemble.</p>
  <p>When <span class="math-container">$P_z$</span> is a standard Gaussian over a vector space, it means that the parameters of the neural network are sampled from a mathematically convenient Gaussian distribution which has maximum entropy given a fixed variance and thus represents a more uninformative prior for the usual continuous parameters.</p>
  <p>Finally for the intuition behind integrating out the epistemic index <span class="math-container">$z$</span> of ENNs is just to get <a href="https://en.wikipedia.org/wiki/Marginal_distribution#Marginal_probability_mass_function" rel="nofollow noreferrer">marginal probability distribution</a> from its conditional distribution by integrating out the conditioning random variable. Note the LHS marginal joint prediction <span class="math-container">$\hat{P}_{1:\tau}^{ENN} (y_{1:\tau})$</span> is essentially a (joint) &quot;marginal&quot; class distribution <span class="math-container">$p(y_{1:\tau}|x_{1:\tau})$</span>, and the RHS term <span class="math-container">$\text{softmax}(f_\theta (x_t, z))_{y_t}$</span> is nothing but its corresponding &quot;conditional&quot; class distribution <span class="math-container">$p(y_{1:\tau}|x_{1:\tau},z)$</span> depending on any possible value of the epistemic index <span class="math-container">$z$</span> as defined in the support of <span class="math-container">$P_z$</span>. By interpreting this way you can see clearly the whole equation is just marginalizing out the conditioning variable <span class="math-container">$z$</span>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-28T23:13:59.300Z
Answers.LastActivityDate: 2024-07-28T23:13:59.300Z
Answers.UserDisplayName: cinch
Body: <p>I've been reading the paper &quot;<a href="https://arxiv.org/abs/2107.08924#" rel="nofollow noreferrer">Epistemic Neural Networks</a>&quot; by Ian Osband et al. (2023), and I'm having trouble grasping the main intuition behind some of the formulas presented. The paper states the usefulness of <em>joint</em> predictions in estimating uncertainty. Figure 1 of the paper is an intuition of the benefit of using joint predictions.</p>
  <p>They introduce a <em>reference distribution</em> <span class="math-container">$P_{z}$</span> from which the <em>epistemic index</em> <span class="math-container">$z$</span> is sampled and used to express epistemic uncertainty.</p>
  <blockquote>
  <p>An ENN architecture, on the other hand, is specified by a pair: a parameterized function class <span class="math-container">$f$</span> and a reference distribution <span class="math-container">$P_{z}$</span> . The vector-valued output <span class="math-container">$f_{\theta} (x, z)$</span> of an ENN depends additionally on an epistemic index <span class="math-container">$z$</span>, which takes values in the support of <span class="math-container">$P_{z}$</span> . Typical
  choices of the reference distribution <span class="math-container">$P_{z}$</span> include a uniform distribution over a finite set or a standard Gaussian over a vector space. The index <span class="math-container">$z$</span> is used to express epistemic uncertainty. In particular, variation of the network output with <span class="math-container">$z$</span> indicates uncertainty that might be resolved by future data.</p>
  </blockquote>
  <p>In the context of classification, Osband takes <span class="math-container">$\tau$</span> inputs <span class="math-container">$x_1, ... , x_\tau$</span> and considers the joint prediction <span class="math-container">$$\hat{P}_{1:\tau}(y_{1:\tau})$$</span> which assigns a probability to each class combination <span class="math-container">$y_1, ... , y_\tau$</span>.</p>
  <p>The benefit, with respect to conventional neural networks, should be the following:</p>
  <ul>
  <li>Conventional neural networks are not designed to provide joint predictions. They can only be obtained by multiplying predictions of single data points together (assuming each data point as independent) <span class="math-container">$$\hat{P}_{1:\tau}^{NN}(y_{1:\tau}) = \prod_{t=1}^\tau softmax(f_\theta (x_t))_{y_t}$$</span></li>
  <li>ENNs create more expressive joint predictions integrating over the epistemic indices <span class="math-container">$$\hat{P}_{1:\tau}^{ENN} (y_{1:\tau}) = \int_z P_Z(dz) \prod_{t=1}^\tau softmax(f_\theta (x_t, z))_{y_t}$$</span></li>
  </ul>
  <h2>What I don't understand</h2>
  <ul>
  <li>How can the choice of the reference distribution be so arbitrary?</li>
  <li>What is the intuition behind integrating over the epistemic indices in the formula for <span class="math-container">$\hat{P}_{1:\tau}^{ENN} (y_{1:\tau})$</span> ?</li>
  </ul>
  <p>The paper continues and describes the architecture more in detail, but any help in understanding the intuition behind the above formulas would be very appreciated. Thank you.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-07-28T12:12:35.850Z
Comments.Text: red this paper 2y ago and still having your same questions
Comments.UserDisplayName: Alberto
Tags: <neural-networks><deepmind><uncertainty-quantification><epistemic-uncertainty>
Title: Understanding the Intuition Behind Formulas in "Epistemic Neural Networks"
UserDisplayName: pettepiero
ThreadText: # Understanding the Intuition Behind Formulas in "Epistemic Neural Networks"
  
  (Asked by: username_0 on 2024-07-28)
  
  I've been reading the paper "[Epistemic Neural Networks](https://arxiv.org/abs/2107.08924#)" by Ian Osband et al. (2023), and I'm having trouble grasping the main intuition behind some of the formulas presented. The paper states the usefulness of *joint* predictions in estimating uncertainty. Figure 1 of the paper is an intuition of the benefit of using joint predictions.
  
  They introduce a *reference distribution* $P\_{z}$ from which the *epistemic index* $z$ is sampled and used to express epistemic uncertainty.
  
  > An ENN architecture, on the other hand, is specified by a pair: a parameterized function class $f$ and a reference distribution $P\_{z}$ . The vector-valued output $f\_{\theta} (x, z)$ of an ENN depends additionally on an epistemic index $z$, which takes values in the support of $P\_{z}$ . Typical
  > choices of the reference distribution $P\_{z}$ include a uniform distribution over a finite set or a standard Gaussian over a vector space. The index $z$ is used to express epistemic uncertainty. In particular, variation of the network output with $z$ indicates uncertainty that might be resolved by future data.
  
  In the context of classification, Osband takes $\tau$ inputs $x\_1, ... , x\_\tau$ and considers the joint prediction $$\hat{P}\_{1:\tau}(y\_{1:\tau})$$ which assigns a probability to each class combination $y\_1, ... , y\_\tau$.
  
  The benefit, with respect to conventional neural networks, should be the following:
  
  * Conventional neural networks are not designed to provide joint predictions. They can only be obtained by multiplying predictions of single data points together (assuming each data point as independent) $$\hat{P}\_{1:\tau}^{NN}(y\_{1:\tau}) = \prod\_{t=1}^\tau softmax(f\_\theta (x\_t))\_{y\_t}$$
  * ENNs create more expressive joint predictions integrating over the epistemic indices $$\hat{P}\_{1:\tau}^{ENN} (y\_{1:\tau}) = \int\_z P\_Z(dz) \prod\_{t=1}^\tau softmax(f\_\theta (x\_t, z))\_{y\_t}$$
  
  ## What I don't understand
  
  * How can the choice of the reference distribution be so arbitrary?
  * What is the intuition behind integrating over the epistemic indices in the formula for $\hat{P}\_{1:\tau}^{ENN} (y\_{1:\tau})$ ?
  
  The paper continues and describes the architecture more in detail, but any help in understanding the intuition behind the above formulas would be very appreciated. Thank you.
  
  **Tags:** neural-networks, deepmind, uncertainty-quantification, epistemic-uncertainty
  > **Comments:**
  > **username_1**: red this paper 2y ago and still having your same questions  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2024-07-28. Score: 0 | Accepted answer
  
  Regarding the typical choices of the reference distribution $P\_z$ as a uniform distribution over a finite set or a standard Gaussian over a vector space, they're similar idea as Bayesian neural networks (BNNs) to account for epistemic uncertainties in the model's inferred parameters but their ENNs implementation is supposed to be much more efficient than BNN ensemble *particles*.
  
  When $P\_z$ is a uniform distribution over a finite set, it essentially means that each element in the set corresponds to a distinct neural network configuration or weight initialization or some other hyperparameter values. A finite set allows for a manageable number of models making it computationally feasible to work with the ensemble.
  
  When $P\_z$ is a standard Gaussian over a vector space, it means that the parameters of the neural network are sampled from a mathematically convenient Gaussian distribution which has maximum entropy given a fixed variance and thus represents a more uninformative prior for the usual continuous parameters.
  
  Finally for the intuition behind integrating out the epistemic index $z$ of ENNs is just to get [marginal probability distribution](https://en.wikipedia.org/wiki/Marginal_distribution#Marginal_probability_mass_function) from its conditional distribution by integrating out the conditioning random variable. Note the LHS marginal joint prediction $\hat{P}\_{1:\tau}^{ENN} (y\_{1:\tau})$ is essentially a (joint) "marginal" class distribution $p(y\_{1:\tau}|x\_{1:\tau})$, and the RHS term $\text{softmax}(f\_\theta (x\_t, z))\_{y\_t}$ is nothing but its corresponding "conditional" class distribution $p(y\_{1:\tau}|x\_{1:\tau},z)$ depending on any possible value of the epistemic index $z$ as defined in the support of $P\_z$. By interpreting this way you can see clearly the whole equation is just marginalizing out the conditioning variable $z$.
  
  
  ---
  
  