Saturday, 24 December 2011

The Yahoo Internship 2011 (Part 3)

From the second week of July, I started working on the second part of our project. I started with testing out some basic existing algorithms on the data. This involved coding in Matlab. The algorithms were simple but had issues regarding tuning of parameters. Once the baselines were ready, we started on our own algorithm. I suggested one algorithm and Dhruv suggested another. I implemented the first one and soon had good results. Dhruv was quite delighted, and declared that we had "publishable" results. But over the weekend I discovered a strange behavior of the algorithm and after a lot of brainstorming finally understood the problem. I explained the issue to Dhruv, but none of us could find a convincing way to get around it, and so I started implementing the second algorithm. This was much slower, but did not have any other issue. We could convincingly beat the baselines. Buoyed by the success, we tried out a large number of variants throughout July. Dhruv sometimes sat with me and we coded together. Soon I got his habit of saying "Fight kya hai saale ka?" on getting unexpected results or mysterious errors. I now knew that the internship had been fairly successful- a departure from the endless string of failures i had had over the previous year.

In the middle of July, there was a presentation "Intern Showcase", where the interns had to give a 15-minute presentation on their work. During this i got to see many of the interns for the first time, and what they worked on. It was soon after this that Rajeev decided that a large-scale implementation of the project was in order. Charu, a research engineer, was put in charge of this. The last two weeks of my internship often involved myself explaining my work to her. I taught her the basics of topic models and explore-exploit algorithms, and then ran her through our framework and explained my code in detail. I developed a good working relation with her. We always spoke in Hindi, thus making the relation feel more comfortable and informal. It was decided that I would continue to come to the Yahoo! office about once a week over August and early September to help her with her coding, and if possible try something myself in IISc.

As I have said in the previous post, throughout May, June and early July life had been monotonous. It was all work and no play. But in the middle of July, there came a paradigm shift. Uma, who used to sit in our cubicle, had temporarily left Yahoo for a company-sponsored PhD in IIT Bombay. In her place came Isha, a new intern from BITS Pilani. In a matter of a few days we became good friends. She was part of a huge group who joined Yahoo from BITS Pilani- most as interns and some in permanent positions. At lunchtime, Isha's friends like Monika and Priyanka came to call her, and she called me to come with them. I was too happy to dump my original group of lunchmates. Lunchtimes became a lot happier in a company of my own age group. To make things better, one day the Labs team arranged a lunch in the Pyramid restaurant for the interns and their mentors, where most of the interns came to know each other. There were quite a few interns from the IITs who were in BTech or MTech Dual Degree. There were 4 more PhD interns like me, but all were studying outside India- UCSD, ASU UT-Austin etc. Among the BITS-Pilani girls, only Isha was in the Labs team. The following day, all the Labs people (except a lazy few) were taken to Leela Palace for bowling and lunch. Now most of the interns knew each other finally, though most were to leave in a couple of weeks. Most of the younger interns and the BITS Pilani people became friends. Every day a new friendship was made. Next week was Priyanka's birthday, and all of us went over to Pyramid restaurant again. Later the same day, Isha pulled me to a movie being screened in the Cafetaria - "How to train your Dragon". I never had a taste for this kind of movies, but thoroughly liked it (perhaps because of the company). As if all this was not enough, Dhruv went on holiday for a few days and I had lots of fun with Isha and co. The last part of the internship was nothing short of a blast. I decided that even in undergraduate days I never had had so much fun!

(Over)

The Yahoo Internship 2011- part 2

