Correlation Tells You What Happened. KARMA Asks What To Do.

Most analytics answer the wrong question with great confidence. They tell you that two things moved together, draw a chart, and call it insight. The question a decision actually needs is different: if I do X, will Y happen? KARMA is my attempt at a platform that asks the second question properly, with causal graphs and counterfactual reasoning instead of bigger correlation dashboards.

The core is a causal graph builder with a visual drag-and-drop interface, backed by an inference engine in FastAPI. The engine uses DoWhy for causal identification and estimation, EconML for heterogeneous treatment effects, and PyTorch where learned models enter the discovery pipeline. The front end is SvelteKit with Cytoscape.js for the graphs and D3.js for the scenario comparisons.

The methods are named, not hand-waved

The engine is built on structural causal models and do-calculus, the formal machinery for reasoning about interventions. On top of that sit double machine learning for robust effect estimation, causal forests for effects that vary across subgroups, and propensity score matching for adjusting confounders. Each of these is a published method with known failure modes, and the README names them because a decision tool should say which assumptions it is making.

The API mirrors that structure: endpoints to create and validate graphs, endpoints to run counterfactuals and intervention effects, and a decision endpoint that compares scenarios side by side. A decision record keeps an audit trail, so a team can see later which assumptions produced which call.

Why build this

A/B tests are the gold standard and most teams cannot run them: too little traffic, too much time, or an intervention you cannot ethically randomise. Causal inference exists for exactly that gap. I do not think KARMA replaces experiments, and the project does not claim to. It gives a team the next best thing: an explicit model of cause and effect that can be challenged, versioned and audited, instead of a correlation nobody interrogated.

← back to the journal