Aeration is an energy-intensive process of aerobic biological wastewater treatment. An accurate model of oxygen transfer dynamics in activated sludge tanks would improve design and operation of aeration systems. Such a model should consider spatial and diurnal variation of α-factor as well as site-specific conditions that impact oxygen transfer. For this dynamic prediction a machine learning approach was used for the first time. The data-driven method was based on long-term ex-situ off-gas measurements with pilot-scale reactors (5.8 m height, 8.3 m3 vol) coupled to full-scale activated sludge tanks on the sites of two conventional and a two-stage activated sludge treatment plant. The ex-situ off-gas method allowed to quantify theoretical off-gas parameters in non-aerated zones and thus consider the whole activated sludge tank. We introduced the α0-factor to compare aerated and non-aerated zones under nonsteady-state conditions. Like the established α-factor for steady-state conditions, the α0-factor describes oxygen transfer inhibiting effects in activated sludge. α0-factor was lowest in upstream denitrification zones. This indicates an anoxic elimination of oxygen transfer inhibiting wastewater contaminants which improved oxygen transfer in subsequent aerobic zones. Random Forest models predicted α0-factor reliably in all examined activated sludge tanks even for stormwater events and seasonal variation. Model development only required online sensor data already available to operators. Our results suggest that machine learning models can dynamically predict α-factors in a variety of activated sludge processes, thus considering site-specific conditions in model training without manual calibration.