The increasing threat that cyberattacks pose to critical digital infrastructures requires the definition of methods that can reliably detect or prevent them in the face of their escalating complexity and frequency. In this thesis, we study a widespread type of cyberattack, namely network intrusion attacks, and provide a detailed exploration of existing machine learning-based systems designed for their detection, primarily focusing our study on recently proposed systems that provide high classification performance across multiple datasets. A common aspect of the studied methods is that they apply Graph Neural Networks (GNNs), which they frequently define to consider an explicit representation of the temporal aspects associated with the network data. The first contribution of this thesis is a description of potential limitations of the considered methods concerning their graph and temporal representations, which leads us to propose alternative formulations that aim to avoid those limitations. As a result, we introduce a novel architecture, namely Channel-Centric Spatio-Temporal Graph Networks (CCSTGN), which builds on the previously introduced alternative representations and is designed in order to allow its consideration in different applications of network analysis, thus not being restricted to network-intrusion detection. Another contribution of this thesis is the presentation of a comprehensive data preprocessing procedure, which identifies and builds up on other potential limitations of previous approaches. Lastly, we present a detailed experimental evaluation of our proposed CCSTGN architecture using different learning strategies, from which we conclude that our proposal is able to outperform multiple existing GNN-based methods according to various classification metrics and that the data preprocessing procedure is of significant importance for the performance of the models.