From the second week, the work began in full flow. We had a discussion on the initial model to be tried, and I had to derive the inference equations and then code it up. I was given a Java implementation of LDA written by a Lab member called Prithviraj, and I had to first understand it and then modify it to our model. Also a fair amount of text processing was involved. For two very hectic weeks I was busy with all this, and even had to work full time on weekends, albeit from home. The code was long, and I was always afraid that there will be some bug. There was no concrete way to understand if there is a bug or not.  Throughout the coding phase I tested on small parts of the data. My mentor was often not satisfied with the result and insisted that there was a bug somewhere, and made me look for it. Sometimes a bug was located, and sometimes not, and we had to conclude that the model had limitations. When the code was ready I started to run it on the full data. The results were moderate, but my mentor was not satisfied. However, my advisor in IISc also wanted me to do some work for an approaching deadline. The fourth week of May was very hectic as after returning to the campus in the evening I again had to run to the lab to do this work. Finally in the final week of May my adviser arranged a 1-week break in the internship so that I could do the work in IISc. The leave was granted, but the IISc project did not work out, and I rejoined internship on 1 June.
After the initial results with topic models in May, we decided to try other approaches. This involved designing of features. Throughout June, we tried a wide variety of features, some inspired by other papers and some based on our understanding of the data. I spent quite some time just going through the data to get a feel of what could be good features. We consulted different people, including the Signal Processing stalwart Malcomn Slaney, who had come to India to give a talk at a summer school jointly organized by Yahoo and IISc. Nothing, however gave really promising results. Dhruv once observed that Rajeev's voice was gradually rising, and was worried that a bashing may be coming up soon. Finally, by the last week of June we decided to freeze the issue of features, and go back to modelling. Most of the Java coding was done by me, while Dhruv wrote a few Matlab scripts.  After a fair amount of hard work for a week, Dhruv was satisfied with the results, and decided to move over to the next phase- Explore-Exploit Algorithms. I was satisfied with the hard work and the learning experience, but often rued the lack of freedom and a scope to try my own ideas.

Throughout June and the early part of july I was thus preoccupied with the work. I hardly had any leisure time when in office, and though there were some more interns i never got any chance to make friendship with them. The lunchtimes were monotonous, as already described in the previous post. In the cab also there was no one of my age group except Pavan (1 year senior), but he rarely came, and even if he did come he was busy with his laptop throughout the journey. However, i have the ability to enjoy solitude, and I had a nice time observing the route and the other passengers. I soon picked up the route and with the help of Google Maps, developed an fair idea about the geography of some of the areas we covered during the journey. The most interesting part of the journeys was the Kannada film songs which played on Radio City FM radio. Although I did not follow the lyrics I found the tunes quite amusing. Memories of those tough days are abound with the tunes of "Ore Pinkuu..", "Don't worry Padmavathi", "Sanju mattu Geetha" and "Thara Thara Hidisire".

Another interesting part was in observing the copassengers. In the original schedule I was the first pick-up, but later Sarvanan superceded me. He was an elderly and glum person, who sat quietly on a seat throughout the journey. Shortly after my boarding came Inayat Shareef, the accounts officer in his 40s, with whom I developed an unlikely acquaintance despite the massive age difference. Next were Preethi and Pavan, both of whom were always late by around 5 minutes, introducing a delay of nearly 10 minutes. They boarded near Mathikere bus stop, after which we drove to MS Ramaiah Institute of Technology, where on some days the bulky S. Balakrishnan boarded and promptly started reading something on a Kindle Reader. Down the same road was the quiet and ever-punctual Vipin, followed by Shiva and Ravi near MS Ramaiah Hospital. Next was Nethra in Sanjay Nagar, who also kept us waiting regularly at the door of her house, till she returned from the market on a scooter and handed over the vegetables to her maid. After this the bus drove a long way to Kaveri Cinema where the gorgeous Deepika boarded, usually on time.

