Amortized learning of neural causal representations