Cover image
Brian T. Liao
Dec 2, 2020 • 19 min read

Completing a 5th Year Masters in Computer Science at UC Berkeley

An Iconic Grad Photo. This actually is from undergrad, but I just found it and it’s iconic so here it is.

Hey! So I wrote an undergrad writeup on my blog and decided since I finished graduate school, it would be good to add a write up on it as well! Hopefully this has a wealth of information here that will be helpful to people in the future.

I did a 5th year masters in Electrical Engineering and Computer Science at UC Berkeley. This is a program for computer science and EECS majors to do research, take grad courses, and earn their masters in 1 year. I actually did my undergrad in 2 years, so this was actually a 3rd year masters. I had planned on graduating in 2 years, and thought that would be fast, so I wanted to do this program and stay in college one final year. It actually was common for 5th years to do it in their 4th years, since CS requirements are so light.

I was actually deeply inspired by this blog post by another 5th year masters so check his post out!

Application

Undergraduate Berkeley CS students have asked me about this program, expressing their interesting in applying, so this information might be useful for future CS students interested.

First the requirements to apply are listed here. They are:

I had done undergrad research experience with Professor Kris Pister, so I expressed my interest in doing this program to him and asked if he would be my advisor, which he accepted.

The truth is, for the 5th year masters, the main factor in if you will be accepted is if you had research experience and a relationship with a professor before. If a professor is willing to advise you, chances are, you will be accepted. The acceptance rate for my year was 80% and the yield rate (people accepted who do the program) was 95%. This means the people who do this program are very self selective.

I recommend people interested in this program to seek research experience early! I emailed a lot of professors, and got this position when Kris made a Piazza post of EECS 101 looking for an undergrad to work on a computer vision drone tracking project. I was the first person to apply and got the position.

One question I get a lot is if I should do it if I’m intersted in doing a PhD. While the program administration will tell you no, I have seen a lot of past 5th year masters do great research in their 5th year and go on to other PhD programs at Stanford and CMU and continue to do even greater research there. I would recommend it. The administration will warn you that it will be a lot of time (1 + 5 years), but from what I’ve seen, it has worked well for those students, so I would still recommend it.

For my statement of purpose, I wrote about my interest in computer vision, as it was a really exciting field when deep learning started to work really really well. Before then, computer vision was an unsolved problem.

Additionally, I wrote about my experience working in the Swarm Lab with Kris Pister and developing efficient computer vision algorithms that would hopefully be able to detect drones and create networks of mini-drones that could all feed location and visual information to each other like bees. It was a cool project but didn’t go anywhere unfortunately.

For my personal history, I wrote about my experience at Berkeley and growing up in Washington in the area around Microsoft and seeing technology grow. One part of my experience in Berkeley I wrote about, was the disconnect between how it was easy to feel people were so much better than me since you would only see the best parts of people. It was easy to project the sum of everyone’s best parts into a lifestyle that would be unrealistic for anybody. I talked about how this was a common experience for Berkeley students as seen in the meme page, as depression and struggle was a common theme there. Overall, these experiences shaped me into who I am today, someone who has learned to focus on creating and improving myself to be the best I can be, and to make peace with myself, as we only see what the glamorous parts they show out and not the full picture.

For letters of recommendation, I had my advisor Kris Pister and my manager and mentor from an internship. I actually planned far in advance for getting an internship, so I would have those two letters of recommendation, and would be able to apply to this program.

For GPA, when I applied to the program, my GPA was around a 3.6. I have noticed other 5th year masters’ GPA tended to be much higher and they were way smarter, so I’d just like to leave a note, if your GPA is kind of low, this program is hard. It’s not impossible but requires a lot of hard work and learning to succeed.

With all that, I submitted my application and after months and months of waiting I got in!

Research

The largest component of your 5th year masters is your research. Following my work on efficient computer vision algorithms for drones, Kris and I decided to double down and focus on what are the limits of computation in neural networks? Kris Pister’s research interests are in micro-robots and he was was curious if modern computer vision techniques could help micro robots see and sense in their environment? I was interest as well, and we set the goal of finding neural network architectures suitable for microrobots with a goal of less than 1 µJ per forward-pass. This is tiny! Kris’ lab had been developing SCµM, a really tiny chip that could process at 1 µJ and he was hopeful this, combined with a tiny 128x128 ultra low power camera and a micro robot walker and my new neural network architecture, could push autonomy forward in micro-robots.

A micro-robot walker, the SCµM chip, and a 128x128 camera.

Research in graduate school is quite challenging. It is a very different ball game than classes. Classes are sort of structured and spoon fed, where each step of the way there is direction and clear objectives to hit. There are weekly homeworks and monthly projects as well as 2 midterms and a final that guide you on what to learn and do.

