<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Counteractual on Medium]]></title>
        <description><![CDATA[Stories by Counteractual on Medium]]></description>
        <link>https://medium.com/@counteractual?source=rss-a8d9bc79a90c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*f5r9uEZL9XYf6Zz6.jpg</url>
            <title>Stories by Counteractual on Medium</title>
            <link>https://medium.com/@counteractual?source=rss-a8d9bc79a90c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 23 Jun 2026 14:51:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@counteractual/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[A Thin Line between Chance and Responsibility]]></title>
            <link>https://medium.com/@counteractual/a-thin-line-between-chance-and-responsibility-a0c523ed2b00?source=rss-a8d9bc79a90c------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0c523ed2b00</guid>
            <category><![CDATA[causality]]></category>
            <dc:creator><![CDATA[Counteractual]]></dc:creator>
            <pubDate>Tue, 04 Oct 2022 03:19:15 GMT</pubDate>
            <atom:updated>2022-10-04T03:56:20.854Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s play a game. I flip a fair coin behind my back, and you guess “heads” or “tails”. After you guess, I reveal the result of the flip, and you win if you guessed correctly. Obviously, assuming no funny business, you have a 50% chance of winning regardless of your choice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eGBDbKU16iwvhZrkc4SVdw.png" /></figure><p>Simple enough, right? Let’s change the game slightly. This time, I flip two fair coins–one in each hand–and you guess “heads” or “tails”. If you guess “heads”, I reveal the coin in my right hand and keep the one in my left hand hidden. Otherwise, if you guess “tails”, I’ll reveal the left coin while concealing the coin in my right hand. You win if the coin that I reveal matches your guess.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GCSVrX5ZmBPa5tPL3u3Z2A.png" /></figure><p>Let’s denote these two versions of the game as V1 and V2 respectively. It’s not so hard to see that in this second case with V2, your chance of winning is still 50%. If you guess “heads”, there is a 50% chance that the coin in my right hand landed on heads. If you guess “tails”, there is a 50% chance that the coin in my left hand landed on tails. In fact, from your perspective, V2 of this game might as well have been identical to V1. Whether I flipped one or two coins behind my back had no impact on the outcome of the game. After all, you only get to see one of the coins, and both coins function identically. Is there even a difference between these two scenarios? Perhaps philosophically?</p><p>To answer that question in a more interesting manner, let’s say you have a time machine. Suppose we played V1 and you bet your life savings. You guessed “tails”, but after I revealed the coin, it turned out to be “heads”. Now you’ve lost your entire life savings. However, by seeing that the coin was revealed to be “heads”, you’ve learned some helpful information. Notably, you know that if you had guessed “heads” instead, you would have won. There’s no chance or doubt involved once you see the result. Since I flipped the coin before your guess, it’s guaranteed that the coin would have revealed to be “heads” irrespective of your guess. Fortunately, with your convenient time machine, you can travel back to the point when you made your guess and switch it to earn back double your life savings.</p><p>What if we had played V2 instead? Suppose you guessed “tails”, and the outcome was “heads”, so you lost your life savings. Would you have fared better if you had guessed “heads” instead? It turns out, by the simple fact that I flipped two coins instead of one, knowing that the result was “heads” doesn’t tell you anything about what would have happened if you had guessed “heads” instead of “tails”. You know that the left coin flipped to “heads”, but that doesn’t tell you anything about the coin in my right hand, which is the coin I would have revealed if you had guessed “heads” instead. Both were flipped independently and don’t affect each other. Sure, you might as well use your time machine to go back and change your guess to “heads” anyway, but your chances of winning are still 50%. Your chances of winning are no better than just playing again without using the time machine.</p><p>Okay that’s great, there is a difference established here. Given evidence of an actual outcome (the first guess), we can make inferences about the hypothetical outcome of a different action (the second guess after using the time machine). This inference is different depending on which version of the game we play. In V1, knowing the outcome of the first guess tells us exactly the outcome of the second guess. In V2, knowing the outcome of the first guess tells us no additional information about the outcome of the second guess. Still, time machines don’t exist, and you wouldn’t even have known which version of the game we were playing just by looking at the coin result if I didn’t tell you. So why is this even interesting to consider?</p><p>In terms of practical applications, it seems like you could never predict a hypothetical scenario that didn’t actually occur if you don’t understand the underlying rules of nature. For example, knowing the outcome of the coin flip wouldn’t have helped you predict the outcome under a different guess if you didn’t know which version of the game you were playing. And since time machines don’t exist, you can’t keep going back in time to verify it experimentally.</p><p>This ambiguity is, in fact, what makes this kind of phenomenon interesting. This is precisely the issue with trying to understand someone’s intent. Suppose Susie and Billy are walking together, and they spot a lost wallet on the ground. Billy looks in the wallet and finds a thick sum of money in it. Susie tells Billy to turn the wallet into the police, and Billy responds, “Of course I will, I would never steal the money.” They turn it into the police, and Susie is impressed by Billy’s honest nature. Still, despite the outcome, was that really Billy’s true intentions? Had Susie not been there, would Billy have kept the money for himself? Maybe Billy was telling the truth that he would never steal the money, or maybe he lied to conceal his true nature. At the end of the day, the wallet was returned, but the answers to these questions determine Billy’s honesty. Our impression of Billy’s character depends on the alternate realities where Billy finds the wallet under a different setting. We could continue to observe Billy in the future, but we can reserve judgment on him in this situation because we would never know what he was really thinking in the moment.</p><p>This kind of plausible deniability is often the issue that courts face when establishing blame and responsibility. Did John commit the crime? Was it an accident? Even if John committed the crime intentionally, did he do so under the order of his boss? Would John still have committed the crime if his boss didn’t give the order? Did John’s boss give him the order, not expecting him to commit a crime? These questions are impossible to answer definitively since we could never look into John’s or his boss’ head. At best, we can only infer based on collected evidence and assumptions.</p><p>In the context of the coin flip game, there are implications of responsibility as well. In V2, you may have lost after guessing “tails”, but who knows if you would have won if you had guessed “heads”? In V1, you absolutely know you should have chosen “heads” instead. In some sense, that makes it <em>your fault </em>for losing in that scenario. Interestingly, this implication of blame depends on which version of the game we play, which is indistinguishable from your perspective as the player.</p><p>Broadly speaking, the study of this kind of phenomenon falls under the umbrella of explainability and fairness. Perhaps disappointingly, the coin flip game shows that it’s generally impossible to inquire about a hypothetical outcome from realized observations alone (i.e. in the case where the player is unsure which version they are playing). Yet these questions about hypothetical outcomes are often the most important when it comes to understanding <em>why</em> something occurred or who is responsible for making it occur. Making educated guesses to these questions is tricky, yet it is how society progresses.</p><p><em>For a more technical understanding of this phenomenon, consult sources on causal and counterfactual explainability and fairness such as </em><a href="https://ftp.cs.ucla.edu/pub/stat_ser/r266-part1.pdf"><em>this textbook</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0c523ed2b00" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How “Rich” is Your Question?]]></title>
            <link>https://medium.com/@counteractual/how-rich-is-your-question-56eda49745f9?source=rss-a8d9bc79a90c------2</link>
            <guid isPermaLink="false">https://medium.com/p/56eda49745f9</guid>
            <category><![CDATA[causal-inference]]></category>
            <category><![CDATA[causality]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[counterfactual]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Counteractual]]></dc:creator>
            <pubDate>Tue, 18 Aug 2020 01:30:14 GMT</pubDate>
            <atom:updated>2020-08-18T01:30:14.121Z</atom:updated>
            <content:encoded><![CDATA[<p>Science is about answering questions, but not all questions are created equal. Some questions are straightforward, like “Who was the author of Hamlet?” Some questions may not necessarily have a correct answer, like “What is the meaning of life?” Science focuses on answering testable questions, but what exactly is being tested? Generally speaking, a scientist must gather information from a data source and infer some conclusion from the patterns found in the data. But what kind of information is convincing enough to answer the question? Often, scientists will irresponsibly try to use surface-level data to answer a deeper question, like in this hilarious example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CmlOANthk9WYIGIQ2_pd8A.png" /><figcaption>Source: <a href="https://www.tylervigen.com/spurious-correlations">www.tylervigen.com</a></figcaption></figure><p>In this case, one may ask the question, “Does eating cheese cause more people to die via bedsheets?” Despite the strong correlation, it would be absurd to claim that cheese is ruining society by invoking the wrath of bedsheets. Examples like this explain why the term “correlation is not causation” is often preached in statistics courses. When a false conclusion like this is made (but maybe less extreme), it usually isn’t due to malicious intentions — it’s human nature to see a pattern and think, “Something must be up here.” We want to dive a little deeper into this idea that some questions are “deeper” than others, and some types of data are “richer” than others. We want to show why knowledge of causality is vital to conduct proper science, and we aim to do this by explaining Judea Pearl’s causal hierarchy (Pearl, 2000).</p><h3>Layer 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*SV6IqHEkeNa60rFPRPgetA.png" /></figure><p>Pearl’s causal hierarchy refers to three nested layers of knowledge, with each successive layer representing a more general understanding of the world. Layer 1 represents how a human views a world by <em>seeing</em> or observing with their own senses.</p><p>Layer 1 is capable of answering questions that ask “What is?” or “How does seeing one thing change my belief of something else?” Perhaps you believe you should bring an umbrella when you see that the sidewalk is wet because most of the time when the ground is wet, it’s raining. This is a sensible response made using layer 1 information, as you were able to draw a connection between wet concrete and rain. In this regard, layer 1 information can be very useful. Would it still make sense if you said that wet concrete causes rain? Fortunately, you don’t need to know whether the relationship is causal in order to make your decision of bringing the umbrella, but layer 1 information is not enough to answer a causal question like this.</p><p>When scientists claim that two variables are correlated, they are talking about a layer 1 pattern. Maybe you hear on the news that people who eat more broccoli end up with higher salaries. Does this mean you should stuff your face with broccoli in hopes of getting a raise? Even if you conduct a rigorous scientific study and find statistically significant evidence that people with higher broccoli consumption had higher salaries, you cannot know if the correlation is due to broccoli causing salary, salary causing broccoli, or some third confounding variable causing both. Even if you knew this information, it’s still not clear how strong the causal effect is. We need a richer type of information to figure this out.</p><h3>Layer 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*YRXSmS9t_lJXCXmXyTv2Og.png" /></figure><p>Layer 2 represents how a human interacts with the world by <em>doing</em> or intervening with their environment. Layer 2 is capable of answering questions that ask “What if?” or “How does changing something affect something else?” This includes the causal questions we asked earlier that layer 1 was too limited to answer. For instance, maybe you are actually wondering “Does wet concrete cause rain?” Obviously no, but how could you verify it yourself? You could just take a bucket of water, splash it on the sidewalk, and see if it starts raining. You’ll quickly find that there’s no causal effect of wet sidewalks on weather. This is, indeed, a causal observation, and the fundamental difference is that you took matters into your own hands to answer this question. You stepped in and threw that bucket of water yourself. You didn’t just sit back and log in a notebook when the sidewalk was wet and when it was raining.</p><p>In practice, we can try to answer layer 2 questions through experimental studies. If you’re keen on finding out whether broccoli causes higher salaries, you can perform an experiment. Find some random participants, force-feed half of them broccoli, and force the other half to abstain from eating broccoli entirely. Check back in a few years to see if the broccoli subjects end up with higher salaries than the non-broccoli subjects. If done properly, then certainly, you would be the expert on the question “Does broccoli cause higher salaries?”</p><p>Unfortunately, not every experiment is possible due to financial, legal, ethical, or physical reasons, which is why not every scientific study is an experiment. We won’t be able to perform an experiment to find out whether clear weather raises crime rates since we can’t change the weather. That doesn’t mean we aren’t interested in this question. In this sense, it becomes clear why studying causal inference is important. Not only does it allow us to differentiate between the types of questions we study, it also helps us find workaround solutions to questions that can’t be answered directly.</p><p>With all of this said, it’s evident that layer 2 contains answers to a much richer set of questions than layer 1, including answers to all of the questions that layer 1 can answer. This is due to the technicality that having no intervention is also a type of intervention. It may seem that by fully grasping layer 2, we can answer every testable question of interest, which would be a great feat for all of science. However, a deeper dive into Pearl’s causal hierarchy reveals a surprising result: there are interesting questions that even layer 2 cannot answer.</p><h3>Layer 3</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*M6EMEv3J_dD4EAfm-nN-Iw.png" /></figure><p>Layer 3 represents how a human reflects on certain actions by <em>imagining</em> other situations aside from the one that actually occurred. Layer 3 is capable of answering questions that ask “Why?” or “What if I had done something else?” While layer 1 focuses on observational studies and layer 2 focuses on interventional studies, layer 3 focuses on <em>counterfactual</em> studies. Readers of the blog may be familiar with this term from the <a href="https://medium.com/@counteractual/introducing-counteractual-407a235d8245">previous blog post</a>, but it’s not necessary to understand this post.</p><p>Continuing the same example, let’s say, for some miraculous reason, you find that eating more broccoli does indeed result in a higher salary. Perhaps broccoli has some health benefits that turns you into a smarter employee. However, even if you ate a lot of broccoli and had a higher salary, there could still be other reasons for your higher salary, most of which are not related to the broccoli. Then you might be interested in answering the question “What would my salary be like if I hadn’t eaten broccoli?” This is a question that layer 2 cannot answer. The difference is that by eating broccoli, you’ve committed to a world where you’ve eaten the broccoli. You’ll never be able to witness the world in which you didn’t eat the broccoli. Maybe knowing that broccoli impacts salary might lead you to think that you would have a lower salary otherwise, but you wouldn’t know without seeing that other world.</p><p>Unfortunately, most questions from layer 3 can’t be answered through scientific studies since we can’t repeat the past and try something else. Nonetheless, many of the questions we seek to answer involve counterfactual thinking. If Alice originally had COVID-19 and was cured of the disease, why was she cured? Suppose we knew she took a drug that is proven to have a causal effect on the disease. However, the drug affects everyone differently — it helps some people and hurts others. Then, did Alice recover because of the drug, despite taking the drug, or regardless of taking the drug? We may not be able to find out because we can’t see what would have happened if Alice had not taken the drug.</p><p>Counterfactual information is important since it can be used to assign blame. If a bridge falls apart seemingly out of nowhere, whose fault is it? Did the construction workers make a mistake? Was the architect who designed the blueprints incompetent? Did the mayor fail to provide enough funding for the project? It may be impossible to find out since we can’t reverse time and change what happened. However, if we could, we could pinpoint exactly what was responsible for the collapse of the bridge.</p><p>These examples show that layer 3 contains answers to a much richer set of questions than even layer 2. This includes questions that layer 2 can answer due to the technicality that if you can imagine any alternate scenario, you can obviously also imagine the one that actually occurred. Hopefully, these examples also illustrate the importance of finding ways to answer questions from layer 3. These questions are not limited to science — they occur in everyday-life.</p><p>Even if some questions can’t currently be answered, Pearl’s causal hierarchy can help you understand the depth of your question. When you ask a question, whether it’s about broccoli or something more serious, take a step back and think about the details. What layer information do you need to answer the question? Are you asking about an everyday pattern you observed? Are you wondering about the consequences of an action? Are you imagining a hypothetical situation that didn’t occur? Depending on the type of question, you’ll know if you can answer it right away, or if you’ll need to dig deeper for some more compelling evidence.</p><p>Many of the posts on this blog will refer back to Pearl’s causal hierarchy. If you would like more details on the topic, we once again recommend reading <em>The Book of Why </em>by Mackenzie &amp; Pearl. For a more technical explanation, see <a href="https://causalai.net/r60.pdf">this formal survey</a> for Pearl’s causal hierarchy.</p><p>Citations:<br>Bareinboim, E., Correa J. D., Ibeling D., &amp; Icard T. (2020). On Pearl’s Hierarchy and the Foundations of Causal Inference.<em> </em>Retrieved from <a href="https://causalai.net/r60.pdf">https://causalai.net/r60.pdf</a>.</p><p>Pearl, J. (2009). <em>Causality: Models, Reasoning, and Inference, </em>2nd<em>.</em> Cambridge University Press, New York.</p><p>Pearl, J. and Mackenzie, D. (2018). <em>The Book of Why.</em> Basic Books, New York.</p><p>Vigen, T. (n.d.). [Spurious correlation image between cheese consumption and deaths by tangling of bedsheets]. Retrieved August 16, 2020, from <a href="https://tylervigen.com/spurious-correlations">https://tylervigen.com/spurious-correlations</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56eda49745f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Counteractual]]></title>
            <link>https://medium.com/@counteractual/introducing-counteractual-407a235d8245?source=rss-a8d9bc79a90c------2</link>
            <guid isPermaLink="false">https://medium.com/p/407a235d8245</guid>
            <category><![CDATA[causality]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[counterfactual]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Counteractual]]></dc:creator>
            <pubDate>Thu, 19 Mar 2020 22:53:05 GMT</pubDate>
            <atom:updated>2020-08-17T02:21:04.019Z</atom:updated>
            <content:encoded><![CDATA[<p>Why is this blog named “Counteractual”? It’s a mashup of three words embodying our philosophy surrounding this blog, which is focused on the subfield of AI called “causality”. We want each piece to:</p><ol><li><strong>Counteract</strong> potentially harmful myths in the field by disproving them,</li><li>Show the <strong>actual</strong> facts instead, and</li><li>Answer questions that start with “Why?” or explore “What if I do this?” These are called causal or <strong>counterfactual</strong> questions.</li></ol><p>We use counterfactuals whenever we imagine consequences of things that never happened. Wikipedia puts it more technically, saying it’s a “conditional with a false if-clause” or a hypothetical deduction. It’s when we think of the things that “should have” or “could have” happened and when we ask questions like “What if we’d never met?” or “What if I didn’t forget to turn in that final paper?”</p><p>Here’s an example of a counterfactual. Let’s say you’re a student, and your (somewhat devious) math teacher gives you an unannounced exam. You open the exam and, to your surprise, every single question is a True/False question. Relief floods over you as you realize that even if you don’t know an answer, you have a 50/50 chance of getting the question right anyway. You confidently finish the exam, only to find out later you only scored 10%. “<em>That’s impossible!</em>” you think. A monkey would have scored 40% better. Worse yet, when the second exam comes around, you study even harder only to end up with the exact same score! What gives? How do you prevent this from happening on the final? Should you just randomly guess instead of trying and accept a 50%?</p><p>Let’s take a step back and think about the causal relationships.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/0*D_w7GsU6mxzoM7_b" /></figure><p>This diagram shows the causal relations in this scenario. You (Y) are supposedly able to control what score (S) you get based on how hard you study. Your teacher (T) is able to affect both you and your exam score based on what they teach and what they put on the exam. Now you realize that your teacher may have some say in your score. Perhaps your teacher is purposely putting trick questions on the exams to make you lean towards the wrong answer. If you knew what your teacher was thinking, maybe you could do something about it, but sadly you don’t, so your view of the model looks more like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/0*5X_n77nCly_PIdgT" /></figure><p>This standard notation of a causal diagram shows that you (Y) and your exam score (S) are confounded by some unknown variable, which is really T. If you can’t observe your teacher’s thoughts, is all hope lost?</p><p>Luckily, counterfactual thinking is here to save the day. Let’s look back to your thoughts while you were taking the exams. Suppose for question 1, you answered True, to the best of your knowledge. What would have happened if you had chosen False instead? Since you got a 10% on both exams, there’s a 90% chance that you would have turned a wrong answer into a right answer. Repeating this line of thought for every question on the exam, you come up with your strategy for the final, which will surely be just as difficult.</p><p>Instead of randomly guessing, you choose the <em>opposite</em> answer that you would have chosen normally for each question. Statistically speaking, you’re on track to getting a 90% on the exam. Congratulations!</p><p>This is an example of how we’re able to reflect on our earlier decisions and hypothesize the consequences of alternate decisions. Causality researches in A.I. create algorithms that will ask and answer counterfactuals on their own. Future posts will go into more depth.</p><p>In the meantime, if you want a detailed but user-friendly introduction to causality and counterfactuals, we recommend <em>The Book of Why </em>by Mackenzie &amp; Pearl.</p><h3>About the Authors</h3><p>Kevin Xia</p><p>I am a Ph.D student studying computer science at Columbia University. I research causal inference, a subfield of machine learning, under Prof. Elias Bareinboim. My research as an undergraduate focused on applications of deep learning such as learning with invariances and applying deep reinforcement learning methods in engineering tasks.</p><p>Hannah Ho</p><p>I am a graduate student in business analytics at The University of Texas at Austin until May 2020 and studied nursing as an undergraduate.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=407a235d8245" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>