AI, Misc

How I went from a Neuroscientist to an AI practitioner – Part I

Reading Time: 5 minutes

Career change is often thought of as a tough act to pull off. It is especially difficult to transition from a highly specialize field to another. However, everything happened for a reason, whether you know it or not. I started college as a computer science major for about a year, then I was forced to change to Biology, due the Dot Com bubble around the year of 2001. My parent heard the news that internet companies fell one-by-one. And they thought my computer science is not a traditional, stable career path to follow. (Of course they were proven wrong many years later).

When I go home for the summer, my parents and I had a talk. And they convinced me that I should change my major to Biology and possibly becoming a doctor. At that time, I was weak-minded, and didn’t want to displease my parents. And the fact that my college room and board was paid by my parents didn’t help. I reluctantly changed my major and started taking biology related class. I didn’t waist too much time since I took some AP class in high school and was able to test out of Chem 101 and Physic 101. I have to say that Biology was not something I hate. In fact, it was my best interest before my dad bought a computer when I was 11. So, I chucked along with the courses. Got my fair share of As and Bs, and of course, a bad grad for Organic Chemistry.

Bioinformatics was a hot topic at the time. With my limited programming skills, I was able to get a fellowship in computational biology from Howard Hughes Medical Institute. With a few classes in protein folding and predicting tertiary structure from protein sequence, I learned the basic knowledge to BS my way through college. Then I met my undergraduate advisor, who is interested in programming and nifty projects. We painted the rat’s paws with colored markers and videotaped their footsteps through Plexiglas from underneath. We wrote a C++ plugin in iMovie that tracked the footsteps and how faster they turned following various experiments. It was a blast working with him and it seemed like a fun project for him. I wrote my undergraduate thesis on the topic, although it seems like unpublishable junk looking at it now.

Then it’s time to prepare for the dreaded MCAT. I knew I wasn’t going to study enough on my own, so I paid a hefty amount to join a prep class. The teacher is a current Med school student that got a good score. He showed us how to prepare and do practice tests. But he also said Med school is not for everyone because he constantly practices involuntary fasting and became an insomniac. I did as many practice test as I could, but because I was not enthusiast about it, I didn’t get a good score. The eight-hour test was not that bad, as I had those tests then I was in China, as middle schooler. It was good enough for me to get into a D.O. school, but didn’t want to be a primary doctor. The chance of specialize in Radiology or Neurology was below 10%. And it was not good enough for me get a M.D. I later found out that being Asian did not help either. I wasn’t going to be one of those Hispanic female applicants who got in with a 21 on MCAT.

I wasn’t disappointed when I found out I don’t have much of a chance with a dismal 27 on MCAT.  I was lost for a while. I got a simple gross room processing job at a pathology lab, then applied for graduate school. With my research background in college and honor with undergraduate thesis, it wasn’t too hard to get offers from multiple schools. It was years later I found out there is a good reason for those programs to offer stipend, because there is no job prospect even with a Ph.D. So, then I choose the best state school I can get into and started the long, long journey of graduate school.  Without too much detail here, I suffered through 7 years of graduate school, with many sleepless nights, and got my degree. I did learn a lot of things during that period, mostly built my resilient character, but also learned what hell was like. Perhaps it wasn’t like hell physically, but it was definitely mental hell.

With no marketable skill outside of rat brain and spinal cord surgery, my only choice was to become a postdoc and give a shot at becoming a faculty. There were two ways of finding such jobs. One is to send CV (resume) to every professor who is trying to find a postdoc. The other is focus on the lab you like to join, and write custom, specific letter to the few labs you are looking for. I was told the second option is how you find jobs in the industry, and I know people who got jobs that way. So I tried that. I researched the hand-full of labs I want to go to, read their papers, and thought about specific experience I would like to try if I joined their lab. I asked other people to proofread my email. And… Nothing. No answer. No rejection emails.

So I was force to go to the first option. I send out as many applications I could. Finding every ad on Science, Nature, or any other journal or website I can get my hands on. Three people returned my email. One said her research area is too different. One was really nice and asked for a follow-up skype interview. And one asked for a phone interview. The second guy talked about his research and promised he was going to take me. He described the surrounding area and planned out where I can rent to be closest to the lab. Then no contact for a month. During this time, the third guy called. We talked about the projects I will be working on and asked about what I can do. He liked my surgical skills, and offered me a position the next day. He didn’t give me much time to think, so I talked to some friends and took the job. It was a world class institution, and I didn’t have much of a choice. Two days later, the second asked for another skype session, but had to reject. “Dude, where were you for a month?”

