<p><a href="https://en.wikipedia.org/wiki/Causal_inference" rel="nofollow noreferrer">Causal inference</a> is about making inferences about how causes lead to effects. If you have a generative model of the world, you have made some inferences about what will result from some set of conditions.</p>
<p>A <em>prediction</em>, on the other hand, is a guess you make about the state of the world given some conditions. If your generative model makes predictions that match what you actually observe, you have a good model. However, if you have some prediction <em>error</em>, you either need to update your estimate of the conditions (as part of a higher-order generative model), or you need to change your model parameters.</p>
<p>Let's say you have a room with a light switch and a red light. You notice when the switch is flipped, the red light comes on. Causal inference would lead you to think that the switch causes the light to come on, so in the future when you see the switch flipped you make a prediction that the red light comes on.</p>
<p>If you want you can think about this in terms of a statistical model of the form:</p>
<p>Y = β * X</p>
<p>where X is the state of the world, Y is your prediction, and β are the weights in your generative model. Causal inference would be choosing the weights β. Prediction would be obtaining Y given X. If we think about this as a logistic model predicting the probability of red light on (Y) given X (state of switch), our causal inference would lead us to set a very high value for β, which in turn would lead us to predict Y is &quot;on&quot; when X is &quot;switch active&quot;.</p>
<p>I do not think &quot;I see a ball about to hit me (X), who threw it (Y)&quot; is a good example of causal inference or predictive coding (if you've gotten this example from some reading I'd be happy to take a look and see if I should revise my thinking). Instead, this would be a case where you have already done causal inference to know that balls flying through the air come from some actor: you know your β, which sets the probability of an incoming ball to very high when X is Greg throws a ball. What you want to do if you don't already know X, though, is to find an X that minimizes your prediction error (Y - Y<sub>actual</sub>). Your naïve prediction is probably that no balls are flying at you (Y = nothing incoming) given that your naïve X is probably no one is throwing any balls. Once you detect that a ball is coming at you, you have a prediction error (there is an unexpected ball coming at you), a model for the world (balls are thrown by someone), and possible prior states of the world X that produced the incoming ball. You can choose the optimal X by minimizing your prediction error, using your generative model (prediction). If you set X to &quot;Greg throwing ball&quot; and that results in a Y that matches your observation, you update the state of the world to say that Greg threw a ball in the recent past.</p>

CC BY-SA 4.0
2021-05-09T22:22:24.380Z
2021-05-09T22:22:24.380Z
Bryan Krause
<p>Correct me if I'm wrong here, but after some more reading and thinking this is what I took away: both the term 'prediction' and 'cause' here refer to the maximum likelihood of a distribution (<span class="math-container">$Y$</span>), meaning the probability of an event (<span class="math-container">$X$</span>), given sensory data (<span class="math-container">$Y_{1}$</span>) and the likelihood given prior data (<span class="math-container">$Y_{2}$</span>) .</p>
<p>Even though maybe seemingly orthogonal to some (like me), the terms here would actually represent the same thing (i.e. <em>no difference</em>).</p>
<p>Please post a better answer if this is partially or completely incorrect =)</p>

