Abstract The response of ocean salinity to surface freshwater fluxes exhibits complex spatial and temporal patterns, making it challenging to pinpoint where and when freshwater flux dominates salinity variability. This study uses Gaussian Mixture Modeling, an unsupervised machine learning technique, trained on the Estimating the Circulation and Climate of the Ocean version 4 ocean state estimate, to classify the spatial and temporal dynamics of upper ocean salinity. On monthly timescales, freshwater flux is the dominant driver of salinity variability in 11% of the global ocean. In an additional 35%, it remains the primary influence but is complemented by a substantial contribution from advection. At annual and longer timescales, the influence of freshwater flux diminishes in most regions but remains dominant in the polar regions, where a strong relationship between salinity and freshwater flux persists. These findings demonstrate how machine learning can uncover complex interactions between salinity and surface fluxes, providing a scalable framework to advance understanding of ocean‐climate interactions.