Arrived at a major metropolitan for my job, I started to experience some new things. The professor like my surgical skills and promised to help me publish some papers soon. I got to do a little more programming than my graduate work and learned more concepts about signal processing. I had to learn how to apply linear algebra and partial differential equations to solve research problems. This was beneficial for getting an AI career. Big data became the hot topic, and so did Neural Networks. People started talking about data scientist jobs and I started looking in that direction as well. I looked for various boot camps in my area and tried out the “free” ones. They are hard to get into and I either failed initial interview or didn’t pass the screening process. But I kept trying for 3 years.

One day, DeepMind published their paper on Alpha Go. It was amazing! I used to play Go as a child. Although I never even got to 1 Dan at the amateur level, I could beat the best computer simulation easily. I knew this is hard to program. So, when the paper came out, I was blown away, but skeptical. Of course, I didn’t know what a reinforcement network is and only pretend to understand how it work. Then they announced they are going to play with Lee Sedol, a top ranked player in the world. Nobody though they would win. I stayed up 3 am in the morning to watch all 5 games. When the first game finished, my mouth dropped. I know Lee didn’t have a chance. The fact that he won the 4th game was nothing less than miraculous, and shows Alpha go still had weaknesses.

This is the day I realized AI is the future. This is the day I decided I want to do this for the rest of my life …

Table Tennis

How to loop

Reading Time: 2 minutes

Although never continuous, I spend more than a decade playing table tennis. Until recently, I never cared too much about winning, and I always thought that’s the reason I always lose matches to the people I didn’t think was very good.

Then, last year I started to want to win and really started to watch everything single Youtube video I can find about Table Tennis. I keep hearing coaches talk about that I need to have sudden accelerations when hitting the ball to generate topspin. I always tried that first and the ball always fly too far away from the table. I spend about 6 month doing that, but the ball alway hit the edges of my paddle.

So I changed back to a more vertical paddle angle, just to reduced the number of times I miss the ball. Then one day, out the blue, started to hit the ball using bottom side of my paddle. The shot sounded more muffed, instead of my regular high pitch sound hits.

During the same time, I also started to use my waist and leg during my swing. It started with my leg pushing the ground, then my waist moves, and my arm moved last. I didn’t have to move my arm so actively, it as though my waist directed the who motion and dragged my arm.

Then I started to have larger range of motion on my wrist when I just about to hit the ball to create spin. That worked just a little better, but it’s hard to life my wrist hitting forehand. I started to use my forearm to mimic the same motion of my wrist, this seemed to be easier on my arm. One day during a match with a much bigger guy at the club, I actively try to have sudden movement in my forearm, just like when I try to serve underspins. Miraculously, I was able to create the slow, upward kind of loop consistently.

This worked, because as soon as the ball the other side of the table, it started to accelerate forward much faster than a normal hit. In another words, the exist angle is greater than the entry angle. This creates a lot of unpredictability for the opponent. Although slower than just a hard hit, this type of ball is hard to return.

Then I watched another Youtube video, that was trying to mimic how Ma Long does loops. After each swing, instead of swing his arm back to the original position, he let the arm drop naturally, swing the shoulder back, and lift arm slightly to get back to original position. This technique made the transition faster because it decreased the radius of the arm swing and therefore, faster. It also let the arm and shoulder rest momentarily between hits, ensure the athlete don’t get too tired after hitting many loops.

Learned how to loop also made my serves better, because using this sudden movement also increased the spin of my serves, as evidenced by the many aces I have playing at the club and the gym. Going ahead, I plan to improve the forward speed of my loop, and making it spinny and faster, and creating the ultimate weapon for winners.

AI

Intelligent search

Reading Time: 2 minutes

Recently, I started working on a business problem, where people want to search relevant material through many sources of documents by asking a question. This can be solved using model such as DrQA, with the data set similar to SQuAD. However, in order to use this model, the training data needs to be in question and answer pairs. This requires a lot of preprocessing to build up a good data set.