CC BY-SA 4.0
2021-04-08T15:28:40.650Z
2021-04-08T15:28:40.650Z
user2305193
<p>Unifying brain theories of cortical function often describe the brain as a prediction machine, based on a generative model (<a href="https://en.wikipedia.org/wiki/Generative_model" rel="noreferrer">given X, what's the probability of Y</a>). In this context, from Bayesian perspective, our brain attempts to infer hidden causes about what is perceived through sensory organs (I see a ball about to hit me (X), who threw it (Y)).</p>
<p>A similar thought is presented in <a href="https://en.wikipedia.org/wiki/Predictive_coding" rel="noreferrer">predictive coding</a>, where the brain would 'predict' what will happen in the future, or what happened in the past. ('I see a ball about to hit me (X), I predict it was thrown by Y')</p>
<p>Intuitively (and colloquially speaking), predictions and causes are orthogonal to me - but in this context they seem remarkably equivalent. <em>Are</em> they different, and if so, <em>how</em>?</p>

CC BY-SA 4.0
2021-05-09T01:05:16.250Z
I do like the first answer, but I think I would say causal inference is more specific to meta-cognition (i.e. reflection of an event) that is less associated from my understanding to automatic processes than prediction is. I would use the term prediction for an at least partially automatic process used to lessen the cognitive load, which may rely on past causal inference. Cognitive load being, if a situation looks familiar, it takes less attentional resources to process it.
M. Erickson
<perception><attention><sensory-perception><bayesian><temporal-context>
What is the conceptual difference between causal inference and 'prediction'
user2305193
# What is the conceptual difference between causal inference and 'prediction'

(Asked by: username_0 on 2021-04-05)

Unifying brain theories of cortical function often describe the brain as a prediction machine, based on a generative model ([given X, what's the probability of Y](https://en.wikipedia.org/wiki/Generative_model)). In this context, from Bayesian perspective, our brain attempts to infer hidden causes about what is perceived through sensory organs (I see a ball about to hit me (X), who threw it (Y)).

A similar thought is presented in [predictive coding](https://en.wikipedia.org/wiki/Predictive_coding), where the brain would 'predict' what will happen in the future, or what happened in the past. ('I see a ball about to hit me (X), I predict it was thrown by Y')

Intuitively (and colloquially speaking), predictions and causes are orthogonal to me - but in this context they seem remarkably equivalent. *Are* they different, and if so, *how*?

**Tags:** perception, attention, sensory-perception, bayesian, temporal-context

> **Comments:**
> **username_1**: I do like the first answer, but I think I would say causal inference is more specific to meta-cognition (i.e. reflection of an event) that is less associated from my understanding to automatic processes than prediction is. I would use the term prediction for an at least partially automatic process used to lessen the cognitive load, which may rely on past causal inference. Cognitive load being, if a situation looks familiar, it takes less attentional resources to process it.  

---

## 2 answers

### Answer by username_0 on 2021-04-08. Score: 1

Correct me if I'm wrong here, but after some more reading and thinking this is what I took away: both the term 'prediction' and 'cause' here refer to the maximum likelihood of a distribution ($Y$), meaning the probability of an event ($X$), given sensory data ($Y\_{1}$) and the likelihood given prior data ($Y\_{2}$) .

Even though maybe seemingly orthogonal to some (like me), the terms here would actually represent the same thing (i.e. *no difference*).

Please post a better answer if this is partially or completely incorrect =)


---

### Answer by username_2 on 2021-05-09. Score: 0

[Causal inference](https://en.wikipedia.org/wiki/Causal_inference) is about making inferences about how causes lead to effects. If you have a generative model of the world, you have made some inferences about what will result from some set of conditions.

A *prediction*, on the other hand, is a guess you make about the state of the world given some conditions. If your generative model makes predictions that match what you actually observe, you have a good model. However, if you have some prediction *error*, you either need to update your estimate of the conditions (as part of a higher-order generative model), or you need to change your model parameters.

Let's say you have a room with a light switch and a red light. You notice when the switch is flipped, the red light comes on. Causal inference would lead you to think that the switch causes the light to come on, so in the future when you see the switch flipped you make a prediction that the red light comes on.

If you want you can think about this in terms of a statistical model of the form:

Y = β \* X

where X is the state of the world, Y is your prediction, and β are the weights in your generative model. Causal inference would be choosing the weights β. Prediction would be obtaining Y given X. If we think about this as a logistic model predicting the probability of red light on (Y) given X (state of switch), our causal inference would lead us to set a very high value for β, which in turn would lead us to predict Y is "on" when X is "switch active".

I do not think "I see a ball about to hit me (X), who threw it (Y)" is a good example of causal inference or predictive coding (if you've gotten this example from some reading I'd be happy to take a look and see if I should revise my thinking). Instead, this would be a case where you have already done causal inference to know that balls flying through the air come from some actor: you know your β, which sets the probability of an incoming ball to very high when X is Greg throws a ball. What you want to do if you don't already know X, though, is to find an X that minimizes your prediction error (Y - Yactual). Your naïve prediction is probably that no balls are flying at you (Y = nothing incoming) given that your naïve X is probably no one is throwing any balls. Once you detect that a ball is coming at you, you have a prediction error (there is an unexpected ball coming at you), a model for the world (balls are thrown by someone), and possible prior states of the world X that produced the incoming ball. You can choose the optimal X by minimizing your prediction error, using your generative model (prediction). If you set X to "Greg throwing ball" and that results in a Y that matches your observation, you update the state of the world to say that Greg threw a ball in the recent past.


---

