Bridging statistical learning and formal reasoning for cyber attack detection