Machine learning for security and security for machine learning