BackgroundImproved knowledge of factors that influence treatment engagement could help treatment providers and systems better engage patients. The present study used machine learning to explore associations between individual- and neighborhood-level factors, and SUD treatment engagement. MethodsThis was a secondary analysis of the Global Appraisal of Individual Needs (GAIN) dataset and United States Census Bureau data utilizing random forest machine learning and generalized linear mixed modelling. Our sample (N = 15,873) included all people entering SUD treatment at GAIN sites from 2006 to 2012. Predictors included an array of demographic, psychosocial, treatment-specific, and clinical measures, as well as environment-level measures for the neighborhood in which patients received treatment. ResultsGreater odds of treatment engagement were predicted by adolescent age and psychiatric comorbidity, and at the neighborhood-level, by low unemployment and high population density. Lower odds of treatment engagement were predicted by Black/African American race, and at the neighborhood-level by high rate of public assistance and high income inequality. Regardless of the degree of treatment engagement, individuals receiving treatment in areas with high unemployment, alcohol sale outlet concentration, and poverty had greater substance use and related problems at baseline. Although these differences reduced with treatment and over time, disparities remained. ConclusionsNeighborhood-level factors appear to play an important role in SUD treatment engagement. Regardless of whether individuals engage with treatment, greater loading on social determinants of health such as unemployment, alcohol sale outlet density, and poverty in the therapeutic landscape are associated with worse SUD treatment outcomes.