AI-driven threat detection