8 ms·
Causal inference as a blind spot of data scientists
- bertil 3y agoThe main reason for not using causal inference is not because data scientists don’t know about the different approaches or can’t imagine something equivalent (a lot of reinvention); forecasting is one of the most common tasks, after all. The main reason is that they generally work for software companies where it’s easier and less susceptible to analyst influence to implement the suggested change and test it with a Random Control Trial. I remember running an analysis that found that gender was a significant explaining factor for behavior on our site; my boss asked (dismissively): What can we do with that information? If there is an assumption of how things work that doesn’t translate to a product change, that insight isn’t useful; if there is a product intuition, testing the product change itself is key, and there’s no reason to delay that. There are cases where RCTs are hard to organize (for example, multi-sided platform businesses) of changes that can’t be tested in isolation (major brand changes). Those tend to benefit from the techniques described there——and they have dedicated teams. But this is a classic case of a complicated tool that doesn’t fit most use cases.
- riedel 3y agoActually causal inference is also really hard to benchmark. My colleague started an effort to be actually able to reproduce and compare results. Also the algorithms often do not scale too well. Everytime we wanted to use this for real data it is just a little bit too much effort and the results are not conclusive because it is hard to verify huge graphs. My colleague e.g. wanted to apply it explain risk confounders in investment funds. I personally also do not like the definition of causality they base it on.
- kjkjadksj 3y agoYou don’t need to look at a graph at all though, right? There are plenty of tests that can help you identify factors that could be significantly affecting your distribution
- muraiki 3y ago“Graph” here means the directed acyclic graph encoding the causal relationships, not a chart of a distribution.
- bigfudge 3y agoIf you want to make causal inferences you really do have to look at a graph that includes both observed and probable unobserved causes to get any real sense of what’s going on. Automated methods absent real thinking about the data generating process are junk.
- esafak 3y agoYou can only select among features that you have measured.
- Dzidas 3y agoOne way to test this is through a placebo test, where you shift the treatment, such as moving it to an earlier date, which I have seen used successfully in practice. Another approach is to test the sensitivity of each feature, which is often considered more of an art than a science. In practice, I haven't observed much success with this method.
- esafak 3y agoGo on, please. What definition, and algorithms with scaling problems?
- mikpanko 3y agoA/b experiments are definitely a gold standard as they provide true causality measurement (if implemented correctly). However, they are often expensive to run: need to implement the feature in question (which is less than 50% going to work) and then collect data for 1-4 weeks before being able to make the decision. As a result only a small number of business decisions today rely on a/b tests. Observational causal inference can help bring causality into many of the remaining decisions, which need to be made quicker or cheaper.
- bertil 3y agoCausal inference is useful, but it's neither quicker nor cheaper.
- mikpanko 3y agoAgree that it is hard today. A person you might know is trying to prove that is doesn’t have to be: https://www.motifanalytics.com/blog/bringing-more-causality-to-analytics https://www.motifanalytics.com/blog/bringing-more-causality-... . We’d love to chat more with you on the topic - feel free to hit Sean or me on LinkedIn.
- bertil 3y agoI am a big fan of what Sean and you are trying to do–I wrote up a chapter about it this weekend, actually. I’m worried that you both have worked for companies where a lot of work has been done to identify relevant dimensions (metrics and categories) and automate causality (or rather: estimating factors on a pre-existing causal graph because that’s the slight of hands the word “causality” does) made sense once you’ve reached that level of maturity. But to reach that point, before having relevant dimensions, there has to be a lot of work, generally motivated by disappointing experiments. “Why didn’t that work?” is often answered by “Because our goal is too remote from our actions—here’s a better proxy” or “Because this change only makes sense to 8% of our users, here’s how we can split them.” I’m worried that too many people will think the tool itself is enough and not a complement to the maturity in understanding a company’s user. This ‘solutionism’ is widespread among Data tools: https://www.linkedin.com/posts/bertilhatt_the-potential-gap-activity-7118154583176077312-qKHY https://www.linkedin.com/posts/bertilhatt_the-potential-gap-...
- Dzidas 3y agoYou can apply it to estimate the impact of any business decision if you have data, so not only IT companies can benefit from it. However, the problem arises when the results don't align with the business's expectations. I have firsthand experience with projects being abandoned simply because the results didn't meet expectations.
- Anon84 3y agoFor a hands on introduction to Causality, I would recommend “Causal Inference in Python” by M. Facure https://amzn.to/46byWnl https://amzn.to/46byWnl Well written and to the point. <ShamelessSelfPromotion> I also have a series of blog posts on the topic: https://github.com/DataForScience/Causality https://github.com/DataForScience/Causality where I work through Pearls Primer: https://amzn.to/3gsFlkO https://amzn.to/3gsFlkO </ShamelessSelfPromotion>
- qmsoqm 3y agoThanks for the recommendation
- quotient 3y agoThe Facure text is good, can confirm
- hackernewds 3y agoThank you for sharing
- tomrod 3y agoI've self-learned for a long time in the causal inference space and model evaluation is a concern for me. My biggest concern is falsification of hypotheses. In ML, you have a clear mechanism to check estimation/prediction through holdout approaches. In classical metrics, you have model metrics that can be used to define reasonable rejection regions for hypothesis tests. But causal inference doesn't seem to have this, outside traditional model fit metrics or ML holdout assessment? So the only way a model is deemed acceptable is by prior biases? If my understanding is right, this means that each model has to be hand-crafted, adding significant technical debt to complex systems, and we can't get ahead of the assessment. And yet, it's probably the only way forward for viable AI governance.
- mjburgess 3y agoTo be clear, the mechanism for checking ML doesn't really check ML. There's really little value in a confidence interval conditional on the same experimental conditions that produced the dataset on which the model is trained. I'd often say it's actively harmful, since it's mostly misleading. Insofar as causal inference has no such 'check', its because there never was any. Casual inference is about dispelling that illusion.
- tomrod 3y ago> Insofar as causal inference has no such 'check', its because there never was any. Casual inference is about dispelling that illusion. Aye, and that's the issue I'm trying to understand. How to know if model 1 or model 2 is more "real" or, for my lack of a better term, more useful and reflective of reality? We can focus on a particular philosophical point, like parsimony / Occam's razor, but as far as I can tell that isn't always sufficient. There should be some way to determine a model's likelihood of structure beyond "trust me, it works!" If there is, I'm trying to understand it!
- nyssos 3y ago> How to know if model 1 or model 2 is more "real" or, for lack of a better term, more useful and reflective of reality? You don't. Given observational data alone, it's typically only possible to determine which d-separation equivalence class you're in. Identifying the exact causal structure requires intervening experimentally. > There should be some way to determine a model's likelihood of structure Why? If the information isn't there, it isn't there. No technique can change that.
- paulpauper 3y agoIt's not that hard. if the causality cannot make sense logically or plausibly, then you can reasonably reject it . no reasonable person would ever get the umbrella puddles thing confused.
- nyssos 3y ago> It's not that hard. if the causality cannot make sense logically or plausibly, then you can reasonably reject it . no reasonable person would ever get the umbrella puddles thing confused. It's an illustrative example, taking it literally is missing the point. The reason you know it doesn't make sense for umbrellas to cause rain is that you already have an applicable causal model. The situations where you need to do causal inference are exactly those where you don't, and can't just rely on "reasonableness" or "plausibility".
- jncfhnb 3y agoThis is not true. These causal methods generally require you to have a pre established framework for how the thing works. If you cannot supply additional variables that you, with your domain knowledge, know cover the confounding elements, it won’t do anything. it’s Mathematical soup for trying to normalize out the effects of other variables to see what remains and calling it “causal”.
- oldgradstudent 3y agoYou should open a epidemiological journal these days. Half the papers are either as bad as "umbrellas causes puddles" or obviously confounded with socio-economic status.
- mumblemumble 3y agoI would argue it's more a blind spot of big data, which tends to tacitly imply just doing correlational studies on data that happens to be laying around. Most data scientists work for companies that don't really want to pay for controlled experiments outside of maybe letting the UI team do A/B tests. Natural experiments can be hard to come by in a business setting. And all of the wild mathematical gyrations that econometricians and political scientists have developed to try to do causal inference from correlational data have a tendency not to be as popular in business because, outside of some special domains such as politics and consumer finance, it can be rather difficult to get away with dressing your emperor in math that nobody can understand instead of actual clothing.
- atrettel 3y agoExactly. This is the primary difference between observational and experimental studies (controlled experiments). Experimental studies control for the hypothesized mechanism as part of the experimental design, but observation studies do not or often cannot. Good data from controlled experiments is difficult, costly, and time-consuming to generate in general, and that often does not mesh with the notion of "big data". I think we are running into this problem more and more as we discover that our data sets really are superficial --- collections of a lot of data that is easy to collect rather than a representative sample of everything (especially in a controlled manner). Good data isn't cheap.
- civilized 3y agoContrasting frequentist statistics and causal inference, and saying the latter often goes beyond the former, makes for a bizarre opening. It's like saying apples have nutritional value, unlike soccer balls. It's like saying trigonometry often goes beyond the scope of calculus.
- mwexler 3y agoI 100% agree with this blind spot. Most data science coursework avoids the very thing making it a science: the explanation of what change causes what effect. I've been surprised that year after year, programs at so many "Schools of Data Science" keep gliding over this area, perhaps alluding to it in an early stats course if at all. It's an important part of validating that your data-driven output or decision is actually creating the change you hope for. So many fields either do poor experimentation or none at all, others are prevented from doing the usual "full unrestricted RCT": med and fin svcs and other regulated industries have legal constraints on what they can experiment with; in other cases, data privacy restricts the measures one can take. I've had many data folks throw up their hands if they can't do a full RCT, and instead look to pre-post with lots of methodological errors. You can guess how many of those projects end up. (No, not every change needs a full test, and some things are easy rollback. But think of how many others would have benefitted from some uncertainty reduction.) Sure, "LLM everything" and "just gbm it!" and "ok, just need a new feature table and I'm done!" are all important and fun parts of a data science day. But if I can't show that a data driven decision or output makes things better, then it's just noise. Causal modeling gets us there. It improves the impact of ml models that recognize the power of causal interventions, and it gives us evidence that we are helping (or harming). It's (IMO) necessary, but of course, not sufficient. Lots of other great things are done by ML eng and data scientists and data eng and the rest, having nothing to do with casual inference... But I keep thinking how much better things get when we apply a causal lens to our work. (And next on my list would be having more data folks understanding slowly changing dimension tables, but this can wait for another time).
- rcthompson 3y agoI realize this is nitpicking a minor point in your comment, but I don't agree with your characterization of RCTs in medical research as being primarily constrained by laws and regulations. Any time I've discussed research on human subjects with doctors doing that research, the discussion of what is and is not an acceptable experiment has always been primarily driven by the risks of harm to the people involved in the study. Any time the law comes up, it's usually because the law requires an RCT in a specific setting, as opposed to preventing it (e.g. drug trials). (Of course in the setting of starting a company based on some medical product, the situation may be quite different.) Biologists, if not data scientists, are used to considering indirect evidence for causality. It's why we sometimes accept studies performed in other organisms as evidence for biology in humans; it's why we sometimes accept research performed on post-mortem human tissue as being representative of the biology of living humans; to name but a few examples. A big part of a compelling high-impact biology (or bioinformatics) paper is often the innovative ways that one comes up to show causality when a direct RCT is not feasible, and papers are frequently rejected because they don't to the follow-up experiments required to show causality.
- mikpanko 3y agoAn important topic. Today most tech companies worship a/b experiments as the main way of being data-driven and bringing causality into decision-making. It deserves to be the gold standard. However, most experiments are usually expensive: they require investing in building the feature in question and then collecting data for 1-4 weeks before being certain of the effects (plus there are long-term ones to worry about). Some companies report that fewer than 50% of their experiments prove truly impactful (my experience as well). That’s why only a small number of business decisions are made using experiments today. Observational causal inference offers another approach, trading off full confidence in causality with speed and cost. It was pretty hard to run correctly so far, so it is not widely adopted. We are working on changing that with Motif Analytics and wrote a post with an in depth exploration of the problem: https://www.motifanalytics.com/blog/bringing-more-causality-to-analytics https://www.motifanalytics.com/blog/bringing-more-causality-... .
- g42gregory 3y agoIn Corporate and Medical data science fields, people begin to accept causal inference. It is difficult, as the subject is still in flux and under development. I am aware of three reputable causal inference frameworks: 1. Judea Pearl's framework, which dominates in CS and AI circles 2. Neyman-Rubin causal model: https://en.wikipedia.org/wiki/Rubin_causal_model https://en.wikipedia.org/wiki/Rubin_causal_model 3. Structural equation modelling: https://en.wikipedia.org/wiki/Structural_equation_modeling https://en.wikipedia.org/wiki/Structural_equation_modeling None of them would acknowledge each other, but I believe the underlying methodology is the same/similar. :-) It's good to see that it is becoming more accepted, especially in Medicine, as it will give more, potentially life-saving, information to make decisions. In Social Sciences, on the other hand, causal inference is being completely willfully ignored. Why? Causal inference is an obstacle to making a preconceived conclusions based on pure correlations: something correlates with something, therefore ... invest large sums of money, change laws in our favor, etc... This works for both sides. Sadly, I don't think this could be fixed.
- bigfudge 3y agoPearl’s framework isn’t really distinct from SEM as I understanding it. SEM is really just one tool to achieve the sort of adjustments that Pearl describes to make causal inferences from observational data.
- cubefox 3y ago> In Social Sciences, on the other hand, causal inference is being completely willfully ignored. This conflicts with what the article says: > Economists and social scientists were among the first to recognize the advantages of these emerging causal inference techniques and incorporated in their research.
- huitzitziltzin 3y ago> In Social Sciences, on the other hand, causal inference is being completely willfully ignored. Why? Causal inference is an obstacle to making a preconceived conclusions based on pure correlations: something correlates with something, therefore ... invest large sums of money, change laws in our favor, etc... This works for both sides. Sadly, I don't think this could be fixed. This remark is totally ignorant of the reality in the social sciences. Certainly in economics (which I know well) this hasn't described the reality of empirical work for more than 30 years. Political Science and Sociology are increasingly concerned with causal methods as well. Medicine on the other hand is the opposite. Medical journals generally publish correlations when they aren't publishing experiments.
- mbowcut2 3y agoFor what it’s worth, my undergraduate was in Economics with an emphasis in econometrics and this article touched on probably 80% of the curriculum. The only problem is by the time I graduated I was somewhat disillusioned with most causal inference methods. It takes a perfect storm natural experiment to get any good results. Plus every 5 years a paper comes out that refutes all previous papers that use whatever method was in vogue at the time. This article makes me want to get back into this type of thinking though. It’s refreshing after years of reading hand-wavy deep learning papers where SOTA is king and most theoretical thinking seems to occur post hoc, the day of the submission deadline.
- gridland 3y agojust use propensity scores + ipw and you have the same thing as a rct. :)
- hackernewds 3y agonot necessarily unless you skim over meaningful confounding factors :)
- mmmmpancakes 3y agoFrom my experience propensity scores + ipw really doesn't get you far in practice. Propensity scoring models rarely balance all the covariates well (more often, one or two are marginally better and some may be worse than before). On top of that, IPW either assumes you don't have any cases of extreme imbalance, or, if you do you end up trimming weights to avoid adding additional variance, but in some cases you do even with trimmed weights..
- mmmmpancakes 3y agoYeah, the only common theme I see in causal inference research is that every method and analysis eventually succumbs to a more thorough analysis that uncovers serious issues in the assumptions. Take for instance the running example of catholic schoolings effect on test scores used by the boook Counterfactuals and Causal Inference. Subsequent chapter re-treat this example with increasingly sophisticated techniques and more complex assumptions about causal mechanisms, and each time they uncover a flaw in the analysis using techniques from previous chapters. My lesson from this: outcomes causal inference is very dependent on assumptions and methodologies, of which the options are many. This is a great setting for publishing new research, but its the opposite of what you want in an industry setting where the bias is/should be towards methods that are relatively quick to test and validate and put in production. I see researchers in large tech companies pushing for causal methodologies, but I'm not convinced they're doing anything particularly useful since I have yet to see convincing validation on production data of their methods that show they're better than simpler alternatives which will tend to be more robust.
- tmoertel 3y agoInterestingly, recent research suggest that you can make better decisions by combining experimental and observational data than by using either alone: https://ftp.cs.ucla.edu/pub/stat_ser/r513.pdf https://ftp.cs.ucla.edu/pub/stat_ser/r513.pdf > Abstract: Personalized decision making targets the behavior of a specific individual, while population-based decision making concerns a sub-population resembling that individual. This paper clarifies the distinction between the two and explains why the former leads to more informed decisions. We further show that by combining experimental and observational studies we can obtain valuable information about individual behavior and, consequently, improve decisions over those obtained from experimental studies alone.
- shahbazac 3y agoI’ve tried to understand causal inference several times and failed. Tutorials seem unnecessarily long winded. I wish authors would give simple, to the point examples. Say I have a simple table of outdoor temperatures and ice cream sales. What can the machinery of causal inference do for me in this situation? If it doesn’t apply here, what do I need to add to my dataset to make it appropriate for causal inference? More columns of data? Explicit assumptions? If I can use causal inference, what can it tell me? If I think of it as a function CA(data), can it tell me if the relationship is actually causal? Can it tell me the direction of the relationship? If there were more columns, could it return a graph of causal relationships and their strength? Or do I need to provide that graph to this function? I know a wet pavement can be caused by rain or spilled water or that an alarm can go off due to an earthquake or a burglary. I have common sense. I also understand the basics of graph traversal from comp sci classes. How do I practically use causal inference? To the authors of future articles on this (or any technical tutorial), please explain the essence, the easy path, then the caveats and corner cases. Only then will abstract philosophizing make sense.
- JHonaker 3y ago> Say I have a simple table of outdoor temperatures and ice cream sales. You have more than that! You have knowledge about the world! > What can the machinery of causal inference do for me in this situation? Well, (I’m being purposefully pedantic here) you haven’t really asked a question yet. The first thing it can do is help you while you’re formulating one. It can answer questions like, “how can I anticipate how things I have and havent measured will the estimates I’m interested in/making?” > If it doesn’t apply here, what do I need to add to my dataset to make it appropriate for causal inference? More columns of data? Explicit assumptions? The first thing you need to do is articulate what you’re actually interested in. Then you need to be explicit about the causal relationships between things relevant to those questions. The big thing (to me) is that particular causal structures have testable conditional independence structures and by assessing these, you can build evidence for or against particular diagrams of the context.
- tuukkah 3y agoTL;DR: Causal inference is a complex topic, not a simple tool. How's the ice cream example better than the sugary snacks example given in the article? Here's the part about needing to add more columns to the data: > When dealing with a causal question, it’s crucial to include variables known as confounders. These are variables that can influence both the treatment and the outcome. By including confounding variables, we can better isolate and estimate the true causal effect of the treatment. Failing to add or account for confounding variables may lead to incorrect estimates.
- deleted 3y ago[deleted]
- pocketsand 3y agoOne gripe with this article—-regression coefficient doesn’t provide ATE under most circumstances using observational data.
- tqi 3y agoI think in practice most of these techniques are useless (or worse, confer a false sense of precision) because they require so many nuanced judgement calls that they become little more than a way to launder biases.
- spywaregorilla 3y ago> The DoubleML method is founded on machine learning modeling and consists of two key steps. First, we build a model that predicts the treatment variable based on the input variables . Then, we create a separate model that predicts the outcome variable using the same set of input variables . Subsequently, we calculate the residuals from the former model and regress them against the residuals from the latter model. An important feature of this method is its flexibility in accommodating non-linear models, which allows us to capture non-linear relationships — a distinctive advantage of this approach. Just... don't do this. You're not going to be able to math your way to better conclusions. Make your model, make your plots, and use critical thinking to evaluate your results.
- morelandjs 3y agoNot sure what point you are trying to make here. Double ML is a valid approach for debiasing confounding effects.
- spywaregorilla 3y agoI disagree. It's vulnerable to all sorts of mishaps. You're now having to worry about data leakage between your treatment group AND your target variable. Casual inference without experiment data is all just a mathematical exercise to make a one size fits all approach to identifying relationships. Yes, correlation has weaknesses. But the name "causal inference" is grossly misleading. It's "well if we assume X, Y, and Z then the effect which we have already assumed is causal is probably around this order of magnitude". And hey, maybe that will help you identify cases where a confounding variable is actually the thing that matters. But you're not going to do better than just doing an analysis on the variables and their interactions. You don't have the brainpower to do this at a scale larger than pretty much all causal methods will begin to fail. It does not offer you the legitimacy the name implies. I think it confuses far more than it helps.
- felixleungsc 3y agoThe Atlantic/American Causal Inference Conference (ACIC) hosts a data challenge every year, I think. Useful to see many different methods compared on simulated data. Does anyone know similar challenges/competitions? ACIC links to years I could find: - 2016: https://arxiv.org/abs/1707.02641 https://arxiv.org/abs/1707.02641 - 2017: https://arxiv.org/abs/1905.09515 https://arxiv.org/abs/1905.09515 - 2019: https://sites.google.com/view/acic2019datachallenge/data-challenge https://sites.google.com/view/acic2019datachallenge/data-cha... - 2022: https://acic2022.mathematica.org/results https://acic2022.mathematica.org/results - 2023: https://sci-info.org/data-competition/ https://sci-info.org/data-competition/
- Acsmaggart 3y agoA co-worker pointed me to this e-book, which I thought did a great job of presenting he concepts in a relatable and applied way: https://matheusfacure.github.io/python-causality-handbook/landing-page.html https://matheusfacure.github.io/python-causality-handbook/la... But I agree with other comments here, at the end of the day it seems like causal analysis often boils down to whether you trust the analyst and/or their techniques since it is hard to validate the results.
- gordon_freeman 3y agoThere is an excellent video on YouTube by MIT Prof Sontag on Casual Inference worth checking out [1] And if you like it, 2nd part is here [2] [1] https://youtu.be/gRkUhg9Wb-I?si=6oMUgdjia_4g6-DR https://youtu.be/gRkUhg9Wb-I?si=6oMUgdjia_4g6-DR [2] https://www.youtube.com/watch?v=g5v-NvNoJQQ https://www.youtube.com/watch?v=g5v-NvNoJQQ
- loa_observer 3y agoWe built some causal discovery and inference features with graph visualization in Kanaries RATH: https://docs.kanaries.net/rath/discover-causals/causal-analysis https://docs.kanaries.net/rath/discover-causals/causal-analy... It's also open-sourced. Welcome to have a try.
- lincpa 3y ago[dead]