Central nervous system (CNS) resident memory CD8 T cells (TRM) that express IFN-γ contribute to neurodegenerative processes, including synapse loss, leading to memory impairments. Here, IFNG is linked to memory impairment.