Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement complete adjustment criterion that generalizes backdoor #402

Open
amit-sharma opened this issue Apr 4, 2022 · 8 comments
Open
Labels
good first issue Good for newcomers

Comments

@amit-sharma
Copy link
Member

Adjustment Criterion by Shpitser (here, Definition 5)

This criterion generalizes the backdoor criterion. @gianlucadetommaso

@adam2392
Copy link
Contributor

adam2392 commented Jan 26, 2023

Leaving this here as a note since I've been reading this paper a lot:

As an option, we can also just implement the following: https://auai.org/uai2015/proceedings/papers/155.pdf and https://www.jmlr.org/papers/volume18/16-319/16-319.pdf, which is a complete adjustment criterion for all common causal graphs: DAG, ADMG, CPDAG, MAG, PAG.

This would need to use functions in upstream pywhy-graphs:

  1. visibility (not currently implemented): determine in a graph whether or not a given edge is visible. There are existing graphical algorithms for determining this based on discriminating paths. (discriminating paths is also implemented within pywhy-graphs).
  2. (possible)-descendants of a node
  3. generator for m-separating sets from Van Zander 2015 (not implemented): given an ancestral graph (CPDAG/MAG/PAG), generate in polynomial-delay time separators and adjustment sets (see adjustmentSets in dagitty R package)

Combining these 3 functionalities, one can then implement the complete generalized adjustment algorithm. Happy to help if anyone becomes interested.

Reference:
[1]_ Benito van der Zander, Maciej Liśkiewicz, and Johannes Textor. Constructing separators and adjustment sets in ancestral graphs. In Proceedings of UAI 2014, pages 907–916, 2014.

@amit-sharma
Copy link
Member Author

thanks for sharing @adam2392 This is great since it will work for multiple types of graphs. Clearly an improvement over the current implementation!

If anyone would like to contribute, let us know in the comments below.

@aryan26roy
Copy link

@adam2392 @amit-sharma I would love to contribute to this PR. Anything that I can get started on?

@adam2392
Copy link
Contributor

Perhaps a good plan of action is:

  1. Implement a few unit tests that will return adjustable vs not?
  2. Perhaps then implement the sketch of the algorithm in dowhy
  3. Patch any necessary graph search algorithms into pywhy-graphs
  4. Implement a short example in the docs demonstrating usage
  5. Merge PR and have pywhy-graphs be an optional dependency.

I can of course work with you on various parts @aryan26roy

Wdyt @amit-sharma?

@amit-sharma
Copy link
Member Author

Agree, that sounds like a plan! Thanks Adam.

@aryan26roy you can work with @adam2392 to get started on this

@aryan26roy
Copy link

Sounds good to me @adam2392 @amit-sharma.

@adam2392
Copy link
Contributor

XRef: #1148

@nparent1
Copy link
Contributor

Hey all @adam2392 @aryan26roy and @amit-sharma

Seems like this work is still ongoing, can I help out?

From what I can tell, we want to keep the pywhy-graphs dependency as optional, so we may want dowhy to support the general adjustment criterion natively for DAGs, and then the optional pywhy-graphs dependency will unlock the criterion for the various other graphs.

I've opened a PR to dowhy (#1292) which will add support for the general adjustment criterion for DAGs, using the method laid out in section 4.1 of van der Zander et al's "Constructing separators and adjustment sets in ancestral graphs".

The PR roughly adds the following

  • A new field to the IdentifiedEstimand class to store general adjustment sets (given how ubiquitous the backdoor criterion is I left the backdoor fields alone and created new fields for these general sets)
  • Support in the auto_identifier.py file's identify_ate_effect() method to compute a general adjustment set to return in an IdentifiedEstimand object
    • Finding the adjustment set is all handled in a new identify_generalized_adjustment_set() method
  • Refactoring to share various utility functions between the backdoor adjustment sets and the general adjustment sets
  • Unit tests to test a few cases of the generalized adjustment criterion (specifically cases where the backdoor criterion is not met)

It should plug in nicely with the pywhy-graphs work as we could just use those methods directly in the new identify_generalized_adjustment_set() method

Does this seem reasonable? If so, can somebody review the PR? Once this is merged in then I'd also be happy to help out on the pywhy-graphs front

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants