IP Library Granted Patent US 12694263
Granted Patent B2
US 12694263 · App. 17/936,347 · Granted Jul 28, 2026

Modelling causation in machine learning

Inventors: Wenbo Gong (Cambridge, GB); Cheng Zhang (Cambridge, GB); Nick Pawlowski (Cambridge, GB); Joel Jennings (Cambridge, GB); Karen Fassio (Bremerton, WA); Marife Defante (Woodinville, WA); Steve Thomas (Redmond, WA); Alice Horan (Redmond, WA); Chao Ma (Cambridge, GB); Matthew Ashman (Cambridge, GB); Agrin Hilmkil (Stockholm, SE)
Assignee: Microsoft Technology Licensing, LLC
G06N3/04G06N3/0455G06N3/084G06N7/01G16H20/00G16H50/20
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12694263
App. No.
17/936,347
Granted
Jul 28, 2026
Kind
B2
Abstract

A method comprising: sampling a temporal causal graph from a temporal graph distribution specifying probabilities of directed causal edges between different variables of a feature vector at a present time step, and from one variable at a preceding time step to another variables at the present time step. Based on this there are identified: a present parent which is a cause of the selected variable in the present time step, and a preceding parent which is a cause of the selected variable from the preceding time step. The method then comprises: inputting a value of each identified present and preceding parent into a respective encoder, resulting in a respective embedding of each of the present and preceding parents; combining the embeddings of the present and preceding parents, resulting in a combined embedding; inputting the combined embedding into a decoder, resulting in a reconstructed value of the selected variable.

Claims (86)

1 . A computer-implemented method comprising:

selecting a variable from among variables of a feature vector;

sampling a temporal causal graph from a temporal graph distribution, the temporal graph distribution specifying probabilities of directed causal edges between different ones of the variables of the feature vector at a present time step, and from one of the variables of the feature vector at a preceding time step to one of the variables of the feature vector at the present time step;

from among the variables of the feature vector, identifying a present parent which is a cause of the selected variable in the present time step according to the temporal causal graph, and identifying a preceding parent which is a cause of the selected variable from the preceding time step according to the temporal causal graph;

inputting input values of the present parent and the preceding parent into a respective encoder of a machine learning model, resulting in embeddings of the present and preceding parents;

combining the embeddings of the present parent and the preceding parent, resulting in a combined embedding;

inputting the combined embedding into a decoder associated with the selected variable, resulting in a reconstructed value of the selected variable, the machine learning model including the decoder;

setting input values of a plurality of intervened-on variables of the feature vector, other than the selected variable, to respective specified values;

estimating an effect of the plurality of intervened-on variables on the selected variable based on the reconstructed value of the selected variable;

determining a reconstruction loss based on the effect of the plurality of intervened-on variables on the selected variable; and

updating parameters of the encoder and the decoder of the machine learning model based on the reconstruction loss.

2 . The method of claim 1 , wherein the machine learning model is a trained machine learning model, the method further comprising:

receiving a request to estimate an effect of the selected variable, the request including the input values of the plurality of intervened-on variables.

3 . The method of claim 2 , further comprising:

controlling the machine learning model to generate samples of the selected variable based on the input values of the plurality of intervened-on variables.

4 . The method of claim 1 , wherein each variable models a treatment on a real-world entity or an environment thereof and an effect of the treatment applied to the real-world entity, and the method further comprises actioning the treatment on the real-world entity based on the estimated effect of the treatment.

5 . The method of claim 4 , wherein one of:

the real-world entity comprises a living being, and the treatment comprises a medical treatment to the living being or an environment thereof;

the real-world entity comprises a mechanical, electrical or electronic device or system, or an environment thereof, and the treatment comprises an act of maintaining, debugging, upgrading or controlling the device or system, or controlling the environment thereof, or

the real-world entity comprises a network or software, and the treatment comprises an act of controlling the network or software.

