Causal representation learning aims to discover robust features by exploiting the causal structure underlying data generation. Existing methods require specifying the causal structure a priori, yet different structures demand fundamentally incompatible invariance constraints, and misspecification leads to representations that discard predictive information. We introduce SaCRL, a framework that jointly identifies the causal structure and learns the corresponding invariant representation without prior structural knowledge. Our approach formulates structure selection as a soft optimization over candidate invariances using HSIC-based violation metrics, with adaptive weights that automatically concentrate on the achievable structure. We provide theoretical guarantees for structure identification, including under random-feature approximation, invariance satisfaction, and out-of-distribution generalization. Empirically, SaCRL recovers the true structure on synthetic and semi-synthetic Bayesian-network benchmarks, outperforms fixed-invariance baselines on Colored MNIST, achieves state-of-the-art accuracy on three DomainBed benchmarks (PACS, VLCS, OfficeHome), and degrades gracefully under structural misspecification and limited environment diversity. Code is available at: https://github.com/ArmanBehnam/sacrl.
Figures & tables
Figure 1 : Clinical toy example.
Figure 2
True Structure
n=500
n=1000
n=2000
n=5000
G1 (anti-causal)
73.5 (2.8)
85.0 (2.1)
92.5 (1.4)
96.5 (0.9)
G2 (conf-desc)
68.0 (3.2)
81.5 (2.5)
89.0 (1.8)
95.0 (1.1)
G3 (conf-out)
78.5 (2.4)
88.5 (1.9)
94.0 (1.2)
97.5 (0.7)
Table 1 : Structure identification accuracy (%) across sample sizes and true structures. Results averaged over 20 random seeds. Standard deviations in parentheses.
Benchmark
Network (nodes)
Y
True
Violation
ID acc. (%)
Margin
asia_g3
ASIA (8)
either
G3
56.3
95.0 (19/20)
0.45
asia_g2
ASIA (8)
either
G2
24.6
90.0 (18/20)
0.42
alarm_co
ALARM (37)
CO
G3
28.3
85.0 (17/20)
0.35
sachs_g2
SACHS (11)
Akt
G2
6.4
85.0 (17/20)
0.25
alarm_g2
ALARM (37)
EXPCO2
G2
4.2
75.0 (15/20)
0.18
Table 2 : Semi-synthetic Bayesian-network benchmarks. Violation: the competing invariance’s violation before training, measured in standard deviations of the permutation null. Margin: α(1)−α(2) .
Method
OOD Acc (%)
ID. Stru.
ERM
27.2 ± 11.3
—
IRM
21.3 ± 13.2
G2 (fixed)
VREx
24.3 ± 12.8
—
CIRCE
10.3 ± 0.5
G1 (fixed)
SaCRL
45.2 ± 10.0
G1 (92%)
Table 3: Colored MNIST OOD Acc. on anti-correlated test environment.
Held-out
α1
α2
α3
k^
Margin
p
Seeds
Cal. acc. (%)
Photo
0.21
0.68
0.11
G2
0.47
0.008
5/5
86.1
Art Painting
0.59
0.31
0.10
G1
0.28
0.021
5/5
65.0
Cartoon
0.35
0.52
0.13
G2
0.17
0.037
4/5
65.0
Sketch
0.63
0.25
0.12
G1
0.38
0.014
5/5
86.1
Table 4 : Structure selected on PACS; each row trains on the other three domains (5 seeds). Margin: α(1)−α(2) ; p : permutation p -value of minkVk ; Seeds: agreement of k^ across seeds; Cal. acc.: identification accuracy of synthetic runs in the same margin bin (Appendix H.5 ).
PACS
VLCS
OfficeHome
Method
Photo
Art
Cartoon
Sketch
Avg
Caltech
LabelMe
SUN09
VOC
Avg
Art
Clipart
Product
Real
Avg
ERM
93.2
66.0
51.8
37.6
62.2
94.0
60.2
69.9
73.0
74.3
49.9
41.7
66.7
67.7
56.5
IRM
93.2
66.2
51.7
37.6
62.2
95.0
60.1
70.1
72.6
74.5
49.0
41.2
66.5
67.7
56.1
VREx
93.0
65.5
51.6
37.9
62.0
93.3
60.2
69.8
71.0
73.6
48.6
41.2
66.2
67.6
55.9
CIRCE
92.5
64.5
51.4
37.3
61.4
93.8
60.0
67.7
69.7
72.8
49.0
41.9
66.0
67.4
56.1
SaCRL
94.0
68.5
54.0
40.5
64.3
97.7
64.4
75.7
77.1
78.7
52.9
46.5
69.1
69.8
59.6
Table 5: Results on DomainBed benchmarks: average leave-one-domain-out OOD accuracy (%).
Setting
ERM
IRM
VREx
CIRCE
SaCRL
ID. Stru.
Misspecification ( δmin=1.0 ):
ν=0.25 (near-causal)
34.4 ± 2.7
—
—
—
50.2 ± 3.7
G2 (4/5)
ν=0.50 (bidirectional)
61.2 ± 3.8
61.3 ± 4.2
61.4 ± 4.4
66.5 ± 2.6
73.9 ± 4.1
G2 (5/5)
ν=0.75 (near-anticausal)
98.5 ± 0.6
—
—
—
99.6 ± 0.3
G1 (4/5)
Limited diversity ( ν=0.50 ):
δmin=1.0 (full)
61.2 ± 3.8
61.3 ± 4.2
61.4 ± 4.4
66.5 ± 2.6
73.9 ± 4.1
G2 (5/5)
Table 6 : Robustness under misspecification ( ν ) and limited diversity ( δmin ). OOD accuracy (%) over 5 seeds. ID. Stru.: majority structure (seeds agreeing).