The results of the mediation analysis suggest that although BDNF is a biomarker affected by T2DM and cognition, it does not play a mediator role between cognitive impairment and diabetes. Here, BDNF is linked to Cognitive impairment.