Potential Issue with get_sepset Function Failing to Identify Valid Separating Sets for Conditional Independence

Open
#198 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start with the get_sepset entry point and compare its result with the CIT and FCI runs described in the issue. Reproduce the AU06, AU12, AU14, AU15, and Reward example at significance level 0.05, then verify that the returned sepset agrees with the brute-force result [AU06, AU14, AU15].

Written by the indexing model from the issue text.

Description

Dear developers, thanks for this great library.

Package version:

0.1.3.8

Description

I am a newbie in the field. But I encountered a problem that led me to suspect there might be an issue with the get_sepset function. Specifically, it seems that the function may fail to identify valid sepsets that make two nodes conditionally independent in certain scenarios.

From my understanding, the current implementation appears to rely exclusively on path exploration to determine sepsets. This approach can lead to incorrect results when there are no direct or indirect paths between the nodes but conditional independence still exists for some sets.

Problem Details

Firstly, I tested the conditional independence where the separation set is empty using the CIT class. The resulting p-value between AU12 and Reward was 2.3553502981887853e-05, which means AU12 and Reward should be connected with an edge. This was indeed the case when I applied the FCI algorithm with a feature set including only AU12 and Reward. Then, I ran the FCI algorithm again with the features AU06, AU12, AU14, AU15, and Reward. The resulting graph, shown below, is as expected; conditioning on the other features might remove edges, as we know from the FCI algorithm's mechanism.

However, when I used the get_sepset method, it returned an empty set. Whereas the correct sepset should be [AU06, AU14, AU15] (or the nodes that correspond to them).

image

Note: I figured out the actual sepset using CIT class and brute forcing the sepsets. The results are shown below.
Note2: I run the FCI algorithm with significance level 0.05

Node1, Node2, sepset:

Reward AU12_r []
kci 2.3553502981887853e-05
Reward AU12_r [' AU14_r']
kci 0.00015905749617084464
Reward AU12_r [' AU15_r']
kci 1.685509670779073e-05
Reward AU12_r [' AU06_r']
kci 8.263130655117301e-05
Reward AU12_r [' AU14_r', ' AU15_r']
kci 0.0014881913935198554
Reward AU12_r [' AU14_r', ' AU06_r']
kci 0.0014911663188149626
Reward AU12_r [' AU15_r', ' AU06_r']
kci 0.003424638498105481
Reward AU12_r [' AU14_r', ' AU15_r', ' AU06_r']
kci 0.06554509205235681

Dominant language
Python
Stars
1.7k
Forks
274
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from py-why/causal-learn

All issues in py-why/causal-learn

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.