The bus usually reached the office around 8:30AM, after which I had breakfast in the Cafetaria. There was a wide variety of food, but my menu revolved around veg/onion-cheese-grilled sandwich, masala dosa and idly-vada. Usually the breakfast was taken alone, though sometimes Amit (Swagato's friend) also joined. During the work hours, when I needed to relax the brain and eyes, I strolled around the building. It was 6-storeyed, and we occupied the 3rd floor. Each floor had a "theme", and all the glass-doored conference rooms in that floor were named according to that theme. In our floor, the theme was "Cars", and so the different rooms were named as "Toyota", "Nissan", "Ford" etc. Each floor had a few "Breakout Areas", some of which were for beverages/snacks and some for foosball and TT. Throughout the building, the restrooms were hilariously named "Go-pee" (men's) and "Go-pee-ka" (women's) :-o

(To be continued)

Friday, 23 December 2011

The Yahoo Internship 2011- part 1

2011 was a year full of many experiences, and in contrast to the previous 4 years (except 2009), there were more good/interesting experiences than bad ones. Most of these experiences were acquired during my internship at Yahoo! Labs, Bangalore.
The offer for internship came around February. The timing was good- it served as a morale-booster at a time when my morale was in the lowest possible ebb. A journal paper had been rejected recently, but even worse, i had no direction to work on. So I was rather pleased to get the offer. After consultation with my advisor, i fixed the period of the internship from 2nd May to 29th July. I had been told who would be my mentor, but not what my project would be. At any rate, I had been assured that it would be on Machine Learning. I knew that here was a chance for me to resurrect my failing PhD, and I must make the most of it.
On 2nd May I had been asked to report to Yahoo's Embassy Golf Link office at 9AM. A week before, I had travelled to the place and located the office. On D-Day i woke up at 5:30AM, shaved, bathed and dressed in formals, nibbled a few biscuits and around 7AM, left IISc. I boarded a bus, and after changing at Majestic, getting down at Domlur, walking for 15 minutes and waiting 10 minutes to cross the Intermediate Ring Road, reached the office around 8:30AM. There was a huge, plush building with glass door and a fancy reception hall. It was Monday, and every Monday Yahoo takes in a group of new recruits. I was asked to wait in the reception hall, along with the new joinees. I spent time watching the televisions which were flashing news about the killing of Osama on the previous night. Around 10AM, we were hearded off to a medium-sized lecture hall. A HR member called Vineeta Varkey conducted the orientation of the group, introduced us to the different facilities in Yahoo and made us fill up lots of forms. She also divided us into random groups of 6, and conducted a short GD on why Yahoo is special. There were about 45 people joining on that day, of which only I seemed to be in a technical position. Most of the people were older than me, and came from other companies. By the end of the particularly boring day, I had my laptop and accessories, but the cubicle which had been assigned to me turned out to be already occupied by someone else! But it was already nearing 5PM, and at 5:30 the vehicles leave. So i had to pack up for the day without even meeting my mentor and manager, though I did find out their cubicle numbers from Vineeta. I had to speak to the transport officer Mr. Venky and he assigned me to a cab (Yahoo has a fleet of 50 cabs in addition to shuttle services and late-night cabs). I boarded the cab-a Tavera- and returned home after a long journey through heavy rains and heavy traffic jams.
Next day I again had to come to office by myself, and this time after breakfast went straight to the cube of my mentor Dhruv. He was in his position, and helped me get a seat in his cubicle. It was a cubicle with 4 desks. I would sit diagonally opposite my mentor, and the other two positions were occupied by Subhajit and Uma. Soon after I had established myself at the position, that I was called for a meeting with Rajeev, my manager, along with Dhruv. The problem was defined and I was given a set of papers to read. I was somewhat disappointed that it was related to text and not vision. The major components of the project were Topic Models which I knew in theory but had never worked with in practice, and Explore-Exploit Algorithms, about which I had no damn clue. So the first week was devoted to reading the papers sent to me, and getting a working knowledge of the subject. Throughout this week I got acquainted with the different people who worked in the Labs, and often we went for lunch together in the Yahoo Cafetaria. This lunch group had, except myself and Dhruv, Sundar (IISc alumnus), Vinod, Vidit, Sachin, Ajesh and sometimes Pankaj and Charu. Dhruv, Vidit, Vinod and Sundar were Research Scientists and the rest Research Engineers. Unfortunately most of them were quite older, and discussed matters over lunch which were of no interest to me. So i stayed quiet and simply listened to them.
The first week was marred by transportation problem. While returning there was no problem, and the 1.5hr journey was made entertaining by Shijo and Sharmila who kept fighting and pulling each other' legs all through. I also got acquainted with Keerthi, Srikanth and Inayat. But in the mornings i could never catch the cab. The cab driver spoke only Kannada, and though other passengers helped us negotiate a pick-up point, the cab either did not come to that point or it was full by the time it came. So every day i had to wait till about 8AM for the cab, and then take a bus, jostle through the crowd, and reach office around 9:30, which is an hour late. This issue was fixed the following week, when i was assigned to a new cab- a Tempo Traveller- with more seats, a more convenient pick-up point and a driver who could speak a language which was an acceptable approximation of Hindi.

(To be Continued)