Machine learning could be the long-term solution to surprise attacks.