In research, I was on the forefront of human knowledge, and I had to push it a little bit further. Nobody has ever created neural networks to run at this low of power performance. We didn’t even know if it was possible but we wanted to find out. I felt lost and alone, and I was unsure how to conduct research independently, where I should spend my time, what papers I should read, and how I could approach or attack such a problem.

For the few months of my research experience, I would spend time on different approaches and ways of attack. Some ideas I had were using FireSim to write a neural network in digital hardware, creating the neural network in analog hardware, and creating very simple neural networks with fully connected layers and recurrent layers that would be small enough to fit our power constraints. These approaches weren’t working and I was frustrated.

I expressed my frustration to my housemate, and he suggested bringing this up to my advisor and asking for more help. Before, I had attended the group sessions and gave my weekly updates, but our lab group and my advisor’s focus was on EE and micro-electronics rather than the algorithms and architecture of neural networks. I brought up these concerns to my advisor and he set up a weekly one-on-one with me, him, and another 5th year masters doing efficient computer vision algorithms. My experience did slowly improve from here.

My three big takeaways from this research experience are:

  1. Ask for Help
    • There was no way I would succeed in research without asking for help. Asking for help from my advisor was one part and he was able to help guide high level direction that I would have to learn myself. I also reached out to other PhD students, 5th year masters students, and other professors in order to succeed. It was also helpful to go to EECS peers, where you could see shared struggle with other graduate students, and a psychologist from the Tang center. It was comforting to talk and have them listen and there’s no shame in it.
  2. Learn to Teach Yourself
    • Since research is so independent and there’s no nice classes to teach you this material, learning to teach yourself and read papers is super important. What I eventually learned was to start writing my own textbooks and notes. I wrote a large LaTeX textbook containing everything I learned and papers I read. Another good trick is to use YouTube! The machine learning is pretty popular so there are good videos that explain papers in more digestible ways. Here’s an example for SqueezeNet and EfficientNet.
  3. Keep your Head up and Keep Pushing on
    • Graduate school was only a year for me thankfully, but the best thing to do is focus, see what needs to be done and do everything one step at a time. Breaking things apart into smaller manageable chunks makes it easier to do. Through all my work throughout the year I was able to publish a paper, file a thesis, and graduate!

Technical Overview

The quick overview of my research is I created a neural network architecture that could do image classification with less than 1 µJ of energy. This could be used in microrobots and the neural network could be refitted for localization and detection. Neural Network efficiency is measured in MACs, multiply-and-accumulate operations, where our network does only 740,000 MACs. For comparison the already low power architectures like MobileNet do 3.5 million MACs and SqueezeNet does 24 million MACs. These may be suitable for smartphones but not a microrobot the size of a penny.

To achieve this efficiency, we apply three techniques: fast downsampling, adapted MobileNet V3 architecture, and trained ternary quantization.

Fast Downsampling

Fast Downsampling, downsamples the convolutions (decreases the width) early in the neural network and increases the number of small convolutions later in the network to compensate.

The MobileNet V3 architecture was used as the frame for our model. It includes neat architecture performance optimizations such as Inverted Residuals with Linear Bottlenecks, Squeeze and Excitation, and H-Swish activation functions.

Inverted Residuals with Linear Bottlenecks

Inverted Residuals with Linear Bottlenecks basically transforms convolutions into three steps of expand, depthwise and compress. This keeps the input tensor small but able to filter the data with a larger convolution and shrink it again, saving a lot of computation and multiplications. Squeeze and Excite and H-Swish are similar neat optimizations so check the paper if you want to learn more!

Trained Ternary Quantization of my neural network!

Finally my favorite trick, Trained Ternary Quantization! Ternary Quantization is turning a weight into 0, 1, or -1. It turns out you can make really effective filters with just these super efficient weights!

Looking at the Kernels you can actually build effective filters with just these three weights! It’s pretty wild to look at and think about.

Using these three techniques, I created MicroBotNet, a neural network that could do image classification with only 740,000 MACs and 1 µJ, an order of magnitude smaller than anything that had been done before. On CIFAR-10, we achieved 80.47% accuracy, which isn’t that impressive anymore, but it’s pretty impressive for only 740,000 MACs. For comparison, MobileNet achieved 85.87% accuracy with 3,500,000 MACs.

One final resource I found for those interest in doing research is CS298 Research Culture And Community Norms, which just has a wealth of information on the research and graduate school experience and overcoming these challenges.

Classes

