Abstract
Understanding the effects of active transport on mental well-being and the roles of social and environmental contexts is crucial for designing targeted interventions. It remains unclear whether working adults would gain mental health benefits if they had engaged in active commuting compared to motorized commuting, and if so, in which contexts and for whom these benefits are optimal. Existing studies typically examined general associations between commuting and mental health without considering counterfactual outcomes under different scenarios and contexts. They relied on traditional models inadequate for capturing treatment effects and their heterogeneities. This study proposes a causal machine learning (ML) framework to estimate average and heterogeneous treatment effects of active commuting, facilitating robust adjustment for confounding and selection bias. Using data from 145,547 UK adults aged 38 to 70 years, we assessed how transport modes influenced mental health, and how social and environmental conditions modified these effects. Individual heterogeneities were also examined to reveal spatial disparities. Results suggested that active commuting (walking or cycling) significantly reduced depression severity and risk, with stronger effects among younger adults and females. Longer weekly distance (10 to 30 miles) was associated with better mental health among active commuters and poorer outcomes among motorized commuters, though these associations were not statistically significant. Protective benefits were significantly greater in neighborhoods with more green space, farther from the nearest roads, and not close to major roads. Substantial spatial heterogeneities were observed, with stronger protective effects in less deprived and rural areas. Distinct rural-urban differences existed particularly in densely populated areas like Greater London. These findings underscore the importance of accounting for contextual variation when evaluating health effects of active transport and highlight the need for targeted urban and transportation policies that not only promote active commuting but also maximize its mental health benefits, especially for vulnerable groups and neighborhoods.</p>