Papers › Causal Diffusion Autoencoders: Toward Counterfactual Generation via Diffusion...

Causal Diffusion Autoencoders: Toward Counterfactual Generation via Diffusion Probabilistic Models

27 Apr 2024arXiv:2404.17735archive 2025-07-28

Aneesh Komanduri, Chen Zhao, Feng Chen, Xintao Wu

Diffusion probabilistic models (DPMs) have become the state-of-the-art in high-quality image generation. However, DPMs have an arbitrary noisy latent space with no interpretable or controllable semantics. Although there has been significant research effort to improve image sample quality, there is little work on representation-controlled generation using diffusion models. Specifically, causal modeling and controllable counterfactual generation using DPMs is an underexplored area. In this work, we propose CausalDiffAE, a diffusion-based causal representation learning framework to enable counterfactual generation according to a specified causal model. Our key idea is to use an encoder to extract high-level semantically meaningful causal variables from high-dimensional data and model stochastic variation using reverse diffusion. We propose a causal encoding mechanism that maps high-dimensional data to causally related latent factors and parameterize the causal mechanisms among latent factors using neural networks. To enforce the disentanglement of causal variables, we formulate a variational objective and leverage auxiliary label information in a prior to regularize the latent space. We propose a DDIM-based counterfactual generation procedure subject to do-interventions. Finally, to address the limited label supervision scenario, we also study the application of CausalDiffAE when a part of the training data is unlabeled, which also enables granular control over the strength of interventions in generating counterfactuals during inference. We empirically show that CausalDiffAE learns a disentangled latent space and is capable of generating high-quality counterfactual images.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2404.17735")

Code

Syntology Ran 9 of 17 code samples harvested from 1 repository linked to this paper; 8 have no recorded run. Of those that ran: 3 ran · honoured contract; 3 ran · our draft was wrong; 3 ran with no contract checked.

By repository: official repository: 17 samples from 1 repository, 9 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

akomand/causaldiffae officialmentioned in paperpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

17 samples harvested; 9 ran; 3 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · honoured contract
3ran · our draft was wrong
3ran
8unverified

Licence: 17 of the 17 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from akomand/causaldiffae. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

approx_standard_normal_cdf akomand/causaldiffae/improved_diffusion/losses.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · cfd76fd0d89574a4 · report
betas_for_alpha_bar akomand/causaldiffae/improved_diffusion/gaussian_diffusion.py official repository ran · honoured contract no licence file found · pointer only · 2ab2316ac6fdd869 · report
discretized_gaussian_log_likelihood akomand/causaldiffae/improved_diffusion/losses.py official repository ran · our draft was wrong no licence file found · pointer only · cd33283d615fb3d7 · report
generate_batch_factor_code akomand/causaldiffae/improved_diffusion/metrics.py official repository ran no licence file found · pointer only · d7a0d7dbfb3d9030 · report
get_named_beta_schedule akomand/causaldiffae/improved_diffusion/gaussian_diffusion.py official repository ran · honoured contract no licence file found · pointer only · a086d6286a40b889 · report
make_cost_matrix akomand/causaldiffae/improved_diffusion/munkres.py official repository ran · our draft was wrong no licence file found · pointer only · 60f32cea809132df · report
make_output_format akomand/causaldiffae/improved_diffusion/logger.py official repository ran no licence file found · pointer only · bcd8b4acab199405 · report
normal_kl akomand/causaldiffae/improved_diffusion/losses.py official repository ran · honoured contract fingerprinted no licence file found · pointer only · cf2798b666b231ca · report
scalable_disentanglement_score akomand/causaldiffae/improved_diffusion/metrics.py official repository ran no licence file found · pointer only · 025c959aa67550a3 · report
compute_irs akomand/causaldiffae/improved_diffusion/metrics.py official repository unverified no licence file found · pointer only · f84d16b0842b6f9f · report
get_dataloader akomand/causaldiffae/improved_diffusion/image_datasets.py official repository unverified no licence file found · pointer only · 448a946665385349 · report
get_dataloader_morphomnist akomand/causaldiffae/improved_diffusion/image_datasets.py official repository unverified no licence file found · pointer only · a9dc2b6b1c519a96 · report
load_morphomnist_like akomand/causaldiffae/improved_diffusion/image_datasets.py official repository unverified no licence file found · pointer only · 33ec6c2b7fffd713 · report
make_master_params akomand/causaldiffae/improved_diffusion/fp16_util.py official repository unverified no licence file found · pointer only · a863803cdd5f3ce6 · report
mpi_weighted_mean akomand/causaldiffae/improved_diffusion/logger.py official repository unverified no licence file found · pointer only · e515a67f7f32e76d · report
profile akomand/causaldiffae/improved_diffusion/logger.py official repository unverified no licence file found · pointer only · 0c6607473a4c4c55 · report
unflatten_master_params akomand/causaldiffae/improved_diffusion/fp16_util.py official repository unverified no licence file found · pointer only · 30e43bcf12d042b0 · report

Tasks

DisentanglementImage GenerationRepresentation Learning

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

CounterfactualsDiffusion

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections