Purpose: Biomarkers on the basis of tumor-infiltrating lymphocytes (TIL) are potentially valuable in predicting the effectiveness of immune checkpoint inhibitors (ICI). However, clinical application remains challenging because of methodologic limitations and laborious process involved in spatial analysis of TIL distribution in whole-slide images (WSI)., Methods: We have developed an artificial intelligence (AI)-powered WSI analyzer of TIL in the tumor microenvironment that can define three immune phenotypes (IPs): inflamed, immune-excluded, and immune-desert. These IPs were correlated with tumor response to ICI and survival in two independent cohorts of patients with advanced non-small-cell lung cancer (NSCLC)., Results: Inflamed IP correlated with enrichment in local immune cytolytic activity, higher response rate, and prolonged progression-free survival compared with patients with immune-excluded or immune-desert phenotypes. At the WSI level, there was significant positive correlation between tumor proportion score (TPS) as determined by the AI model and control TPS analyzed by pathologists ( P < .001). Overall, 44.0% of tumors were inflamed, 37.1% were immune-excluded, and 18.9% were immune-desert. Incidence of inflamed IP in patients with programmed death ligand-1 TPS at < 1%, 1%-49%, and ≥ 50% was 31.7%, 42.5%, and 56.8%, respectively. Median progression-free survival and overall survival were, respectively, 4.1 months and 24.8 months with inflamed IP, 2.2 months and 14.0 months with immune-excluded IP, and 2.4 months and 10.6 months with immune-desert IP., Conclusion: The AI-powered spatial analysis of TIL correlated with tumor response and progression-free survival of ICI in advanced NSCLC. This is potentially a supplementary biomarker to TPS as determined by a pathologist., Competing Interests: Sehhoon ParkStock and Other Ownership Interests: Lunit Chan-Young OckEmployment: LunitLeadership: LunitStock and Other Ownership Interests: Lunit, Medpacto, Y-BiologicsConsulting or Advisory Role: Medpacto, Y-Biologics, Idience Sergio PereiraEmployment: LunitStock and Other Ownership Interests: Lunit Seonwook ParkEmployment: LunitStock and Other Ownership Interests: LunitResearch Funding: Lunit Minuk MaEmployment: LunitStock and Other Ownership Interests: Lunit Seunghwan ShinEmployment: LunitStock and Other Ownership Interests: Lunit Jaehong AumEmployment: LunitStock and Other Ownership Interests: Lunit Kyunghyun PaengEmployment: LunitLeadership: LunitStock and Other Ownership Interests: Lunit Donggeun YooEmployment: LunitLeadership: LunitStock and Other Ownership Interests: LunitPatents, Royalties, Other Intellectual Property: Having several patents about medical AI developments in Lunit Inc Se Hyun KimConsulting or Advisory Role: Ono Pharmaceutical Jin Seok AhnHonoraria: Pfizer, Roche, BC World, Yuhan, Hanmi, Novartis, JW Pharmaceutical, Amgen, Boehringer IngelheimConsulting or Advisory Role: Bixink, Bayer, Yooyoung Pharmaceutical Co Ltd, Pharmbio Korea, Vifor Pharma Myung-Ju AhnHonoraria: AstraZeneca, Lilly, MSD, TakedaConsulting or Advisory Role: AstraZeneca, Boehringer Ingelheim, Lilly, MSD, Takeda, Alpha Pharmaceutical Keunchil ParkConsulting or Advisory Role: AstraZeneca, Lilly, Ono Pharmaceutical, Bristol Myers Squibb, MSD, Merck KGaA, AbbVie, Daiichi Sankyo, Boehringer Ingelheim, JNJ, Geinus, IMBdxSpeakers' Bureau: Boehringer IngelheimResearch Funding: AstraZeneca, MSD Oncology Sang Yong SongEmployment: AstraZeneca/MedImmuneLeadership: AstraZeneca/MedImmuneStock and Other Ownership Interests: AstraZeneca/MedImmune Yung-Jue BangConsulting or Advisory Role: BeiGene, Green Cross, Merck Serono, AstraZeneca/MedImmune, Novartis, MSD Oncology, Hanmi, Genentech/Roche, Daiichi Sankyo, Astellas Pharma, Bristol Myers Squibb, Samyang, Alexo TherapeuticsResearch Funding: AstraZeneca/MedImmune (Inst), Novartis (Inst), Genentech/Roche (Inst), MSD (Inst), Merck Serono (Inst), Bayer (Inst), GlaxoSmithKline (Inst), Bristol Myers Squibb (Inst), Pfizer (Inst), Lilly (Inst), Ono Pharmaceutical (Inst), Taiho Pharmaceutical (Inst), Takeda (Inst), BeiGene (Inst), Curis (Inst), GC Pharma (Inst), Daiichi Sankyo (Inst), Astellas Pharma (Inst), Genexine (Inst) Yoon-La ChoiResearch Funding: Bayer Tony S. MokEmployment: The Chinese University of Hong KongLeadership: Sanomics Limited, AstraZeneca, Hutchison China Meditech, Aurora Tele-Oncology Platform, LunitStock and Other Ownership Interests: Sanomics Limited, Hutchison China Meditech, Aurora Tele-Oncology PlatformHonoraria: AstraZeneca, Alpha Biopharma, ACEA Pharmaceutical Research, Amgen, Amoy Diagnostics, BeiGene, Boehringer Ingelheim, Bristol Myers Squibb, Daiichi Sankyo/UCB Japan, Fishawack Facilitate, InMed, Lilly, Merck Sharp & Dohme, Novartis, Origimed, Pfizer, Prime Oncology, Roche, Sanofi Aventis GmbH, Taiho Pharmaceutical, Takeda, Lucence Health Inc, Medscape, P. Permanyer SL, PeerVoice, Physicans' Education Resource, Research to Practice, Shanghai BeBirds Translation & Consulting Co, Liangyihui Network Technology Co., LtdConsulting or Advisory Role: AbbVie, ACEA Pharmaceutical Research, Alpha Biopharma, Amgen, Amoy Diagnostics, AstraZeneca, BeiGene, Berry Oncology, Boehringer Ingelheim, Blueprint Medicines, Bristol Myers Squibb, CStone Pharmaceuticals, Curio Science, Daiichi Sankyo/UCB Japan, Eisai, Fishawack Facilitate, Gritstone Oncology, Guardant Health, Hengrui Therapeutics, Ignyta, Incyte, Inivata, IQvia, Lilly, Loxo, Lunit, Merck Serono, Merck Sharp & Dohme, Mirati Therapeutics, Novartis, Pfizer, Puma Biotechnology, Roche, SFJ Pharmaceuticals Group, Takeda, Vertex, Yuhan, Qiming Development (HK) LtdResearch Funding: AstraZeneca (Inst), Boehringer Ingelheim (Inst), Pfizer (Inst), Novartis (Inst), SFJ Pharmaceuticals Group (Inst), Roche (Inst), Merck Sharp & Dohme (Inst), Bristol Myers Squibb (Inst), Xcovery (Inst), G1 Therapeutics (Inst), Merck Serono (Inst), Takeda (Inst) Se-Hoon LeeHonoraria: AstraZeneca/MedImmune, Roche, Bristol Myers Squibb, MerckConsulting or Advisory Role: AstraZeneca, Bristol Myers Squibb, RocheResearch Funding: MerckTravel, Accommodations, Expenses: NovartisNo other potential conflicts of interest were reported.