Benchmarking electricity consumption of wastewater treatment plants (WWTPs) is fundamental for sustainable wastewater management, as these facilities have a concomitant electricity-intensive nature along with their pollutant removal and resource recovery functions. Due to the challenge of characterizing influent water quality using traditional methods, satisfactory benchmarks have long been elusive. To overcome the complexity of wastewater compositions, an unsupervised machine learning algorithm, spectral clustering, is introduced to analyze 2,576 WWTPs across China, effectively characterizing influent quality as a single variable and contributing to robust benchmarks with 75 % of the fittings achieving coefficients of determination (R