Skip to content

FedCSL: A Scalable and Accurate Approach to Federated Causal Structure Learning

Notifications You must be signed in to change notification settings

Xianjie-Guo/FedCSL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

FedCSL: A Scalable and Accurate Approach to Federated Causal Structure Learning

Usage

"FedCSL.m" is main function.
Note that the current code has only been debugged on Matlab (2018a) with a 64-bit Windows system and supports only discrete datasets.

function [CausalS, Time] = FedCSL(Datasets, Alpha)

  • INPUT:
Datasets: a cell array of datasets on all clients. Note that the sample size can be different for each dataset but the feature dimensions must be the same.
Alpha: the significant level, e.g., 0.01 or 0.05.
  • OUTPUT:
CausalS: the learned causal structure.
Time: the running time.

Example for discrete dataset

clear;
clc;
addpath(genpath('com_func/'));

graph_path='./dataset/Child_graph.txt';
data_path='./dataset/Child_5000samples.txt';

alpha=0.01; % the significant level.
client_num=5; % the number of clients.
ground_truth=load(graph_path);
data=importdata(data_path)+1;
[datasets] = split_dataset(data, client_num);
[dag,time]=FedCSL(datasets,alpha); % dag is the learned causal structure.

% evaluate the learned causal structure.
[fdr,tpr,fpr,SHD,reverse,miss,extra,undirected,ar_f1,ar_precision,ar_recall]=eva_DAG(ground_truth,dag);

Reference

  • Guo, Xianjie, et al. "FedCSL: A Scalable and Accurate Approach to Federated Causal Structure Learning." Proceedings of the 38th AAAI Conference on Artificial Intelligence (AAAI'24) (2024).

About

FedCSL: A Scalable and Accurate Approach to Federated Causal Structure Learning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages