How AI is Transforming Threat Detection