e16635 Background: Surgical resection is a common curative treatment for patients with primary hepatocellular carcinoma (HCC), and conventional strategies of assessing clinical and pathologic risk factors have been adopted to predict clinic outcomes in patients after curative surgery. We hypothesized that an ensemble learning approach which incorporates multidimensional features would enable effective prediction of patient survival. Methods: We analyzed data from 222 stage II-III HCC patients who underwent surgical resection at Eastern Hepatobiliary Surgery Hospital (Shanghai, China). Baseline information for each patient includes clinical and pathologic risk factors, laboratory tests and in situ immunological profiles. Using machine learning, we developed CoxPH, GBS, CGBS, FSVM and NSVM models for patient overall survival (OS). Models were trained on 155 cases with 48 features. Thirteen-fold cross-validation (CV) was used to measure performance with area under the ROC curve (AUC) and C-Index (CI). The ensemble model was used to predict patient OS and validated on the subsequent 67 cases. Results: For all models tested, immune features, including the fraction of CD68+ and CD8+ cells in tumor, and CD8+ cells in stroma, play a crucial role in predicting patient OS. Using the ensemble CoxPH model (with superior value of AUC and CI), a risk scoring system for patient OS was developed. The scoring system could stratify patients into high-risk or low-risk groups, revealing different prognosis (validation cohort: HR, 6.5, 95% CI, 2.4-18, P = 3.4e-05). The CoxPH model was also predictive of the time to-recurrence (p < 0.0001). In validation set, the scoring system predicted half-year mortality of patients with AUC of 0.9, and 1-year mortality of patients with AUC of 0.897. The scoring system could also predict half-year recurrence and 1-year recurrence with AUC more than 0.83. Conclusions: The machine learning-based risk scoring system offers a novel strategy for incorporating multidimensional risk factors to predict clinic outcome and may help medical practitioners to optimize clinical follow-up or therapeutic interventions. [Table: see text]