A growing body of evidence suggests that obesity is associated with alterations in brain structure and cognitive impairment. Mid-life obesity is a risk factor for Alzheimer's disease and vascular dementia. The mechanisms underlying obesity related decline in cognitive function are not fully understood. The long-term goal of this research is to identify how obesity, insulin resistance (IR), and their treatment impact brain structure and function. The investigators propose that IR and obesity related inflammation are two modifiable factors that affect neuronal integrity and lead to cognitive dysfunction. In this proposal, investigators will test two hypotheses: 1) among obese patients planning to undergo bariatric surgery (specifically vertical sleeve gastrectomy), baseline IR and systemic and brain markers of inflammation will inversely correlate with performance on cognitive testing and correlate with abnormalities in brain structure and 2) following bariatric surgery subjects who experience the greatest reduction in IR and obesity related inflammation will have the greatest improvement in cognitive function and brain structure. To address these hypotheses, investigators will use a comprehensive battery of tests to evaluate cognition and state of the art magnetic resonance imaging (MRI) techniques to assess brain structure and neurochemistry before and six months after bariatric surgery.