BACKGROUND & AIMS: Microscopic inflammation has significant prognostic value in ulcerative colitis (UC); however, its assessment is complex with high interobserver variability. We aimed to develop and validate an artificial intelligence (AI) computer-aided diagnosis system to evaluate UC biopsies and predict prognosis. METHODS: A total of 535 digitalized biopsies (273 patients) were graded according to the PICaSSO Histologic Remission Index (PHRI), Robarts, and Nancy Histological Index. A convolutional neural network classifier was trained to distinguish remission from activity on a subset of 118 biopsies, calibrated on 42 and tested on 375. The model was additionally tested to predict the corresponding endoscopic assessment and occurrence of flares at 12 months. The system output was compared with human assessment. Diagnostic performance was reported as sensitivity, specificity, prognostic prediction through Kaplan-Meier, and hazard ratios of flares between active and remission groups. We externally validated the model in 154 biopsies (58 patients) with similar characteristics but more histologically active patients. RESULTS: The system distinguished histological activity/remission with sensitivity and specificity of 89% and 85% (PHRI), 94% and 76% (Robarts Histological Index), and 89% and 79% (Nancy Histological Index). The model predicted the corresponding endoscopic remission/activity with 79% and 82% accuracy for UC endoscopic index of severity and Paddington International virtual ChromoendoScopy ScOre, respectively. The hazard ratio for disease flare-up between histological activity/remission groups according to pathologist-assessed PHRI was 3.56, and 4.64 for AI-assessed PHRI. Both histology and outcome prediction were confirmed in the external validation cohort. CONCLUSION: We developed and validated an AI model that distinguishes histologic remission/activity in biopsies of UC and predicts flare-ups. This can expedite, standardize, and enhance histologic assessment in practice and trials. ispartof: GASTROENTEROLOGY vol:164 issue:7 pages:1180-+ ispartof: location:United States status: published