benjamin.computer

How to PhD, probably.

14-05-2023

So a couple of months ago, I managed to (almost) complete my Doctorate in Philosophy, get my PhD and move on to pastures new. Technically, I still have corrections to make - the most common outcome I'm told, but there won't be any more science-ing to do. The corrections are pretty minor so it's just tidy-up to go. It's been a long 4 and a bit years - I can't really remember the early days anymore. So much has happened since 2018, to all of us really. I figured it was time to write it down, maybe offer some advice to a few PhD students out there, if my ramblings are indeed any sort of advice. It seems hard to know where to start I suppose? Perhaps the beginning.

Prelude

An A.I. generated scene
A pretty A.I generated scene to kick things off.

This is my second attempt at a PhD. The first time around, I failed pretty badly. I was, I realise now, too young and not in the right frame of mind. I made the wrong choice in starting a PhD at that time - I was only 21 as I recall. I never really put the hours in, nor was I taken with the project I found myself on. I felt forced to take that option and it cost me (and others). Sometimes, it's fine to put off opportunities if they don't feel right. I thought I wanted to be a scientist, but I wasn't ready for reality.

Choosing a project

Fast forward almost two decades. An opportunity appeared, over Twitter of all things, to join a PhD program - the London Interdisciplinary Doctoral Award (LIDO). This is possibly the only time Twitter has been of any use to me. At the time, I was living in the USA and hating every minute of it. Weary of my previous mistakes I decided I would speak to a many of the researchers offering PhD positions as I could. Rather than just accept the first offer, I chatted online with several different research groups about their projects, writing down everything I learned. I talked over each one with my partner to get a real sense of who I could work with, which projects I could tackle and which sounded the most interesting. This is perhaps the biggest difference between my second attempt and the first. I think it really pays to not only be interested in your topic, but to be able to work with your supervisors.

The first year

The first year is all about finding your feet I think - getting to know your topic, your supervisors and your colleagues. I looked back over the code I wrote and winced a little bit. I know everyone does this - from artists to engineers - but it is interesting to see the ideas that started and then were never continued. I suppose, in the end, there are lots of dead-ends - things that are tried and didn't work. That's part of the deal - we have no idea what might work. I guess that's science at the end of the day.

I decided I would keep a diary as I progressed through. I'd write down the key points of the day - things that worked and things that didn't. I would refer back to the diary reasonably often, though perhaps not as often as I should have. Some disciplines, such as genetics and biology more broadly, have 'lab records'. I'd sort of adopted this approach without knowing it. In addition, all of my A.I. experiments had short notes and dates attached, which really did help when it came to writing the thesis 3 years later. Good record keeping is a must.

The difficult middle period

CEP152
The model of a CEP152 based protein complex my A.I. came up with. My thesis revolves around the question: given enough 2D views of a tiny biological structure, can an A.I. come up with the 3D structure that best fits the data?

The second and third years (if you are on a 4 year PhD program as I was) are the most difficult. This was made doubly so by the global pandemic that landed right in the middle of my studies. It's this time where the majority of the research takes place. Promising routes begin to show themselves, but also complete reversals and changes in topic might occur. It might be that something really interesting is happening over behind that distant hill you couldn't see before - maybe striking after that will bear bigger fruit? It's this time where one's confidence begins to grow.

Keeping a balance between writing code and reading I found tricky. It's much easier, for me at least, to bash out code for what I think is the right problem only to find out later that someone already found out that this road was useless - and had written a paper about it which I had not read. I quite enjoy reading, but academic papers can be really hard going sometimes. Not only that, but finding supporting code and the data is often more tricky than it really should be. But don't be like me and not read enough.

That thing what happened

The global pandemic - yeah. That really threw everything side-ways for sure. I remember having to leave London for Scotland in a bit of a panic. My wife was up in St Andrews and I needed to get up there before the lockdown was to begin. No-one quite knew when it was going to happen but the rumours were it was going to be in a few days. My internet had broken at the flat and there was no chance of getting it fixed by then. I had to setup wireguard over a 4G link using a router my supervisor kindly paid for. I remember working quite hard at getting OpenVPN to work and failing. I lashed the router to the back door of the kitchen where the signal was strongest, trailing power and ethernet cables across the floor. I setup a webcam to watch the flat, leaving my A.I. box in the basement on a delicate tether to the outside world. Surprisingly, this worked quite well for a good few months. I could submit jobs, provided they didn't need too much data, getting the results back when the runs had finished. Thanks to a bit of help from my boss and a lot of I.T. know-how I managed to get through.

