AI-based defense