BackgroundThe tumor microenvironment (TME) is a complex mixture of tumor epithelium, stroma and immune cells, and the immune component of the TME is highly prognostic for tumor progression and patient outcome. In lung cancer, anti-PD-1 therapy significantly improves patient survival through activation of T cell cytotoxicity against tumor cells. Direct contact between CD8+ T cells and target cells is necessary for CD8+ T cell activity, indicating that spatial organization of immune cells within the TME reflects a critical process in anti-tumor immunity. Current immunohistochemistry (IHC) imaging techniques identify immune cell numbers and densities, but lack assessment of cell–cell spatial relationships (or “cell sociology”). Immune functionality, however, is often dictated by cell-to-cell contact and cannot be resolved by simple metrics of cell density (for example, number of cells per mm2). To address this issue, we developed a Hyperspectral Cell Sociology technology platform for the analysis of cell–cell interactions in multi-channel IHC-stained tissue.MethodsTissue sections of primary tumors from lung adenocarcinoma patients with known clinical outcome were stained using multiplex IHC for CD3, CD8, and CD79a, and hyperspectral image analysis determined the phenotype of all cells. A Voronoi diagram for each cell was used to approximate cell boundaries, and the cell type of all neighboring cells was identified and quantified. Monte Carlo analysis was used to assess whether cell sociology patterns were likely due to random distributions of the cells.ResultsHigh density of intra-tumoral CD8+ T cells was significantly associated with non-recurrence of tumors. A cell sociology pattern of CD8+ T cells surrounded by tumor cells was more significantly associated with non-recurrence compared to CD8+ T cell density alone. CD3+ CD8- T cells surrounded by tumor cells was also associated with non-recurrence, but at a similar significance as cell density alone. Cell sociology metrics improved recurrence classifications of 12 patients. Monte Carlo re-sampling analysis determined that these cell sociology patterns were non-random.ConclusionHyperspectral Cell Sociology expands our understanding of the complex interplay between tumor cells and immune infiltrate. This technology could improve predictions of responses to immunotherapy and lead to a deeper understanding of anti-tumor immunity.Electronic supplementary materialThe online version of this article (10.1186/s40425-018-0488-6) contains supplementary material, which is available to authorized users.