So the next thing we did is to use Solr to index the database first, creating links to the source and raw text of the source document. Searching by the question against the content of the Solr database, we first find the relevant document.

Once we find the relevant document, we first try to use machine comprehension function of AllenNLP to find the answer in the document. However, because AllenNLP use attention model, when the document is large ( > 90,000 characters), the model require too much memory.

So we tried Google’s Talk to Book approach. Using Universal Sentence Encoder by tensorflow, we separated the document into pages or paragraphs, and find the most similar page or paragraph to our question. This did not work because our question is in a question form and it is structurally different from the source document content. So we can either compare using a statement form to the document, or convert the document into many questions, and find which paragraph is the most similar to our question.

We tried the first option and used a statement to to find the most similar paragraph. It work fine and the 2nd most relevant answer was the one we are looking for. But from a user perspective, we cannot limit the user to not search in a question format. So we used Spacy and filtered out STOP WORDS, which include things like “what”, “how”, “do”, “I” and all the frequent words. This essentially turn question or statement into keywords we can use for search.

Another improvement we made was pulling top 3 most relevant document, parsed every paragraph from those documents and find the most relevant paragraph, regardless of where it came from. In this way, we able to rank the most relevant “paragraph” from multiple sources, and improve the search result as a whole.

Table Tennis

My journey in Table Tennis

Reading Time: 3 minutes

I first learned how to play table tennis when I was 6. My mom used to play when she was in elementary school, then in college. It was hard to find a table to play in China when I was little. We often sneak into my father’s work place, a table that was employee only. I started with pips and shake-hand. That was the most popular style in China at the time. And it was how my mom played, so that’s what she can teach me.

I started learning the Chinese style, which is hit forward rather than loop. Besides, my mom doesn’t know how to loop. Within a few years, I was pretty good at hitting forehand. Of course, my backhand was just pushing. Flip and hit is much harder, and shake-hand style for penhold was not invented yet. My main weapon was forehand, but always had trouble to defend loops. At that time, I was more interested in other things, like pool. I would often skip table tennis and go play pool in the next room.

After I can to United States and started college, I found a group students and alumni who are passionate about table tennis. I started going to practice regularly, twice a week. I started going to collegiate and USATT tournaments, but I lost more than I won at Team B level, and have a rating of lower than 1200. I never got much better than when I was a 13 year old kid in China. It’s mostly because I just want to exercise and socialize with friends. I never cared about winning, or wanted to win. I just got more fluent in what I can do. After I graduated college and started studying for my PhD, school consumed my life, and I had no time to play table tennis. Even when I started my postdoc in New York City, I never got to play regularly because the clubs in upper west side of New York are not friendly.

After I found a real job in Hartford, CT, I found this great club in Hartford with a lot of great players. The people there made my feel like I was back in college again. They are eager to help me improve my techniques and not afraid of playing with someone who is worse in skill. I bought a better paddle, albeit not customized for my style. I started care about winning and wanted to win. I improved serve and changed strokes to at least reduced missed hits.

Then I really started to get better when I started to look for Youtube videos of Chinese coaches online. There are some great videos where coaches talked to amateur players and help them improve their game. This helps a lot because the amateurs are just as bad as I am. When I used to watch world class player online, I never learned the process of growth and just try to mimic the really high level stuff. I went through all the videos and I can find and started with the really basic things like swing without ball. The mostly important things I learned was swing forward and how to use wrist and waist.

While working at my new job, I was fortunate enough to be able to play table tennis at work for a break. Have constant access to a table, albeit thin and crappy, helped a lot because I can practice serves and simple forehand stroke whenever I wanted. I played with coworkers during break for doubles. None of them are better than me, but while I teach them about table tennis, I realize what my strokes looks like, and helped me discovered my own problems.

Just a few days ago, I figured out how to do forehand loops. I was playing with a big guy at the club and figured out how to use wrist to loop and not miss the ball too often. I was so excited. I learned it without a professional coach, and after 28 years since I first played it. It was the relentless pursuit that help me get to this point. And I’m sure I will keep improve if I keep trying.

Misc

About me …

Reading Time: < 1 minute

I’m a Neurobiologist who is currently applying AI techniques in the industry. I love Table Tennis and practice every day to improve myself. Perhaps listening to too much audio books right now 🙂

View More