Researchers shed light on why some people with depression experience memory loss and cognitive problems.