My supervisors were super helpful - I managed to get a funded extension for 3 months due to the Covid impact. Apparently, I was the easy one to take care of. I heard rumours of some proper horrific scenarios with other students. I consider myself extremely fortunate to have made it through.

It was a tougher time for these students who were lab based I believe. I know of a few folks who had to change course in their research because of the pandemic. It doesn't sound like much compared to the many deaths that occurred I realise, but then Covid affected everything in many different ways - this is just one of them. No point in comparing I suppose. For me though, I think the biggest problem was being cut-off from other folks doing similar work to me. Computer science, software engineering types are not super common in biology departments, especially these looking into A.I. It might be more common now, but at the time, the folks doing similar things to me were scattered across all the London universities - from the School of Hygiene and Tropical Medicine to the Royal Veterinary College. It was hard enough to find my people - Covid pretty much stopped it.

I'd say that finding your compatriots - folks who know what you are doing and are in the same boat as you - is one of the keys to success. Having that support, and being supportive is key. Take the time to go to seminars but if they suck, find others. Don't settle for what is organised and handed out but do try these things. A good bit of Espirit des Corps goes a long way.

Disagreements

It's said that at some point in your work, you will begin to know more about your topic than your supervisors. Around this point you may get drawn into conflict. Annoyingly, it feels a bit like being a teenager again, arguing with your parents - asserting your independence. Around this time I had a big blowout with my supervisors around whether or not I was actually doing good science, or just being a programmer for hire on the cheap. It wasn't pleasant, and it's one of these things I sort of regret. Nevertheless, it happened and hopefully, we'll all be better off in the end.

I found that having access to independent support was key. At King's College London (and other universities I believe) you have a couple of advisors, who check on your progress and are not directly invested in your work. Their goal is to support you through the PhD process in a neutral capacity, checking in with you privately, and with your supervisors to make sure everything is going well. In addition, there is a student support officer who you can turn to if you have specific problems, be they mental health issues, troubles with your supervisors, concerns with funding - any sort of problem. I found both groups to be incredibly helpful and I'd advise any student having troubles to get in touch with any and all support groups you can. Speaking of....

Mental Health

Hard to swallow pills
I think we all felt a bit this way during lockdown! An A.I. style transfer of a cosplay photograph of me as the Harrier duBois from Disco Elysium.

I suspect everyone's mental health took a tumble during the pandemic, but even if there isn't a world ending scenario knocking at your door, it's not uncommon for PhD students to suffer from some form of mental health trouble. This report in nature seems to support this claim. I know I certainly felt depressed and anxious many times through-out the process. I had, admittedly, a lot of baggage from failing the first time around. Nevertheless, I was helped through the process by my wife, Katie - on that point it's important to note that doing a PhD will affect any partners, close friends or family you have in your life. I was very lucky to have excellent support - I couldn't have gotten through otherwise. Of course, any serious, difficult undertaking will have this element; athletes training for months and years for a big event, a game developer releasing their first indie title - the list goes on.

At one point in the second year, I discussed quitting with my supervisors, largely because I was super unhappy with how the project was going - I didn't think it would benefit anyone, even me. In hindsight I was in a difficult spot mentally and was expecting much more from the process. I took some time off to think things over - in fact looking at my diary I found a number of days where I couldn't bring myself to work.

Despite that though, I think there is something unique about the PhD process and science in general - we are stepping out into the unknown, if only a little. Our modern world, with it's intense schooling leads us, I think, into thinking that someone else has the answers. Years later, when I write code I often think 'Ah, someone else will have written a similar thing, I can check against that'. When doing science properly, there is no teacher holding the answer sheet, just guides on the path. No wonder then, that anxiety is common.

It could also be the belief that you have to cloister yourself away and make the big brain breakthrough on your own, and if you somehow don't manage it, you are a failure. The scene of the lone genius, burning the midnight oil, slaving away for days on end without speaking to anyone. I think this model is not only unhelpful, but inaccurate; dare-I-say, bad science. Sure, you are becoming the expert in this narrow field, but the process is a collaborative one. Perhaps perceptions need to be changed and from that, the formal process? One antidote is publishing...

Publishing

There's a saying in Academia - 'publish or perish'. I won't go too deep into this topic - it's big enough on it's own and the book Science Fictions does a very good job of covering it. Regardless, Science is most definitely a collective effort. The idea that the lone scientist or PhD student makes a breakthrough thanks to their genius alone is utter bobbins! Science works through (among other things) verification and reproducibility. This is the major cornerstone of the endeavour (more on this later). Publishing your work improves your work. Theories must be tested. It can be a rough experience, getting your work out there. You have to be prepared for a grilling, but with any luck it will be meant well. Humans are humans after-all and sometimes, you can can get a difficult reviewer; in fact it's well known in science that reviewer 2 is always a complete bastard! Despite all this, I insisted on publishing our work towards the end of year two.