6 . The method of claim 1 , wherein the feature vector represents sensor measurements collected from a physical system, wherein the updated parameters of the encoder and the decoder of the machine learning model are used to control operations of the physical system.

7 . The method of claim 1 , wherein:

setting the input values comprises repeating the selecting, the sampling, the identifying, the inputting the input values, the combining, and the inputting the combined embedding over multiple rounds, each using the same selected variable and setting the intervened-on variable to the same specified value, and performing the sampling of the temporal causal graph afresh in each round, thereby resulting in a respective reconstructed value of the selected variable from each round; and

estimating the effect comprises determining an average treatment effect of the plurality of intervened-on variables on the selected variable averaged over the multiple rounds.

8 . The method of claim 7 , wherein each round further comprises:

generating a history dependent noise term based on the embeddings of the preceding parents; and

combining the history dependent noise term with the reconstructed value of the selected variable, resulting in a simulated value of the reconstructed variable;

wherein said estimating based on the reconstructed values comprises: estimating the effect of the plurality of intervened-on variables on the selected variable based on the simulated values.

9 . The method of claim 8 , wherein the generating of the history dependent noise term comprises:

combining the embeddings of the preceding parents, resulting in a further embedding;

inputting the further embedding into the decoder associated with the selected variable, resulting in one or more parameter values; and

generating the history dependent noise term based on the one or more parameter values.

10 . The method of claim 7 , wherein:

each round sets a plurality of intervened-on variables and/or observed variables of the feature vector to specified input values; and

each round comprises an interior loop of the inputting the input values, the combining, and the inputting the combined embedding repeated around multiple iterations with the same sampled graph but for incrementing values of the present time step with each iteration, wherein each but the last iteration comprises reconstructed or simulated values of one or more further variables of the feature vector, and feeding back the simulated or reconstructed values as the specified input values of the next iteration.

11 . The method of claim 1 , further comprising:

generating a history dependent noise term for the selected variable based on embeddings of the preceding parents; and

combining the history dependent noise term with the reconstructed value of the selected variable, resulting in a simulated value of the reconstructed variable.

12 . The method of claim 11 , wherein embeddings of the present parents are not used to generate the history dependent noise term for the selected variable.

13 . The method of claim 11 , wherein the generating of the history dependent noise term comprises:

combining the embeddings of the preceding parents, resulting in a further embedding;

inputting the further embedding into the decoder associated with the selected variable, resulting in one or more parameter values; and

generating the history dependent noise term based on the one or more parameter values.

14 . The method of claim 1 , wherein:

the sampling further comprises sampling a second causal graph from a second graph distribution, the second causal graph modelling presence of possible confounders, a confounder being an unobserved cause of both of two variables in the feature vector;

the identifying further comprises, from among the variables of the feature vector, identifying a parent variable which is a cause of the selected variable according to the temporal causal graph, and which together with the selected variable forms a confounded pair having a respective confounder being a cause of both according to the second causal graph;

the inputting the input values further comprises inputting the input value of the parent variable and an input value of the selected variable into an inference network, resulting in a latent value modelling the respective confounder of the confounded pair, and inputting the latent value into a second encoder, resulting in an embedding of the confounder of the confounded pair; and

the combining includes combining the embeddings of the present and preceding parents with the embedding of the confounder of the confounded pair, thereby resulting in said combined embedding.

15 . The method of claim 1 , comprising:

for a given training data point comprising a given combination of input values of the variables of the feature vector at the present time step and each preceding time step, repeating the selecting, the sampling, the identifying, the inputting the input values, the combining, and the inputting the combined embedding over multiple selections, each selection selecting a different one of the variables of the feature vector as the selected variable thereby resulting in a respective reconstructed value, the multiple selections together thereby resulting in a reconstructed version of the training data point comprising the reconstructed values for the training data point;

evaluating a measure of difference between the training data point and the reconstructed version; and

