Skip to main content

Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

  • Article
  • Published:

Clinical Research

Uncovering key factors in weight loss effectiveness through machine learning

Abstract

Background/Objectives

One of the main challenges in weight loss is the dramatic interindividual variability in response to treatment. We aim to systematically identify factors relevant to weight loss effectiveness using machine learning (ML).

Subjects/Methods

We studied 1810 participants in the ONTIME program, which is based on cognitive-behavioral therapy for obesity (CBT-OB). We assessed 138 variables representing participants’ characteristics, clinical history, metabolic status, dietary intake, physical activity, sleep habits, chronotype, emotional eating, and social and environmental barriers to losing weight. We used XGBoost (extreme gradient boosting) to predict treatment response and SHAP (SHapley Additive exPlanations) to identify the most relevant factors for weight loss effectiveness.

Results

The total weight loss was 8.45% of the initial weight, the rate of weight loss was 543 g/wk., and attrition was 33%. Treatment duration (mean ± SD: 14.33 ± 8.61 weeks) and initial BMI (28.9 ± 3.33) were crucial factors for all three outcomes. The lack of motivation emerged as the most significant barrier to total weight loss and also influenced the rate of weight loss and attrition. Participants who maintained their motivation lost 1.4% more of their initial body weight than those who lost motivation during treatment (P < 0.0001). The second and third critical factors for decreased total weight loss were lower “self-monitoring” and “eating habits during treatment” (particularly higher snacking). Higher physical activity was a key variable for the greater rate of weight loss.

Conclusions

Machine learning analysis revealed key modifiable lifestyle factors during treatment, highlighting avenues for targeted interventions in future weight loss programs. Specifically, interventions should prioritize strategies to sustain motivation, address snacking behaviors, and enhance self-monitoring techniques. Further research is warranted to evaluate the efficacy of these strategies in improving weight loss outcomes.

Trial registration

clinicaltrials.gov: NCT02829619.

This is a preview of subscription content, access via your institution

Access options

Buy this article

Prices may be subject to local taxes which are calculated during checkout

Fig. 1: Participant selection and data processing overview.
Fig. 2: SHAP (Shapley Additive exPlanations) feature Importance for the control variables and the modifiable variables in total weight loss, attrition, and rate of weight loss prediction.
Fig. 3: Multivariate patterns of barriers for predicting attrition, weight loss (%), and rate of weight loss.
Fig. 4: Differences in weight loss effectiveness and main barriers in weight loss.

Similar content being viewed by others

Data availability

Data sets generated during the current study are available from the corresponding authors upon reasonable request.