When I attempted my PhD the first time around, it was said a PhD student should be writing one paper a year. This is apparently not the case anymore. I think computer science tends to do things a bit differently to the other sciences, with more of an emphasis on conference papers. Perhaps it was true back then but less so now? Eitherway, when I mentioned this to my supervisors they thought I was mad! Nevertheless, I would say to any student that they should publish at least once, to get a handle on this important process.

Tools wise, I got the university to pay for an Overleaf subscription. This online service removes the nasty parts of LaTeX and makes it considerably easy to share edits and work with others on getting a paper together. Zotero is another excellent tool for managing papers and citations. Finally, I used a lot of Python graphing libraries such as seaborn and bokeh.

Scientific writing is a specialist skill, requiring particular language styles, forming a tight argument that can be easily understood. I found that getting some writing support from the University along with reading some books on basic grammar really helped.

The finish line - writing up.

Hard to swallow pills
Hard to Swallow Pills indeed!

I gave myself 6 months to write up, more or less. The paper formed one chapter of the thesis, so I'd already gotten out ahead. The hardest part is stopping going down different paths. You think to yourself 'if I just try this other idea I'll make a breakthrough' or 'what about that loose end from 2 years back?'. It can be really hard to just stop and write. Six months was about right for me. Of course, there are still a few experiments that need to be tied up, a few more papers to read, but half of my time was fully turned over to writing.

I imagine there is quite a lot of advice out there for thesis writing. I approached things a little chronologically, which is perhaps not the best approach. Better to form a concise argument and how it all fits together rather than 'I tried this, then I tried that' - the pieces have to link up. I just about managed it, but it's the hardest bit of writing.

The first half of the thesis turned out to be much stronger than the latter half I thought, mostly as this section was formed of the paper and introduction, and so had had the most scrutiny. The second half was a bit disappointing in comparison I thought - more exploratory and without a keen conclusion. Still, it all came together and formed a cohesive narrative and a convincing argument. Many things didn't make it in, but that's okay in the end. Most pieces of writing need a good edit and trim down.

The Viva

Working away in Scotland
Working away in Scotland, with the ever looming horror!

Lots of students, me included, really dread this step. The first time I attempted it, I had a terrible experience. It went on for hours and by the end, I was destroyed. However, I believe this is not the norm. There is a lot of support throughout the three or four years of the PhD these days and it keeps one on track; supervisors won't put you in for a viva if they don't think you are ready.

Ironically, I wish I'd had more discussions like my recent viva, through-out my thesis! It turned out to be a great time! I did mine online, as I live in Scotland and my examiners were down in London. My viva lasted for about 3 hours as I recall. It was a great time. I'd scoffed at folks saying 'enjoy it' but I really did!

I think there are some tips that help going in though. Firstly, re-read your thesis. Sounds obvious but it's really good to have it fresh in your mind. Secondly, I'd take some notes around the following key questions:

There are likely a few more questions you can ask yourself, depending on the field you are in, but what the examiners are looking for is a tight, scientific argument - a story that makes sense. Your work should be another brick in the wall of knowledge.

But yes, the Viva turned out to be loads of fun!

Philosophy

