Algorithms that interpret human behavior give governments a fighting chance against increasingly sophisticated attacks that circumvent secure email gateways. These algorithms illustrate the potential of artificial intelligence and machine learning to turn the tide against attackers who use spear phishing and other advanced social engineering tactics to compromise government systems and data.