Robust and scalable deep learning for cyber-physical systems