Monitoring and understanding of water resources have become essential in designing effective and sustainable management strategies to overcome the growing water quality challenges. In this context, the utilization of unsupervised learning techniques for evaluating environmental tracers has facilitated the exploration of sources and dynamics of groundwater systems through pattern recognition. However, conventional techniques may overlook spatial and temporal non-linearities present in water research data. This paper introduces the adaptation of FlowSOM, a pioneering approach that combines self-organizing maps (SOM) and minimal spanning trees (MST), with the fast-greedy network clustering algorithm to unravel intricate relationships within multivariate water quality datasets. By capturing connections within the data, this ensemble tool enhances clustering and pattern recognition. Applied to the complex water quality context of the hyper-arid transboundary Caplina/Concordia coastal aquifer system (Peru/Chile), the FlowSOM network and clustering yielded compelling results in pattern recognition of the aquifer salinization. Analyzing 143 groundwater samples across eight variables, including major ions, the approach supports the identification of distinct clusters and connections between them. Three primary sources of salinization were identified: river percolation, slow lateral aquitard recharge, and seawater intrusion. The analysis demonstrated the superiority of FlowSOM clustering over traditional techniques in the case study, producing clusters that align more closely with the actual hydrogeochemical pattern. The outcomes broaden the utilization of multivariate analysis in water research, presenting a comprehensive approach to support the understanding of groundwater systems.