Together, our findings suggest that metformin might reduce the risk of dementia in diabetes patients through mechanisms beyond glycemic control, and that SPP1 is a candidate biomarker for metformin’s action in the brain. This evidence concerns the gene SPP1 and dementia.