BackgroundEosinophilic esophagitis (EoE) is diagnosed and monitored using esophageal eosinophil levels; however, EoE also exhibits a marked, understudied esophageal mastocytosis. ObjectiveUsing machine learning, we localized and characterized esophageal mast cells to decipher their potential role in disease pathology. MethodsEsophageal biopsy samples (EoE, control) were stained for mast cells by anti-tryptase and imaged using immunofluorescence; high-resolution whole tissue images were digitally assembled. Machine learning software was trained to identify, enumerate, and characterize mast cells, designated Mast Cell-Artificial Intelligence (MC-AI). ResultsMC-AI enumerated cell counts with high accuracy. During active EoE, epithelial mast cells increased and lamina propria (LP) mast cells decreased. In controls and EoE remission patients, papillae had the highest mast cell density and negatively correlated with epithelial mast cell density. Mast cell density in the epithelium and papillae correlated with the degree of epithelial eosinophilic inflammation, basal zone hyperplasia, and LP fibrosis. MC-AI detected greater mast cell degranulation in the epithelium, papillae, and LP in EoE patients compared with control individuals. Mast cells were localized further from the basement membrane in active EoE than EoE remission and control individuals but were closer than eosinophils to the basement membrane in active EoE. ConclusionUsing MC-AI, we identified a distinct population of homeostatic esophageal papillae mast cells; during active EoE, this population decreases, undergoes degranulation, negatively correlates with epithelial mast cell levels, and significantly correlates with distinct histologic features. Overall, MC-AI provides a means to understand the potential involvement of mast cells in EoE and other disorders.