From atomically resolved imaging to generative and causal models