Using Graph Theory for Improving Machine Learning-based Detection of Cyber Attacks