References

  1. Yang HW, Garaulet M, Li P, Bandin C, Lin C, Lo MT, et al. Daily rhythm of fractal cardiac dynamics links to weight loss resistance: interaction with CLOCK 3111T/C genetic variant. Nutrients. 2021;13:2463.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  2. Schutz Y, Montani JP, Dulloo AG. Low-carbohydrate ketogenic diets in body weight control: a recurrent plaguing issue of fad diets? Obes Rev. 2021;22:e13195.

    Article  PubMed  Google Scholar 

  3. Ostendorf DM, Blankenship JM, Grau L, Arbet J, Mitchell NS, Creasy SA, et al. Predictors of long-term weight loss trajectories during a behavioral weight loss intervention: An exploratory analysis. Obes Sci Pr. 2021;7:569–82.

    Article  Google Scholar 

  4. Dashti HS, Scheer F, Saxena R, Garaulet M. Impact of polygenic score for BMI on weight loss effectiveness and genome-wide association analysis. Int J Obes (Lond). 2024;48:694–701.

    Article  CAS  PubMed  Google Scholar 

  5. Hall KD, Sacks G, Chandramohan D, Chow CC, Wang YC, Gortmaker SL, et al. Quantification of the effect of energy imbalance on bodyweight. Lancet. 2011;378:826–37.

    Article  PubMed  Google Scholar 

  6. Jacob A, Moullec G, Lavoie KL, Laurin C, Cowan T, Tisshaw C, et al. Impact of cognitive-behavioral interventions on weight loss and psychological outcomes: A meta-analysis. Health Psychol. 2018;37:417–32.

    Article  PubMed  Google Scholar 

  7. Jebb SA, Ahern AL, Olson AD, Aston LM, Holzapfel C, Stoll J, et al. Primary care referral to a commercial provider for weight loss treatment versus standard care: a randomised controlled trial. Lancet. 2011;378:1485–92.

    Article  PubMed  PubMed Central  Google Scholar 

  8. Johns DJ, Hartmann-Boyce J, Jebb SA, Aveyard P, Behavioural Weight Management Review G. Diet or exercise interventions vs combined behavioral weight management programs: a systematic review and meta-analysis of direct comparisons. J Acad Nutr Diet. 2014;114:1557–68.

    Article  PubMed  PubMed Central  Google Scholar 

  9. Dalle Grave R, Sartirana M, Calugi S. Personalized cognitive-behavioural therapy for obesity (CBT-OB): theory, strategies and procedures. Biopsychosoc Med. 2020;14:5.

    Article  PubMed  PubMed Central  Google Scholar 

  10. Dalle Grave R, Melchionda N, Calugi S, Centis E, Tufano A, Fatati G, et al. Continuous care in the treatment of obesity: an observational multicentre study. J Intern Med. 2005;258:265–73.

    Article  CAS  PubMed  Google Scholar 

  11. Coughlin JW, Smith MT. Sleep, obesity, and weight loss in adults: Is there a rationale for providing sleep interventions in the treatment of obesity? Int Rev Psychiatry. 2014;26:177–88.

    Article  PubMed  Google Scholar 

  12. Vera B, Dashti HS, Gomez-Abellan P, Hernandez-Martinez AM, Esteban A, Scheer F, et al. Modifiable lifestyle behaviors, but not a genetic risk score, associate with metabolic syndrome in evening chronotypes. Sci Rep. 2018;8:945.

    Article  PubMed  PubMed Central  Google Scholar 

  13. Garaulet M, Gomez-Abellan P, Alburquerque-Bejar JJ, Lee YC, Ordovas JM, Scheer FA. Timing of food intake predicts weight loss effectiveness. Int J Obes (Lond. 2013;37:604–11.

  14. Jordan MI, Mitchell TM. Machine learning: Trends, perspectives, and prospects. Science. 2015;349:255–60.

    Article  CAS  PubMed  Google Scholar 

  15. A risk prediction model for type 2 diabetes based on weighted feature selection of random forest and xgboost ensemble classifier. 2019 eleventh international conference on advanced computational intelligence (ICACI). IEEE, 2019.

  16. Application of XGBoost algorithm in hourly PM2. 5 concentration prediction. IOP conference series: earth and environmental science. IOP publishing, 2018.

  17. Heymsfield SB, Thomas D, Nguyen AM, Peng JZ, Martin C, Shen W, et al. Voluntary weight loss: systematic review of early phase body composition changes. Obes Rev. 2011;12:e348–61.

    Article  CAS  PubMed  Google Scholar 

  18. Corbalan MD, Morales EM, Canteras M, Espallardo A, Hernandez T, Garaulet M. Effectiveness of cognitive-behavioral therapy based on the Mediterranean diet for the treatment of obesity. Nutrition. 2009;25:861–9.

    Article  PubMed  Google Scholar 

  19. Jensen MD, Ryan DH, Apovian CM, Ard JD, Comuzzie AG, Donato KA, et al. 2013 AHA/ACC/TOS guideline for the management of overweight and obesity in adults: a report of the American College of Cardiology/American Heart Association Task Force on Practice Guidelines and The Obesity Society. J Am Coll Cardiol. 2014;63:2985–3023.

    Article  PubMed  Google Scholar 

  20. Garaulet M, Corbalan-Tutau MD, Madrid JA, Baraza JC, Parnell LD, Lee YC, et al. PERIOD2 variants are associated with abdominal obesity, psycho-behavioral factors, and attrition in the dietary treatment of obesity. J Am Diet Assoc. 2010;110:917–21.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  21. Perez-Llamas F, Garaulet M, Herrero F, Palma JT, Perez de Heredia F, Marin R, et al. [Multivalent informatics application for studies of the nutritional status of the population. Assessment of food intake]. Nutricion hospitalaria : organo oficial de la Soc Espanola de Nutricion Parenter y Enter. 2004;19:160–6.

    CAS  Google Scholar 

  22. Craig CL, Marshall AL, Sjostrom M, Bauman AE, Booth ML, Ainsworth BE, et al. International physical activity questionnaire: 12-country reliability and validity. Med Sci Sports Exerc. 2003;35:1381–95.

    Article  PubMed  Google Scholar 

  23. Sanchez-Moreno C, Ordovas JM, Smith CE, Baraza JC, Lee YC, Garaulet M. APOA5 gene variation interacts with dietary fat intake to modulate obesity and circulating triglycerides in a Mediterranean population. J Nutr. 2011;141:380–5.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  24. Shen J, Arnett DK, Peacock JM, Parnell LD, Kraja A, Hixson JE, et al. Interleukin1beta genetic polymorphisms interact with polyunsaturated fatty acids to modulate risk of the metabolic syndrome. J Nutr. 2007;137:1846–51.

    Article  CAS  PubMed  Google Scholar 

  25. Lopez-Minguez J, Dashti HS, Madrid-Valero JJ, Madrid JA, Saxena R, Scheer F, et al. Heritability of the timing of food intake. Clin Nutr. 2019;38:767–73.

    Article  PubMed  Google Scholar 

  26. Knoops KT, Groot de LC, Fidanza F, Alberti-Fidanza A, Kromhout D, van Staveren WA. Comparison of three different dietary scores in relation to 10-year mortality in elderly European subjects: the HALE project. Eur J Clin Nutr. 2006;60:746–55.

    Article  CAS  PubMed  Google Scholar 

  27. Diller KR, Aggarwal SJ. Computer automated cell size and shape analysis in cryomicroscopy. J Microsc. 1987;146:209–19.

    Article  CAS  PubMed  Google Scholar 

  28. Horne JA, Ostberg O. A self-assessment questionnaire to determine morningness-eveningness in human circadian rhythms. Int J Chronobiol. 1976;4:97–110.

    CAS  PubMed  Google Scholar 

  29. Garaulet M, Canteras M, Morales E, Lopez-Guimera G, Sanchez-Carracedo D, Corbalan-Tutau MD. Validation of a questionnaire on emotional eating for use in cases of obesity: the Emotional Eater Questionnaire (EEQ). Nutr Hosp. 2012;27:645–51.

    CAS  PubMed  Google Scholar 

  30. Lundberg SM, Lee S-I A unified approach to interpreting model predictions. Advances in neural information processing systems 2017;30.

  31. Pigsborg K, Kalea AZ, De Dominicis S, Magkos F. Behavioral and psychological factors affecting weight loss success. Curr Obes Rep. 2023;12:223–30.

    Article  PubMed  Google Scholar 

  32. Forrest LN, Ivezaj V, Grilo CM. Machine learning v. traditional regression models predicting treatment outcomes for binge-eating disorder from a randomized controlled trial. Psychol Med. 2023;53:2777–88.

    Article  PubMed  Google Scholar 

  33. Fisher A, Rudin C, Dominici F. All models are wrong, but many are useful: learning a variable’s importance by studying an entire class of prediction models simultaneously. J Mach Learn Res. 2019;20:1–81.

    CAS  Google Scholar 

  34. Wadden TA, Butryn ML, Wilson C. Lifestyle modification for the management of obesity. Gastroenterology. 2007;132:2226–38.

    Article  PubMed  Google Scholar 

  35. Finkler E, Heymsfield SB, St-Onge MP. Rate of weight loss can be predicted by patient characteristics and intervention strategies. J Acad Nutr Diet. 2012;112:75–80.

    Article  PubMed  Google Scholar 

  36. Macaulay L, O’Dolan C, Avenell A, Carroll P, Cotton S, Dombrowski S, et al. Effectiveness and cost-effectiveness of text messages with or without endowment incentives for weight management in men with obesity (Game of Stones): study protocol for a randomised controlled trial. Trials. 2022;23:582.

    Article  PubMed  PubMed Central  Google Scholar 

  37. Pirotta S, Joham A, Hochberg L, Moran L, Lim S, Hindle A, et al. Strategies to reduce attrition in weight loss interventions: A systematic review and meta-analysis. Obes Rev. 2019;20:1400–12.

    Article  PubMed  Google Scholar 

  38. Greenberg I, Stampfer MJ, Schwarzfuchs D, Shai I, Group D. Adherence and success in long-term weight loss diets: the dietary intervention randomized controlled trial (DIRECT). J Am Coll Nutr. 2009;28:159–68.

    Article  CAS  PubMed  Google Scholar 

  39. Burkhart PV, Sabate E. Adherence to long-term therapies: evidence for action. J Nurs Scholarsh. 2003;35:207.

    Article  PubMed  Google Scholar 

  40. Expert Panel on Detection E, Treatment of High Blood Cholesterol in A. Executive Summary of The Third Report of The National Cholesterol Education Program (NCEP) Expert Panel on Detection, Evaluation, And Treatment of High Blood Cholesterol In Adults (Adult Treatment Panel III). JAMA. 2001;285:2486–97.

    Article  Google Scholar 

  41. Leyden E, Hanson P, Halder L, Rout L, Cherry I, Shuttlewood E, et al. Older age does not influence the success of weight loss through the implementation of lifestyle modification. Clin Endocrinol (Oxf). 2021;94:204–9.

    Article  PubMed  Google Scholar 

  42. Kim M, Yang J, Ahn WY, Choi HJ. Machine learning analysis to identify digital behavioral phenotypes for engagement and health outcome efficacy of an mhealth intervention for obesity: randomized controlled trial. J Med Internet Res. 2021;23:e27218.

    Article  PubMed  PubMed Central  Google Scholar 

  43. Antoun J, Itani H, Alarab N, Elsehmawy A. The effectiveness of combining nonmobile interventions with the use of smartphone apps with various features for weight loss: systematic review and meta-analysis. JMIR Mhealth Uhealth. 2022;10:e35479.

    Article  PubMed  PubMed Central  Google Scholar 

  44. Mirkarimi K, Kabir MJ, Honarvar MR, Ozouni-Davaji RB, Eri M. Effect of motivational interviewing on weight efficacy lifestyle among women with overweight and obesity: a randomized controlled trial. Iran J Med Sci. 2017;42:187–93.

    PubMed  PubMed Central  Google Scholar 

  45. Burke LE, Wang J, Sevick MA. Self-monitoring in weight loss: a systematic review of the literature. J Am Diet Assoc. 2011;111:92–102.

    Article  PubMed  PubMed Central  Google Scholar 

  46. Prestwich A, Kellar I, Parker R, MacRae S, Learmonth M, Sykes B, et al. How can self-efficacy be increased? Meta-analysis of dietary interventions. Health Psychol Rev. 2014;8:270–85.

    Article  PubMed  Google Scholar 

  47. Teodoro MC, Conceicao EM, de Lourdes M, Alves JR, Neufeld CB. Grazing’s frequency and associations with obesity, psychopathology, and loss of control eating in clinical and community contexts: A systematic review. Appetite. 2021;167:105620.

    Article  PubMed  Google Scholar 

  48. Zizza C, Siega-Riz AM, Popkin BM. Significant increase in young adults’ snacking between 1977-1978 and 1994-1996 represents a cause for concern! Prev Med. 2001;32:303–10.

    Article  CAS  PubMed  Google Scholar 

  49. Drummond S, Crombie N, Kirk T. A critique of the effects of snacking on body weight status. Eur J Clin Nutr. 1996;50:779–83.

    CAS  PubMed  Google Scholar 

  50. Del Corral P, Chandler-Laney PC, Casazza K, Gower BA, Hunter GR. Effect of dietary adherence with or without exercise on weight loss: a mechanistic approach to a global problem. J Clin Endocrinol Metab. 2009;94:1602–7.

    Article  PubMed  PubMed Central  Google Scholar 

Download references

Acknowledgements

Grant PID2020-112768RB-I00 funded by MCIN/AEI/10.13039/501100011033. It was used to recruit participants, data collection, and analyses.

Author information

Authors and Affiliations

Authors

Contributions

Conceptualization: KH, MG; Formal analysis: H-W Y, HS and Y-Q Peng; Investigation: MG and KH; Data Curation: H-W Y; Writing - Original Draft: RDP-A, H-W Y, and MG; Visualization: RDP-A and H-WY; Writing - Review & Editing: MG, KH, FS, and HS; Supervision: M-T Lo, HS, MG, KH, FS.

Corresponding authors

Correspondence to Hui-Wen Yang or Marta Garaulet.

Ethics declarations

Competing interests

FAJLS served on the Board of Directors for the Sleep Research Society and has received consulting fees from the University of Alabama at Birmingham. FAJLS interests were reviewed and managed by Brigham and Women’s Hospital and Partners HealthCare under their conflict of interest policies. FAJLS consultancies are not related to the current work. The other authors declare no conflicts of interest.

Ethics approval and consent to participate

Study procedures are described in clinicaltrials.gov: NCT02829619 and were approved by the Committee of Research Ethics of the University of Murcia (ID: 632/2017), and the protocol followed good clinical practice. Written informed consent for the publication of participants’ clinical details was obtained from the patient. A copy of the consent form is available for review by the Editor of this.

Additional information

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Yang, HW., De la Peña-Armada, R., Sun, H. et al. Uncovering key factors in weight loss effectiveness through machine learning. Int J Obes 49, 1189–1199 (2025). https://doi.org/10.1038/s41366-025-01766-w

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue date:

  • DOI: https://doi.org/10.1038/s41366-025-01766-w

Search

Quick links