Dendritic spines provide cognitive resilience against Alzheimer's disease