I thought the system I used for evaluating undergraduate classes was funny and clever so I will do it again. Maybe I’ll create a YouTube video like Caitlyn Chen and Nina Wang.

Rating Emoji
5 😁
4 🙂
3 😐
2 😫
1 😭

Fall 2019

Class Name Units Difficulty Enjoyment
CS 249A: Embedded Systems 4 🙂 🙂
UGBA 155: Leadership 3 😁 🙂
UGBA 195A: Entrepreneurship 3 🙂 😐
INDENG 198: Off the Record 1 😁 😁
EE 299: Research 3 😐 😐

I did a pretty neat thing that semester, I was in a Entrepreneurship class and could learn to handle the business side, I was in a Leadership class and could learn to lead a team, and I was in my first graduate level CS class, Embedded Systems, and could build the product!

I actually did this! In Entrepreneurship, we had an idea for a self sorting trash can, and we actually built it in the Embedded systems class!

I enjoy the leadership class, while felt the entrepreneurship class is ok. It isn’t hard but it’s pretty basic. However I had to learn to work in a team for the semester, and that’s a very useful skill for the real world.

Off the Record is one of the coolest classes I’ve taken. It was a small group of students like 14 and we got to meet and listen to entrepreneurs talk about their startup experience and candidly and what they wouldn’t be able to say in public. There was a lot of amazing information there and made me interested in entrepreneurship.

Spring 2020

Class Name Units Difficulty Enjoyment
CS 200A: Data Science 4 🙂 😁
CS 282A: Deep Learning 3 😐 🙂
UGBA 190T: Creativity Lab 2 😁 😁
EE 299: Research 3 😐 🙂

This semester was more technical heavy and I was now in full swing for research. Research was much better this semester, I had a direction and knew approaches to succeed in this role. Data Science, in my opinion, is a really fun class. I learned so many practical skills such as using Pandas and Seaborn. Some people don’t like it because it’s not intellectually challenging enough, but I enjoyed it. Deep Learning was a neat class to learn, but felt really poorly run. The material is so new and the support is just not there yet, especially for homeworks. The exams feel the same way, it’s hard to study because the information isn’t solidified yet. Regardless, deep learning is eating the world and transformers are all you need.

The Creativity Lab was one recommended by a friend, and it’s a great class that I would recommend too. If we look at life as an optimization problem (I would only do this lightly, there’s so much more to life than this), so many people get stuck in a local optima, work, home, sleep. We lose what gave us so much joy as kids. The creativity lab was a chance to step back and just draw, make music, do yoga. An opportunity to try something you’ve never done before, and not say I’m afraid to be bad, but I’m excited to try. That is incredibly important in business and generates so much value in the long run. It’s hard, we all feel like we’ll suck and never take the first step, but this class taught me it’s ok to take the first step and be bad, because that is the first step to being good. I actually started learning guitar and Korean after graduation because of this class!

Social Life

I think this year I did find a group that I did fit in with. Freshman year and Sophomore year in CZ, I was a bit of a wallflower, sort of just being there. I would hang out, but I did spend a lot of time alone, and I still did this year. However, my friend Vera from CS 162 invited a bunch of friends hiking early in the year and we had a blast. We continued to stay in touch and do things like board games, Corgi Con, exploring San Francisco, and even traveling to Japan!

Corgi Con

Kyoto

Your Name!

I swear I’m not a weeb

Overall, it was a really fun-filled semester. I made many good friends and even after graduation still stay in touch with them. I also make the practice to reach out to more people, it just increases the opportunity for a great new friendship!

Graduate School vs Undergraduate

If I were to compare all three years of college, this would be my favorite year. I really enjoyed the friends I met and spent time with. The requirements for the 5th year master gave you a lot of flexibility, which I felt was a fair balance between research, technical classes, breadth classes, and personal time.

If I were to compare my graduate school experience to undergraduate, I would say individuality and self-accountability are the biggest differences. Undergraduate was a constant rush of classes and assignments to finish. Graduate, the GPA curve is higher at 3.5, and classes aren’t assignment heavy but more project and research heavy. To succeed in graduate school, you have to keep yourself accountable and figure out what are the papers I need to read, the work and experiments I need to do, the people I need to ask and communicate with. Now working for a few months, this experience is a lot like the real world, where problems are identified, but the solutions have to be scoped, researched, solved, and communicated to stakeholders clearly where you take lead.

Would I recommend the 5th year masters? I think for specific people that know they really want to do it, yes. It’s very challenging but a fulfilling experience where I learned skills for doing research, skills for dealing with individual responsibility, and skills for dealing with ambiguity. These have been very useful in dealing with my career and growing as an adult.

Post by: Brian T. Liao