Background: There are no known non-invasive tests (NITs) designed for accurately detecting metabolic dysfunction-associated steatohepatitis (MASH) with liver fibrosis stages F2-F3, excluding cirrhosis-the FDA-defined range for prescribing Resmetirom and other drugs in clinical trials. We aimed to validate and re-optimize known NITs, and most importantly to develop new machine learning (ML)-based NITs to accurately detect MASH F2-F3., Methods: Clinical and metabolomic data were collected from 443 patients across three countries and two clinic types (metabolic surgery, gastroenterology/hepatology) covering the entire spectrum of biopsy-proven MASLD, including cirrhosis and healthy controls. Three novel types of ML models were developed using a categorical gradient boosting machine pipeline. These were compared with 24 biomarker, imaging, and algorithm-based NITs with both known cutoffs for MASH F2-F4 and re-optimized cutoffs for MASH F2-F3., Results: NFS at a - 1.455 cutoff attained an AUC of 0.59, the highest sensitivity (90.9 %, 95 % CI 84.3-95.4), and NPV of 87.2 %. FIB4 risk stratification followed by elastography (8 kPa) had the best specificity (86.9 %) and PPV (63.3 %), with an AUC of 0.57. NFS followed by elastography improved the PPV to 65.3 % and AUC to 0.62. Re-optimized FibroScan-AST (FAST) at a 0.22 cutoff had the highest PPV (69.1 %). ML models using aminotransferases, metabolic syndrome components, BMI, and 3-ureidopropionate achieved an AUC of 0.89, which further increased to 0.91 following hyperparameter optimization and the addition of alpha-ketoglutarate. These new ML models outperformed all other NITs and displayed accuracy, sensitivity, specificity, PPV, and NPV up to 91.2 %, 85.3 %, 97.0 %, 92.4 %, and 90.7 % respectively. The models were reproduced and validated in a secondary sensitivity analysis, that used one of the cohorts as feature selection/training, and the rest as independent validation, likewise outperforming all other NITs., Conclusions: We report for the first time the diagnostic characteristics of non-invasive, metabolomics-based biomarker models to detect MASH with fibrosis F2-F3 required for Resmetirom treatment and inclusion in ongoing phase-III trials. These models may be used alone or in combination with other NITs to accurately determine treatment eligibility., Competing Interests: Declaration of competing interest KS is partially funded by a George and Marie Vergottis Postdoctoral Fellowship at Harvard medical school and an education grant from Boehringer Ingelheim to his institution BIDMC. None is related to the work presented herein. CSM reports grants through his institution from Merck, Massachusetts Life Sciences Center and Boehringer Ingelheim, has been a shareholder of and has received grants through his Institution and personal consulting fees from Coherus Inc., he reports personal consulting fees and support with research reagents from Ansh Inc., collaborative research support from LabCorp Inc., reports personal consulting fees from Genfit, Lumos, Novo Nordisk, Amgen, Corcept, Intercept, 89 Bio, Esperion, Aligos, Madrigal and Regeneron, reports educational activity meals through his institution or national conferences from Esperion, Merck, Boehringer Ingelheim and travel support and fees from TMIOA, Elsevier, and the Cardio Metabolic Health Conference. None is related to the work presented herein. JG is supported by the Robert W. Storr Bequest to the Sydney Medical Foundation, University of Sydney; a National Health and Medical Research Council of Australia (NHMRC) Program Grant (APP1053206), Project, Ideas and Investigator grants (APP2001692, APP1107178, APP1108422, APP1196492) and a Cancer Institute, NSW grant (2021/ATRG2028). None is related to the work presented herein. GM reports consulting fees from Novo Nordisk, Eli Lilly, Boehringer Ingelheim, Fractyl Inc., and Recor Inc. She is also scientific advisor of Metadeq, Keyron, GHP Scientific, and Jemyll Ltds. None is related to the work presented herein., (Copyright © 2024. Published by Elsevier Inc.)