89 points · by grzm · 5y ago · 65 comments
"Why are the lights off?"
"Because I didn't turn them on."
That's not a counterfactual, it's a fact. Just like the admins not configuring file purging is a (presumed) fact in the scenario under discussion in the article. Negative statements are not counterfactuals. Now, they may not be helpful for a 5 Whys analysis, but that's a separate thing.
Counterfactual: If the admins had turned on file purging, then the volume would not have been full.
Why? Because they didn't turn it on so this is a counterfactual in that it is dealing with facts not in existence in the reality under examination and reaching a conclusion of how things would have been different with those different facts. But nearly all the causes in a 5 Whys can be seen as counterfactuals if phrased correctly:
"Builds did not complete." Why? "Kubernetes could not start the pod, and the operation timed out after 1 hour."
As a counterfactual: If Kurbernetes could have started the pod, then the operation would not have timed out after 1 hour and the builds would have completed.
In order to get the "because" we have to imagine another state of the world where you DID turn on the lights, and further speculate that this would have been effective to illuminate the room. That's counterfactual, because the fact is that it's dark in here.
If me turning on the light is a necessary condition for the light being on, then it implies that if I did not turn on the light the light is off. There is no speculation. This is also what distinguishes this one "counterfactual" from all the others.
The article seems to completely ignore that we can readily argue about negative statements. I highly doubt that airplane crash investigators would avoid counterfactuals.
What they say is that counterfactuals stop the search for the root cause. Not monitoring disk space isn't a root cause of the filled disk. The root cause might be "application has suddenly written too many logs". This gives another set of counterfactuals, like "if your application was configured properly, it would write less logs". But it also gives an option of continuing the search for the root cause, which might be, for example, "there is a bug in the application which triggered the log writes".
I think the point of methods like 5 whys is not to stop at the first set of counterfactuals and deepen the search.
To be pedantic, it’s not quite that either. The logic theorem states if A => B then !B => !A. The => means that A is sufficient for B, because “false => true” evaluates to “true” but “true => false” evaluates to “false”. If it were “necessary”, those statements would evaluate the opposite way.
This means that if me turning on the lights is sufficient for the light being on, then the light being off is sufficient to deduce that I did not turn it on.
It seems like it would be strange to reject as an answer to "why do blind people tend spend less on lighting?" with "Because they don't tend to use the lighting, because the lighting isn't useful to them, so they don't turn the lights on as much (unless someone else who isn't blind is there).".
How else would you answer that question? (modulo little wording changes and such)
But no, in a meaningful sense it's not a true statement about the world. It's a good guess, and for a statement that simple, there might be no need to go further. For a statement about why a volume is full with too many files, the point is that a nice-sounding "if only" isn't something you can test or be certain of.
Your answer about blind people is a very good guess as well, and the same one I would make, but it's not data.
Wikipedia doesn't seem to agree with you:
"The term "Counterfactual" is defined by the Merriam-Webster Dictionary as contrary to the facts.[2] A counterfactual thought occurs when a person modifies a factual prior event and then assesses the consequences of that change.[3] A person may imagine how an outcome could have turned out differently, if the antecedents that led to that event were different. For example, a person may reflect upon how a car accident could have turned out by imagining how some of the factors could have been different, for example, If only I hadn't been speeding...."
The forms the article mentions are like those "if" statements.
>That's not a counterfactual, it's a fact.
That's because there's a one-way casual relationship there. Not the case with TFA examples.
The main idea: Let Y be the set {y, not y} and X be the set {x, not x}. y denotes timing out, and x denotes “Kubernetes not starting the pod”. We have some distribution P(Y=y|X=x) (in this case, the probability of “timing out” (y) given “Kubernetes not starting the pod” x. The counter factual distribution is NOT the same as P(Y= not y | X= not x) (the “probability of not timing out given Kubernetes starting the pod”). The counterfactual is P(Y’=not y| X=x, Y=y, X’=not x), or “the probability of not timing out given that it did originally time out when Kubernetes did not start the pod, and given that this time it did start the pod”.
This aligns roughly with what you are saying above.
"why did the disk fill up" would be most directly explained by the most recent write. That's not useful though. It doesn't really matter what the last write was.
1. https://plato.stanford.edu/entries/causation-counterfactual/
Also, "the car didn't run because there wasn't enough gas" is fundamentally different from "the car didn't run because the engine broke down".
"I'm tired because - I stayed up all night playing games", or, "I'm tired - because my child screamed all night long," are more along the lines of what the post suggests are useful, and I can see how they're fundamentally more useful to getting at the root cause than the counterfactual, "I'm tired because I didn't sleep."
But this example is very simple and makes the argument less important I'd say.
The author of TFA seems to suggest that explanations where Y is "not Z" are inherently less useful (I don't think so) and also calls them "counterfactual" even when "not Z" is a fact, which is confusing.
No - the definition the article refers to is this: adjective - relating to or expressing what has not happened or is not the case.
I used "because" to illustrate the "looking for root cause" use case, like what the article was referring to. Regardless, that doesn't make it counterfactual per the definition the author is using.
To me the part that makes the counterfactual less useful when determining root causes is the human element the author mentions - looking for root cause tends to stop once they're brought up (they're the end of the causal chain in discussion), and blame starts to get assigned. I've seen that happen, and it hasn't helped resolve the issue, so avoiding that seems useful. I don't see a problem with using a counterfactual statement if it really is the root cause and I'm blaming myself for something.
Well, they are different because they propose different causes. Either of these statements (and the so-called counterfactuals in the article) might be true, depending on the actual cause.
The distinction that matters here is that statements of causes are not solutions, and solutions are elicited by different questions than are causes ("what can we do about it?", rather than "why did it happen?") It does not really have anything to do with counterfactuals vs. causes, and the author's actual point seems to be about how to present solutions.
Which... May not be true.
https://plato.stanford.edu/entries/causation-counterfactual/
Its still a somewhat live debate in contemporary philosophy.
The medicine saved the patient's life is true if the patient would have died had the medicine not been administered. How do we determine the truth of such a counterfactual?
In practice we do large scale randomised trails to attempt to simulate a counterfactual to test the causal powers of the the medince - but its probably beyond our powers to know for certain that the counterfactual is true in the singular case.
Philosophers are interested in what makes a counterfactual truth or false, and whether understanding a counterfactual presupposes causation or whether a causation can be understood in terms of counterfactuals. Nobody doubts that counterfactuals and causation are releated, and few doubt that counterfactuals can be reduced to their logical or epistemic counsins.
Implicitly there's this idea that every counterfactual can be contained and localized, but that runs counter to my understanding. Change one thing and you change the entire universe. That's true even classically -- even before you bring in quantum physics and its problems with counterfactuals.
Perhaps counterfactuals are a good model of the psychology of causation. And in fact, I suspect that psychology is as deep as causation runs; it doesn't in fact have a direct physical or epistemic analogue. All of which is fine and important, but I feel like it diminishes the value of the effort put into it. It's not studying VLTIMATE TRVTH, just a quirk of how brains think about stuff. And that would mean you need to use a very different toolset to work on it.
- Build didn't happen, why?
- Pod didn't start, why?
- Disk was full, why?
At this point if counterfactuals are off the table, the answers become tautologies. Although if everyone is in agreement that counterfactuals are not helpful, this could become a powerful heuristic in determining that you've hit root cause and can shift from searching for root cause to designing mitigations for the root cause.
I guess that's the point of the post, but it seemed weird to start a scenario saying "it goes off the rails here, because of XYZ" and not come back and give the better version of that scenario.
- A process wrote 125 GB of logs, why?
- It was compiled with VERBOSE=true, why?
- The build config was changed on 7/12/2021 by Steve, why?
- Issue #5988, need to collect data one why that process crashes so much.
Key points from a good article.
Definition: "A counterfactual is a statement about how the world might be different now if something had happened differently in the past. It’s a kind of “alternate history” idea."
"Here’s the rub: a counterfactual cannot be a cause. By definition the counterfactual did not happen, therefore it cannot have caused anything. Only events that actually occur can be causes of other events. Causality should be stated in a form “Because X then Y”. The statement “If not X then not Y” is not an explanation, it is a kind of wishful thinking about how the past might have unfolded differently."
"When performing Five Whys it is important to avoid this counterfactual leap. Stick to the events that actually occurred. [..]"
"Try to reformulate the counterfactual as a statement about future prevention:"
1. If we configure file purging, then this won’t happen again
2. If we monitor for “volume full” conditions, then this won’t happen again
3. If we clean up files from old builds, then this won’t happen again.
These are useful statements. When formulated this way, they’re clearly talking about the future and not hypothesizing an alternate history. "
For example "The admin did not configure file purging." isn't a counterfactual unless admins were in fact purging files.
A better phrase might be subverted expectations, along with the admonition to make expectations more explicit with the author's if-then examples. Inaccurate expectations are just as important to analyze and fix as hardware and software bugs.
Counterfactuals are actually very powerful and useful because they do let us analyze the past instead of just the future. I have found that chasing counterfactuals usually bottoms out in known failure modes in practice. For example tracing back that lack of disk space in build nodes would probably arrive at either "insufficient design" or "insufficient review" or even "insufficient understanding", all of which are pretty well-known and common engineering failure modes and we already know the solutions in the future; spend more time on design, review with more people, ensure education is happening. It's actually quite useful to do this because as a trend over many postmortems "insufficient design" has very different organizational solutions than "insufficient understanding" and it's a meta-level counterfactual of "if we were better at (design|understanding) what problems would we avoid?"
Actually, he lost me earlier, cos "The admin didn't configure file purging" is something that did happen: the admin failed to take an action. The event happened even if the action didn't; the article confuses the two
It doesn't really matter tho since this article is really just a piece of advice on how to handle incident reports in a tactful and constructive manner, not a serious argument about causality
___
If there is a domino, and I push it, and it falls over, I think most will agree that "It fell over because I pushed it.".
If I don't push it, this article seems to say that "It didn't fall over because I didn't push it." is not a causal explanation.
And, maybe that's right, but I don't think the "because 'if I had pushed it, it would have fallen down' is a counterfactual" is convincing reason for that.
Because in the case where "I don't not push it" and it "doesn't stay up", shouldn't "It didn't stay up because I didn't not push it" be a valid causal explanation, being equivalent to "It fell down because I pushed it", yet, in this case, "if I hadn't pushed it, it wouldn't have fallen down" would be a true counterfactual?
-- oh, this article is about advice for language use in interpersonal stuff (especially in a work environment), and maybe practical problem solving in general, not studying metaphyics-or-whatever of causation, ok.
She discusses some views on how to reason about common sense statements like "Smith's failure to water her office plants caused their death". The salient views covered are:
1. causation by absence is impossible (making the plants statement false)
2. causation by absence is possible and attributing an absence to a cause is sound when the absence is "abnormal". This could be because Smith normally waters the plants, it was Smith's job to water the plants, or Smith made a promise to water the plants.
3. causation by absence is not possible, but it is valid to offer "causal explanations". This is the suggested approach in the paper. A causal explanation provides information about the causal history of an event, but doesn't need to specify a specific node in the causal graph. C causes E is a causal statement. E because C is a "causal explanation". E because C doesn't necessarily imply C causes E. So adopting this approach, The plants died because Smith failed to water them is a true statement that provides some additional explanatory information, Smith failing to water the plants caused their death is not.
I think these distinctions may have some minor implications on how you perceive blame.
1. The point of counterfactuals is not to "prove" causality; it's to help you detect possible causal routes, in the presence of given events under examination. E.g. if you know events X, Y and Z co-occurred, and you want to know if X or Y could have possibly caused Z to happen, the counterfactual formulation can answer that question. If not X implies not Z, whereas Y does not alter Z, then you have eliminated Y as a causal agent, and have identified X as a possible causal agent (in fact the only possible causal agent, if Z could not be influenced by another external, unidentified agent, or by itself).
Furthermore, in the presence of a number of counterfactual statements, you can allocate responsibility and blame, linked to expectations of events. So aliens is a silly example, unless for whatever reason the author has a very high prior expectation for their existence, which exceeds that of file purging errors.
Many times I dont have visibility into the entire system so the best I can give the client a good set of counterfactuals on the bad policy they used to get to that place.
I.e. I administer a pill with an active drug to a treatment cohort. What would have happened had I administered no drug (sugar pill) to the same treatment cohort.
Counterfactuals require a causal model. More so, they belong to at least one causal model. This can be a mental model, a formal one, a precise one or a diffuse one. Nevertheless, counterfactuals "come" with an implied model. People may disagree about which model they talk about, and which model is correct. Such a model may or may not be "precise" enough to identify useful parameters, which is the real rub here.
For example, the three "Counterfactuals" the author presents presume a model where purging the cache (etc.) directly causes the problem to go away. Each of those statements might come from the same or from a different causal model.
The problem, which I feel make this approach not useful, is that the author has no model in mind. In other words, they switch between different models. One counterfactual is, for instance, "If we don't live on earth, then we don't care about the cluster". Let's ignore that the outcome variable is different. The model with "We are not even alive" as a variable is not a reasonable one. First, it is empirically wrong. Second, it does not "identify" parameters (relationships) of interest. These two points are what we strive for when using a model (which we do when we construct counterfactual, even if it is a verbal model!)
The author posits that one can add unlimited counterfactuals. What the author means is that one can add unlimited variables and relationships (however diffuse) to the model. This is true.
However, we still need to judge whether the model is good, whether it is helpful. In drawing such analogies to statistics, one should not forget the other concepts.
From a statistical standpoint, the author begins with a model that does not identify causal parameters associated with the failure to start the cluster. They then add "counterfactuals", that is, they expand their mental model to new causes. They find that any of these variables may cause a counterfactual where the cluster starts.
In my view, the author is only half right. Counterfactuals, as presented here, imply a causal model (perhaps not a precise one). Counterfactuals can be useful, if the underlying model is useful. Whether this is the case, depends largely on factors the author does not discuss in the article.
Edit: It may also be helpful to distinguish a counterfactual from "observations with exogenous variation". For example, if we purged the cache some time ago purely by accident, and the cluster did start, we might take this as a hint that purging the cache allows the cluster to run. This is not a counterfactual. It can be used to identify causal chains. If we were sure that nothing else was different (in a certain statistical sense), then we could "identify" a causal path from cache purging to staring the cluster. However, to determine that, we again need a model. In fact, we need a model and assumptions about the observation (what is called data generating process) jointly - because really, they are the same thing. For example, if the cache was purged because an engineer discovered an error somewhere, and then did some other action Y - perhaps it was not the purging of the cache that allowed the cluster to run. It may have been action Y. Here, purging the cache was not "exogenous" enough for us to infer the correct reason.
Identification of a model/DPG is a deep concept, but a crucial one to finding cause and effect.
Not only are counterfactuals infinite in number but ALL hypothesis are infinite in number. You can literally say ANYTHING about why something didn't build. I can say someone didn't purge some files or I can say someone purged files or I can say aliens destroyed the server with a laser. There are an infinite number of statements that can be made here and whether it's a "counterfactual" is irrelevant.
What the author doesn't know is that NOTHING can establish causation except for a very specific type of experiment.
Basically there is nothing that can establish causality UNLESS you have control over the causal switch. You flick the switch randomly and if the randomness of the switch flicking correlates with the consequence you have then have established causation. BUT you have only established it to a certain correlative degree. It is fundamentally impossible in this reality to establish causation to be 100%. True causation can never be fully verified and at best the experiment I described is the best fuzzy verification. If you truly study how science works you will find that this flaw extends to all of science and therefore reality. In reality as we know it, nothing can be proven. Proof is fundamentally impossible. If you understand this concept then you will truly understand what science is.
Anyway, Going to the authors Kubernetes example, his "counterfactuals" are basically null hypothesis and can be helpful in establishing causation but by themselves are pointless.
It's simple... If you hypothesize that something didn't build because the admins did not "configure file purging" then to establish causation is SIMPLE. Configure the file purging and see if your system builds. Then remove the configuration and see if the system stops building. Do this enough times and you have established causation or zero causation to a certain degree.
That's it. This is science and probability and statistics. So crazy to see someone mention causality without even knowing what it really is.
Causation is "established" in the usual sense by having a causal model of a data generating process. Such model may or may not identify causal parameters given the data. That is, it is not the "randomized control trial" itself that establishes causation, rather it is a more general concept of statistical identification.
Case in point, there are instances where a RCT fails. For example, even if you can assign treatments, you might find that treatment and control groups influence each other or whatever else can go wrong in a RCT.
By contrast, there are instances where we do not control the causal switch, but we can observe "natural experiments" nonetheless. Usually, causation is fuzzy, since there are at least some assumptions which need to be made for us to believe the analysis to be causal. However, really, the same is true for an RCT.
For example, if you observe an engineer sometimes purging the cache, and sometimes not purging the cache, you do not actually control the assignment of treatment. However, it is easy to think of a mental model where observations of this engineer, and the state of the cluster, gives you high confidence to proclaim: "Purging the cache makes the cluster start!"
So, this is just to expand on what you wrote: Causation is not a precise concept, because it depends on our model of the DGP and the data we actually have. Identification of causal parameters depend on these factors, and thereby on assumptions - this is true for RCTs where I control the treatment, just as much for observational studies where I do not. Even if I assign treatments, I have to make the assumption that my assignment is truly random, and that there is no non-random factors influencing my observations (etc).
In quite a broad sense, causation as a scientific concept depends on assumptions I need to make. If I get to control the treatment variable (or variable of interest), it is typically easier to create "exogenous" variation that identifies causal parameters... in English: Allows me to establish causation.
However, the whole concept does not depend on controlling or not controlling treatment. RCTs can fail, or there are instances in which I can establish and measure causation even without controlling the treatment.
It may be that I'm coming from a more philosophical perspective. What is randomness?
If randomness involves free will then only an entity with free will can create that random variable aka only another person or yourself can create randomness.
Pedant-ism aside, can you think of a "truly random" data generative process that doesn't involve someone with their hand on the switch?
I guess this is the assumption I am making in my explanation: Only people with this magical thing called "free will" can generate random data, nothing else can be trusted to be truly random so you or another person has to have their hand on the switch in order to establish causality.
Note that even your example stayed within the limits of this assumption. You were possibly unable to choose another example that didn't involve someone with free will. Either I have my hand on a switch, or I'm observing another engineer who has his hand on the switch.
Typically to illustrate a point one would usually pick an outlandish example that strays very far from a human having his hand on a switch and show that the example is STILL true. But you didn't do this and that may mean something.
You see, in the pragmatist view of a statistician (and in the math that goes with it), randomness - for example in the form of statistical independence - is not required to identify causality (or causal parameters of a model).
Instead, we need the "switch" variable to be uncorrelated with things we do not observe, or can not adequately model. This requirement holds for a random experiment as much as for an observational study. However, you will quickly convince yourself that this is an assumption. It depends on the data and how we got it, it depends on what we assume about the factors at play, and it depends also on the model and how we take into account factors that influence the outcome.
Specifically, the identifying assumptions for a causal model are untestable. Let me emphasize this again: Every causal analysis is fuzzy, because they are only causal based on the assumptions.
As such, the question of true randomness is somewhat ancillary: Statisticians know that the idea of causality is by default not a philosophically "true" concept. This, of course, leads to a pragmatist view.
One last point: Between free will and flipping a switch, and a causal analysis, stand many assumptions about the data, the measurement, and so forth. In that sense, statisticians probably do not feel that a random flip switching is less assumptive than any other causal analysis.
Related to this, let me offer you the perspective of social scientists. They feel that human behavior IS influenced by other factors, just as a machine or physical system would be (broadly speaking). That is, they would reject the notion that free will is indeed (or at least always) random. In such studies, for example, choices from individuals would also be subject to intense scrutiny with respect to unobserved influences or other factors that might endanger the exogeneity of the observed choices.
Causal identification has been likened to a Zoo, with many kinds of animals in them. I am sure the philosophical idea of causation is part of the Zoo. On the other hand, statisticians speaking of causal analysis find themselves unable to "prove" any sort of causality, even weak forms as indicated above, without underlying assumptions. Case in point, a randomized controlled trial is chock-full of identification and exclusion assumptions. They are just standardized and accepted.
Sorry again that I have to rely on the statistical view - it is the only one I know a little bit about.