My thinking about science has changed quite a bit over the years. When I was young, I really didn't know what it meant to be scientist - to quest after objective truth, seek the laws of the natural world or seeing the universe on its terms. During my first year, I started reading a little bit more around the Philosophy of Science. I was surprised that there was no required reading, or training on this point. You'd think that any aspiring scientist should be familiar with the philosophical (and historical) underpinnings of the scientific method (arguably, there is no such thing depending on which philosopher you agree with, biut that's another story). To my shame, I haven't read enough - something I'll rectify - but I am surprised that this never really came up.

Is a PhD a job?

Short answer? Yes. However the devil is in the details really, and when we dig a bit, we find some interesting things.

I got into an annoying argument online (like an idiot) with a chap over at Glasgow University (you know who you are), who argued that a PhD was not a job. I stated that a job is work that you do and are paid for with an expectation of a return - that work is time and energy spent on an activity with an outcome. By this definition, a PhD is a job, but why then do we call PhD students students? Why do they not pay tax like other employed folks?

Interestingly, many of the countries in the EU do class PhD students as employees. They are expected to perform some duties such as marking, a little teaching and some other bits of admin. But then, I did this during my PhD too. For the most part, I was behind a desk, writing code, moving data around, in order to do science. The outcome would be a contribution to knowledge in the form of a paper and a thesis. I am indeed expected to write a thesis. Right at the beginning of the course, I was told in very strong terms to submit by the deadline. What is that, if not a thing I'm paid to do?

I treated my PhD like a job - I tried to be as professional as I could be. I put in the hours, even kept a timer! I'd recommend any student treat their project this way and I suspect most do. So why then, in the UK do we insist PhD students are students? Why do we give them a stipend and not a wage? If there is no practical difference, why this arbitrary nonsense?

Some say, it's because we are in training. I have a problem with this though - I don't feel I received that much direct training, or rather, not any more than I'd receive in a normal job. When I started the PhD I was expected to have some initial skills, such as programming, statistics, software engineering and knowledge of biology. The rest, I would learn as I went. There were a few courses I needed to do but overall, it wasn't too dissimilar to other jobs I've had. I'm sure most employees get some training, even if it's just knowledge handed down from these with more experience. This seemed to me, how the PhD worked. Besides, a researcher is a paid job title we all pretty much accept.

Is it to do with science being a calling? Something bigger than yourself, rather than something you do just to put food on the table? Perhaps, but we are getting into subjective realms of opinion here. As previously mentioned, I do indeed believe Science is a noble cause, but then, there are many jobs that folks really believe in - that are bigger than they are. Being a PhD student is far from the only way to feel some sense of purpose. Perhaps the word job is so loaded with ideas of drudgery in our culture that to suggest a PhD is a job is seen as some sort of problem. Perhaps most people do view jobs this way and you are extremely lucky to feel otherwise? Do a job you love and you'll never work again.

But perhaps the main reason is simply tradition? I don't mind a bit of tradition here and there really. But I wonder if the model of the genius student, begging to study at the feet at the undisputed master of a particular field, being thrown pennies by the beneficence of their institution might not be one we need going forward? Science could well do to move away from this model and I think it is doing, albeit slowly.

Being a mature student

When I turned up at the first induction event, I was clearly the oldest person there (I reckon, I can't be sure). Most folks don't get the chance to work on a PhD at a later time in life, particularly in the sciences. I'm probably a bit slower and not as energetic as I was the first time around, but my attitude has certainly changed. A dose of maturity and a bit more emotional intelligence helped considerably. I set out to do things very differently the second time around.

My circumstances will be somewhat unique, so it's hard to say if doing a PhD in the sciences at a later age is a good career move or not. Indeed, I started my research when I was living in the USA, denied by law from earning a living (even money earned outside of the USA, believe it or not). There is a feeling of needing to do a little catch up, but perhaps that's not really accurate or helpful.

I suppose the biggest difference is the one mentioned previously - finding folks you can get along with, for mutual support?

Skepticism

Now that it's (almost) all done, I still wonder if it was worth it? I've made some contribution but I have many concerns. Is there any of me in this work? Will anyone really care about this result? Will anyone use the code and tools I wrote? Have I come away with any new skills or new code I can use elsewhere? Honestly, I really don't know.

I'm also a bit more skeptical about the whole process of science. There's a bit of a culture war thing going on at the moment; lots of instances of 'objective' and 'subjectivity' in the discourse. The classic "We've had enough of experts" line, the reproducibility crisis, 5G mast burning and the turning away from rationality. I do worry that science has been turned into a new religion by some - these folks in their high towers with their fancy words they use to get us to shutup!. Most of the scientists I've met really aren't like that. What I think is happening is that folks get quite emotionally attached to their positions, especially right now where the science around things such as climate change and mass extinction correlate with some deep feelings and beliefs.

I'm not sure I can always separate these things out; science isn't about being comforting, or to be used as a stick to beat people with. I've certainly made a few mistakes along these lines in my time. It's almost as if to be the perfect scientist, you need to completely remove yourself from the equation - no ego, no fears, no desires. Totally objective. It's pretty much impossible. But still folks try - kind of honourable really.

Hope

In the early days, I thought I'd come out of the PhD as some superstar scientist. As the years went on, I wondered if I'd ever make it? At the end I wanted it to be over - I really hated it! Sticking it out, and coming towards the end though, I realised that it's more of a beginning, rather than an end goal in-of-itself. I've come away thinking quite differently about science and how it's done. That's no bad thing in the end. A bit more humble, a bit more confident. There's a big wide universe to go and have a look at.

Epilogue

This is the longest I've gone between blog-posts - that shows you how intense it's been over the last few months! As of now, I'm writing my corrections while working at the Sea Mammal Research Unit at St Andrew's University, looking for Seals with A.I. I've gone back more towards engineering than the science, but the things I build go towards positive ends.


benjamin.computer