Infliximab/adalimumab (IFX/ADA) and vedolizumab (VDZ) are the most widely used biologics in inflammatory bowel diseases. Current models used to predict their efficacies are restricted to either Crohn's disease or ulcerative colitis or to only one type of biologic, which makes them limited in external validation. We therefore designed a comprehensive comparison among these models to identify the most meaningful predictors for patient responses. Several biomarkers and models were compared for their abilities to predict both IFX/ADA and VDZ responses by receiver operating characteristic curves. Least absolute shrinkage and selection operator regression was adopted to determine a simplified gene signature. Verification was performed in biopsy samples by immunohistochemical staining. The GIMATS module (based on counts of IgG plasma cells, inflammatory monocytes, activated T cells, and stromal cells) had the best overall performance for response prediction in both biologics (IFX/ADA, AUC = 0.720-0.853; VDZ, AUC = 0.661-0.728). Based on this module, patients were equally divided into 3 groups: M type (GIMATS-low, metabolism), with a preference for IFX/ADA; I type (GIMATS-high, immune), with a preference for VDZ; and N type (GIMATS-medium, normal), with no preference for either treatment. Furthermore, to improve clinical utility, a simplified 6-gene model, MIN score, was established to determine the baseline expression of G0S2, S100A9, SELE, CHI3L1, MMP1 and CXCL13 and function as a substitute for GIMATS module. Our study suggested that the classification of metabolic or immune type by MIN score was valuable for IBD diagnosis to assist with selection of IFX/ADA and VDZ.