Early-Stage Grad Student Depression
February 2014 (perspective of a postdoc)
Here is a private journal entry that I wrote seven years ago in February 2007 during my first year of grad school in the Stanford Computer Science Ph.D. program. It later formed the raw material for parts of the Prologue and Year 1 of The Ph.D. Grind.
I am sharing this now because I have recently been talking with grad students about their emotional challenges. Early-stage students will relate most to my experience. However, I don't have any substantive advice except to take mental health issues very seriously and seek counseling at your university if necessary. Your student health insurance likely covers it.
Also, it's very important to communicate openly with your advisor. They should care about your health, both because it's the right thing to do, and also because you are their greatest financial investment. In my field, the majority of a professor's grant money goes toward paying for their grad students. Each student costs anywhere from $50,000 to $100,000 per year. But remember that your advisor is not a mental health professional. They were hired for their research credentials, not for their counseling or mentoring abilities.
First I'll present the journal entry itself, completely unedited. Then I'll reflect on that entry from my current perspective as someone who is training to become a research advisor.
The journal entry
2007-02-10 (actually it's the early morning of 2007-02-11)
Start: 12:50 AM
I've only written two so-called journal entries since I began college at MIT in Sept. 2001. They were hand-written on looseleaf paper late in the middle of the night when I couldn't sleep. I never really kept a journal or diary, so these were the closest things to me writing down my feelings about my own life. This is my third so-called journal entry ever since starting college, and it actually contains a mash-up of themes from my last two entries. Interesting.
The first, written on October 11, 2002, described my satisfaction with my academic life at MIT thus far, but my fear of the 'day when I am no longer in control --- or worse, of the day when I appear to not look like I'm in control.' I feared that day would come later in my MIT career, the day when I felt truly overwhelmed by something deep-seated (and not just a big homework assignment or upcoming exam), but it never really came ... until recently in my second quarter as a Ph.D. student at Stanford. 'I dread the day when I face a challenge which I cannot overcome at least in the short term. Someday that will come, and I'll worry about it when it does arrive.'
Fast-forward a year and a half to March 30, 2004, the middle of my junior year, the 'prime' of my MIT undergrad days, when my social life was bustling, my academics were flourishing, and I had just began working in Prof. Ernst's program analysis research group as a UROP. That was the journal entry where I declared that I intended to pursue a Ph.D. in Computer Science. I was disillusioned by the monotony of my summer internship at Teradyne the previous summer, and I weighed the pros and cons of a software engineering job in industry, and ultimately decided that I wanted to pursue a Ph.D. Not surprisingly, Stanford was one of the 3 choices I listed as my dream graduate school (MIT and Berkeley were the others). I knew nothing about what being a Ph.D. student entailed, but for some reason I had the drive to earn a Ph.D., perhaps it was due to the fact that I felt like I wanted to somehow attain a higher status than simply a Master's degree. I had no clue what 'doing research' as a grad student entailed (both on a daily basis and in the long term). I was working on a pure engineering/implementation project, which at the time was way over my head in terms of difficulty. I recounted, 'It's right after spring break, halfway through the term, and I have not nearly gotten half of my semester-long project done yet. I am a bit worried that I am over my head on this one, but I am not giving up so easily. I am redoubling my efforts during the second half of the semester, vowing to stay on campus in the various computer labs to work on this project until it is done. This could be my ticket into graduate school.'
As it turned out, that was my ticket into graduate school. I stuck around and worked my tail off for the next two and a half years and turned out a pretty good piece of program analysis research software, received great letters of reference, had material to write essays for two successful fellowship applications, and even published two conference papers from the work. All in all, my time as an undergraduate and Master's student in the research world ended superbly.
But now I feel the stakes are higher, and the point has come where I don't feel fully in control (as I had feared four and a half years earlier in that late-night journal entry). When I was back at MIT, I had a amazing Ph.D. student mentor, Stephen McCamant, who taught me so much about the day-to-day implementation work and saved my butt when I had to debug seemingly impossible problems. I always had a safety net and fall-back crutch when I felt that something was beyond my grasp, because after all, I wasn't a Ph.D. student. But now I am, and I don't feel like I have any fall-back anymore ... I'm no longer the undergrad under supervision, I am the one who is supposed to be doing all the hard work at this point in my life. I have nobody higher-up to answer to besides my advisor, and he expects his students to be up to a certain caliber in terms of independence, self-motivation, and ability to get shit done. This is my time to step up, and it has been a rough awakening.
I spent the first 2 months of my Ph.D. program (Fall quarter 2006) studying for comprehensive exams and socializing without doing any research at all. That was very 'undergrad-like' because we were all reviewing canned information and preparing for organized exams. Then after exams were over at the end of November, I began working on my first project - to use our research group's symbolic execution tool to find bugs in Linux device drivers. I spent 3 weeks in December getting up to speed on the mechanics of the project - familiarizing myself with our tool and learning more about the technical details of Linux drivers and getting them compiled and working with our tool. All of a sudden I was thrown into an unknown world where I had no experience, and that was daunting but I expected progress to be slow at first, so I didn't mind fumbling around for those 3 weeks until winter break rolled around. I took a much-needed 3-week break from this project over winter break and returned at the beginning of winter quarter 2007 in early January fresh and ready to go.
Then the feelings of being overwhelmed and depressed hit me hard, especially during the first week back. (For reference, this is the end of my fifth week of the quarter.) I felt so frustrated poking around trying to get various drivers to compile and run using our tool, doing what I felt was pure manual labor, albeit skilled manual labor that required someone with some nominal amount of grungy Linux and C hacking experience. I didn't feel like I was contributing to any novel research ideas or even working on our research tool --- I was merely a user of the tool, not even a developer. If what I had been asked to do was easy, then I wouldn't have minded, but I found it very difficult due to my lack of experience with Linux drivers. I found out that an elder student in our research group had attempted to do this same thing (using more-or-less the same approach as me) over a year ago and had mysteriously quit (I didn't want to be nosy). He sent me a polite email telling me where his code was located, and that was helpful as a reference for my own code-writing in this project. At first, I kept on thinking that this was difficult simply because I was inexperienced at doing this stuff, but as the weeks wore on, I felt better because I realized that it was a difficult task for any new Ph.D. student to do. It wasn't theoretically difficult (all I needed to do was to get the drivers to run through our tool and find bugs in them - I could describe it to a laymen in a few minutes), but it was practically difficult because Linux is such a huge, complex code base with so many complex parts. I felt overwhelmed by the sheer complexity of the Linux code I had to stare at every day --- but it is sobering and reassuring to know that this is one of the most sophisticated piece of software available for personal computers, and I was staring it in its ugly guts, without someone like Stephen to turn to when I had questions.
My advisor would always be very responsive via emails and meetings in person, but there was no way that I would be able to ask him as many questions as I had asked to Stephen back when I was at MIT. For one, he was much busier doing other professor-like things, and more importantly, I felt like this was my time to step up - that I needed to figure out this stuff through my sheer hard work because I am now a real Ph.D. student. The second and third weeks went better; as I built up more of my infrastructure code and was able to get more drivers to successfully run with our tool, I began to get into the groove of things, to get the hang of what I was supposed to do. By week 3 and 4, I had actually begun to find some simple small bugs in several drivers. I emailed the authors of those drivers and they even confirmed that some of what I had found were, in fact, real bugs. I was very excited at receiving those confirmations because that was validation of the success (however small) of what I had been working on for the past month. I wasn't really doing novel, original, breakthrough research, but merely applying existing research to a new domain (Linux device driver code), but still, it was satisfying.
Morale was at a high-point coming into my fifth week; I wrote my advisor an optimistic email last Monday telling him about how I think I've managed to overcome the initial hurdles and fixed set-up cost (of getting familiar with how to run our tool on real Linux drivers), and I realistically hoped that I would be able to find more and more bugs over the next few weeks before our March 18 paper deadline (I hope to contribute to that paper by presenting examples of interesting bugs that I had found in Linux drivers). I thought that my progress was primed to have an exponential growth and that I had gotten over that initial pain and depression of starting this project. I thought that it would be smooth sailing from this point until the end of the quarter when our paper was due, but this past week (week 5) has proven to be back-breaking for my spirits. I originally thought that I was on the cusp of an exponential growth in progress, but after hacking all week, I realized that I was stuck flat-lined at that cusp - there were obstacles that were insurmountable without taking a different approach, and trying to hack any longer doing what I've been doing for the last few weeks would be unlikely to bring any significant progress. It was difficult for me to acknowledge defeat, but necessary, so I wrote my advisor a long email detailing my defeat, and he was gracious enough to reply very quickly with a proposal that we will go over next week. I am hopeful that this will break my rut and bring the progress that I so badly wanted after my past few months of work, but I am also realistic at this point that research is hard by definition, so success is not that predictable.
I had been mildly depressed in the previous few weeks due to the feelings of hopelessness brought on by the overwhelming nature of learning about Linux drivers and how to find bugs in them ... it was the first time that I ever felt so lost and lacking control in terms of being able to do a task that seemed theoretically so feasible, yet in reality was so difficult for me to do. I was always used to working hard but with knowledge that what I was doing was well within my comfort zone. Despite other people thinking that I was all 'hardcore' and super-duper-ambitious and smart back in my 5 years at MIT, the truth is that I never left my comfort zone. I never took difficult classes that were beyond my comprehension and skills, I never took on more than I knew I could handle, I never swam in the deep end ... I always kept in the comfortable end of the MIT pool with the mainstream kids and was able to stand out as one of the best out of the mainstream. I wisely chose to stick with Prof. Ernst's group to do my M.Eng. thesis, even though it wasn't the most glamorous or sexy project, because I knew that I had built up momentum and it would pave my way into graduate school (which, thankfully, it did). I never found anything I did back at MIT to be overwhelmingly difficult (sure, some things were hard and took lots of time to understand, implement, or debug, but I always had support and safety nets). Support and safety nets. That's what being an undergrad was all about. In classes, if you didn't understand something, there would be TAs and more advanced students to help you through it; in the research setting, there would be smart Ph.D. students (such as Stephen) willing to help me out.
Support and safety nets. All of that was gone when I began my Ph.D. program. No longer was I merely in class where there was a known canned solution and I needed to simply get there (guided by TAs if need be). The whole point of research is that you (or more likely, your advisor) think that there are favorable results by taking a certain path, and you just have to work your butt off to get there, hoping that your predictions were more-or-less correct. I didn't understand just how much of a detrimental impact this lack of safety nets would have on my psyche during the past few weeks of working on research. I had to figure out lots of things that I had previously been able to ask others, and the sheer manual labor necessary to get the Linux drivers to cooperate with our tool exacerbated my lack of understanding about the domain. To top it all off, I really didn't feel like I was doing 'research', per say, because I was simply applying a research tool that had already been built to some new test subjects. But I kept on telling myself, I'm new here and just getting started, so I should be patient. The rational side of me knew that often times, 'research' consists of a great amount of manual labor that doesn't seem very glamorous or 'research-like' at all, but it must be done, and the Ph.D. students are the ones who have to do it (after all, professors were once Ph.D. students, too, so they went through this same process). However, the emotional side of me really took a beating, because it was just HARD. Like there's no more eloquent way to put it. For the first time in my life, I felt like I had to do something that was HARD without immediate gratification or results, and it just made me feel crappy inside. The worst part is that if I described what I am trying to do to others, it doesn't sound like it should be that hard, but when I actually try to do it, it was just HARD. The devil's totally in the details, and when dealing with low-level systems code like Linux drivers, there are a lot of details, and lots of complexity in those details.
I think it's impossible for someone who is about to begin a Ph.D. program to understand why Ph.D. students can get depressed; I certainly didn't understand when I entered the program, and I hit my first bout of depression 4 months after I started (really, 1-2 months after I began research, because the first two months were spent studying for exams and socializing. Before I came here, I knew that there would be low points in my Ph.D. career, but I thought it would come much later, like my 3rd-year mid-career slump as many grad students suffer. But I had absolutely no clue that it would come so early, right at the beginning of the first damn thing that I had to do for research, like a punch in the face right as I started. I had no clue that my first bout of depression would come so soon.
Students who are about to begin a Ph.D. program at a top school like Stanford have definitely had research experience as undergrads, so they, like a younger version of myself, probably think they know what life is like in grad school, in terms of work. However, the insight that they lack is the fact that they are not really Ph.D. students yet, so while they may be doing similar tasks as the Ph.D. students, the stakes aren't nearly as high for them ... if they are stuck on something, they can just go whine to their Ph.D. student mentors and keep on living a happy undergrad life (as I had done), but when you become the Ph.D. student, there is nobody you can whine to (besides your advisor, but you can't whine to him/her nearly as much as to a grad student mentor).
My current view of doing a Ph.D. in a rigorous science or engineering field, and advice for incoming students: it will definitely be detrimental to your mental health; it's up to you to take precautionary measures to protect yourself from dipping too low. Find a support network - friends, significant other, family, church, social network, anything! You cannot be a lone wolf and get through this all by yourself. The nature of Ph.D. work is extremely isolating, both physically and mentally. You are cooped up in front of the computer or in lab for long hours by yourself every day working on something which only you understand in detail, so there is both PHYSICAL isolation and also MENTAL isolation. It's very important to recognize the early signs of depression and to be proactive about fighting it - either by taking more breaks, finding more balance in life, or spending more time with others outside of work. There is always more work to do than hours in the day, so there's no point in grinding away non-stop and skipping opportunities to interact with others (you won't be THAT much more productive, and you'll be unhappier and more prone to bust). Also, you shouldn't expect to view research as 'fun' like you view your recreational activities as 'fun' - research is difficult, frustrating, and mentally and emotionally taxing, but it can be 'rewarding' in the end when you have a feeling of true accomplishment that you did good work (that's where the 'fun' comes in), but that kind of 'rewarding fun' should not be confused with 'recreational fun'. Research is inherently difficult - otherwise it wouldn't be research. The fun comes in the reward of knowing that you were able to accomplish something interesting and new, even if it's marginally new and a small incremental improvements over the existing state-of-the-art, and of being credited for your work and being able to give talks about your work to publicize it. But before you can talk about your work, you need to actually do it, and that takes tremendous amounts of manual labor which you need to be willing to put in the time to perform.
I feel fortunate to have a great support net around me right now, perhaps the best I can hope for, in terms of significant other, friends, and family. If I were facing these same challenges in my research alone, I would be in much worse emotional shape. There were nights that I felt frustrated and depressed, but I never withdrew from my support network, which I felt was a good thing because withdrawing from others is a sign that something is really wrong. I honestly never thought that grad student depression would hit me until well into my 2nd or 3rd years (after all, 1st-years are supposed to be cheery and idealistic), but it hit me last month - January 2007 - out of nowhere. I am grateful that it didn't spiral out of control this time, and I am learning to cope with it better every day (things could have been a lot worse).
The first 5 weeks of this quarter have been filled with ups and downs, mostly downs, and I really hope the next 5 weeks will be better - I really want to work hard and am willing to, but as long as I have focus and direction and don't feel lost like I did in the previous 5 weeks, I will be happier.
End: 2:03 AM
Reflections: Seven Years Later
Ha, the next five weeks definitely weren't better! All of that useless grinding culminated in a horrendous paper deadline where we submitted an incomprehensible jumble of text littered with figures without captions and lacking a conclusion. To top it off, I pulled a few all-nighters sleeping in the office and even broke my glasses on the last day. Uh, yeah.
It's easy for me to look back now in hindsight and chuckle, but back then I felt horrible. Things didn't start getting better until three years later (Year 4: Reboot). It took me a long time to figure out how to thrive in grad school, much longer than some of my peers.
The prospect of my own future grad students suffering so much really terrifies me. At the same time, though, I know that there is a lot of struggle inherent in the Ph.D. experience – the growing pains of transitioning from a test-taking undergrad to an independent researcher. There is only so much an advisor can do to shield their students from these feelings of frustration.
So what can I do to help my own future students avoid unnecessary pain, especially during their early years? I don't have any clear answers, but here are some initial ideas:
Finally, note that this journal entry describes one specific scenario: a first-year grad student grinding on one small part of their advisor's existing project. One trite suggestion is to just let the first-year student create their own project so that they are more intrinsically motivated. Doing so sounds nice in theory but creates its own problems, many of which I experienced firsthand later in my first year when I quit my advisor's project and tried creating my own. These problems all stem from the fact that first-year students are simply not yet ready to create and implement meaningful research ideas on their own (see the last part of Year 1: Downfall). They are not yet at the frontier of knowledge in the field, so attempts to innovate are often futile and angst-inducing.
But at this point, I still have way more questions than answers.