training model parameters of the encoders, decoders, and temporal graph distributions, based on the evaluated measure.

16 . The method of claim 15 , comprising repeating the repeating, the evaluating, and the training over multiple input data points, each comprising a different combination of input values of the variables of the feature vector.

17 . The method of claim 15 , wherein:

each selection in the repeating further comprises a history dependent noise model generating a respective history dependent noise term based on embeddings of the preceding parents;

wherein the training further comprises training model parameters of the history dependent noise model based on the evaluated measure.

18 . The method of claim 17 , wherein in each selection in the repeating, the generating of the history dependent noise term by the history dependent noise model comprises:

combining the embeddings of the preceding parents, resulting in a respective further embedding;

inputting the respective further embedding into the decoder associated with the selected variable, resulting in one or more parameter values; and

generating the respective history dependent noise term based on the one or more parameter values.

19 . A system comprising:

processing apparatus comprising one or more processors; and

memory comprising one or more memory units, wherein the memory stores:

a machine learning model comprising a plurality of encoders and a plurality of decoders, and

code arranged to run on the processing apparatus and being configured so as when run to perform a method comprising:

selecting a variable from among variables of a feature vector;

sampling a temporal causal graph from a temporal graph distribution, the temporal graph distribution specifying probabilities of directed causal edges between different ones of the variables of the feature vector at a present time step, and probabilities of causal edges existing from each of a plurality of variables of the feature vector at one or more preceding time steps to one or more variables of the feature vector at the present time step;

from among the variables of the feature vector, identifying a present parent which is a cause of the selected variable in the present time step according to the sampled temporal causal graph, and identifying a preceding parent which is a cause of the selected variable from any preceding time step according to the sampled temporal causal graph;

inputting input values of the present parent and the preceding parent into a respective one of the encoders of the machine learning model, resulting in a respective embedding of the present and preceding parents;

combining the embeddings of the present and preceding parents, resulting in a combined embedding;

inputting the combined embedding into a respective one of the decoders associated with the selected variable, resulting in a reconstructed value of the selected variable, the machine learning model including the decoder;

setting input values of a plurality of intervened-on variables of the feature vector, other than the selected variable, to respective specified values;

estimating an effect of the plurality of intervened-on variables on the selected variable based on the reconstructed value of the selected variable;

determining a reconstruction loss based on the effect of the plurality of intervened-on variables on the selected variable; and

updating parameters of the encoders and the decoders of the machine learning model based on the reconstruction loss.

20 . A computer program embodied on non-transitory computer-readable storage, wherein the computer program comprises instructions configured so as when run on one or more processors to perform a method comprising:

selecting a variable from among variables of a feature vector;

sampling a temporal causal graph from a temporal graph distribution, the temporal graph distribution specifying probabilities of directed causal edges between different ones of the variables of the feature vector at a present time step, and probabilities of causal edges existing from each of a plurality of variables of the feature vector at one or more preceding time steps to one or more variables of the feature vector at the present time step;

from among the variables of the feature vector, identifying a present parent which is a cause of the selected variable in the present time step according to the sampled temporal causal graph, and identifying a preceding parent which is a cause of the selected variable from any preceding time step according to the sampled temporal causal graph;

inputting input values of the present parent and the preceding parent into a respective first encoder of a machine learning model, resulting in a respective embedding of the present and preceding parents;

combining the embeddings of the present and preceding parents, resulting in a combined embedding;

inputting the combined embedding into a decoder associated with the selected variable, resulting in a reconstructed value of the selected variable, the machine learning model including the decoder;

setting input values of a plurality of intervened-on variables of the feature vector, other than the selected variable, to respective specified values;

estimating an effect of the plurality of intervened-on variables on the selected variable based on the reconstructed value of the selected variable;

determining a reconstruction loss based on the effect of the plurality of intervened-on variables on the selected variable; and

updating parameters of the encoders and the decoders of the machine learning model based on the reconstruction loss.