Amazon has an AI vision and Rajeev Rastogi is shaping it
When Rajeev Rastogi returned to India from the US in 2004, his day job was set for him: boot up Bell Labs’ India operations. For a person interested in data and its myriad uses, setting up a networking business wasn’t the most exciting thing to do. “I was told that if I have to stay in the company, I had to do something with networking,” he recalls.
Data may have been early on the hype cycle but Rastogi had no doubts about its future. Still, he was working with a networking company – Bell Labs was a unit of Lucent Technologies, the networking spin-off from US telecom major AT&T.
The Indian telecom scene was chaotic then. Reliance Industries had put the mobile at the centre of mobile communications with a connection and a handset coming at as low as Rs 500 a month in two years earlier. Networks were patchy and equipment vendors scrambled to meet the demands of ever-hungry telecom operators.
At the core of a telecom network is a lot about data: signal strength, call drops, subscriber density, black spots, call handover success, the overlap of cells, and several other parameters. “A lot of alarms get generated when a connection drops… We had to cluster all the alarms (and data generated) and find out where the problem really is,” Rastogi says of an instance.
Rastogi had been dabbling with data even earlier – he holds a PhD in computer science from the University of Austin at Texas and more than 50 patents – and Bell Labs India was the springboard into a career of solving problems using data. Yahoo! Labs came after the Bell Labs gig before Amazon convinced to switch over.
Rastogi is the director of machine learning at Amazon India and has been ranked among one of the top 10 data scientists in India. The e-commerce giant is looking at putting artificial intelligence and ML at the heart of everything it does. According to Rastogi, the problems that AI and ML need to spar within India are very different from the Amazon universe in the rest of the world, especially because the data available is not of high quality.
Amazon is not the only company that is focussing on AI and ML, to be sure. Google, Microsoft and Apple, too, are heavily focussing on the frontier technology. That makes Rastogi’s work even more challenging.
Balaraman Ravindran, an IIT Madras professor who is widely considered to be India’s foremost reinforcement learning expert, points out that some of Rastogi’s algorithms have now become a staple in classrooms. “He is by far the most well known, well-cited data science and machine learning people working in India even though most of his high impact work was done earlier outside. Several of his algorithms we teach in textbooks and now have become standard parts of books that people teach,” says Ravindran, adding that having an expert like Rastogi in India is good for the field in the country.
The Amazon crawl
Rastogi started his career at AT&T Bell Labs in 1993 before the internet entered the public consciousness. “Life is all about being at the right place at the right time. Data mining became an important area in the mid-to-late 90s,” he says.
But, few believed that ML would make it big. AT&T, in fact, shut down its machine learning division in the mid-1990s and got it back up and running in 2000. Rastogi still remembers the early movers in the space. “There was an algorithm, Apiary, that came out of IBM Research in 1998 in data mining,” he recalls of one of the early attempts of trying to find the truth hidden in data.
That is where a lot of excitement came around finding patterns. Apiary could find patterns and pair products that got sold at retail counters. It may seem not unusual today because Amazon does a lot of that today. One example, that got a lot of media attention was how companies can sell more diapers and beer together.
Ravindran calls Rastogi a data mining pioneer. “He has done a lot to move away from statistics and other methods to something called data mining where you deal with analysing data at really really large scale,” says the professor.
According to him, the success of e-commerce businesses is not only because they cater to the bulk of the market but also because they cater to the very very long tail. “And when you also cater to the long tail, it becomes a matter of making the tail aware that what they want is available, and even making the tail aware what is it that they want also sometimes,” says Ravindran. “The better your tools are, the better your recommendation systems are, the better served are your customers.”
At Bell Labs, Rastogi’s role was to build algorithms that would scale, work with large quantities of data. Bell Labs, he remembers, had a very good statistics department. Its focus was mostly on pitting models to data that they had and find solutions in the networking space. Where machine learning came in was when they took a lot of the statistical approaches and finding parameters, to do analysis on huge amounts of data.
“I went into databases, and then went into data mining in 1998-99. How do you run the algorithm on a billion records… At that time companies didn’t think much about big data,” says Rastogi. These were complex algorithms that few companies would want to invest their time and money in.
It was only when Rastogi joined Yahoo in 2008, things started changing for him. Yahoo was trying to predict clicks on the ads. It did a lot of information extraction from web pages. “We were crawling billions of pages, and the page structures keep changing. So, you have to constantly learn and use that to get the pricing. We had to cluster pages (which) was not easy at a billion page level,” remembers Rastogi.
He worked on it for two-three years. At that time Yahoo even crawled Amazon’s website and looked for prices of products and when someone would search on the product, Yahoo would show them up in their search results.
Building a shopping guide
In 1998, Rastogi wrote his first paper in clustering. Clustering is typically grouping. “Those days people were not looking at large data sets,” he said. Since then Rastogi has made a lot of contributions to large-scale data analysis and management, published over 100 papers in international conferences, and 33 papers in international journals. His research has over 12,500 citations.
All that has come together at Amazon, a pioneer in collaborative filtering algorithms that essentially figures out which pair of products that are bought together. With its own learnings and the advancement of technology, Amazon now tries to predict buying patterns better.
If someone has bought a set of five products, what should be that person’s next buy? For example, if you have bought a mattress, bed sheets, and pillows on Amazon, it suggests you buy a mattress protector. Or, if you have bought baby diapers, your Amazon app will compile and present special offers of baby products: for instance, it would show offers on the newborn baby store with discounts on wipes, baby cream, powder and other products. Rastogi points that these predictions are not personalised and is based on sifting through large data sets
Then, a change in the technology landscape triggered an even bigger change in data sciences in 2012 — when image recognition really took off. Rastogi and his teams started finding more problems to solve. “That is when ML really took off,” he says.
At Amazon, it was deep and brute applications of ML. Amazon started using AI and ML to a broad set of problems, from the ranking of deals to improving address quality, from building a better catalogue by finding missing descriptions in titles (that don’t have brands and colour) to finding out defective images.
“In India, in general, the data quality is very low,” says Rastogi. That is also because e-commerce is new in India, so people are not used to it. Rastogi wants more people to prepay orders, which isn’t the case today. A lot of people use cash-on-delivery or they buy offline. ML can help solve that problem if Rastogi is able to reduce the margin of error in building a more wholesome catalogue.
Next, Amazon has a lot of user-generated content in terms of reviews and search data. All this data that it has needs to get analysed, to figure out what customers really expect, and how certain or all products can be of better quality.
There is a virtuous cycle at work driving such work. How? By helping Amazon design and sell products where supply lags demand but it is not immediately obvious to producers. Welcome to Amazon’s private label business – a business largely fuelled by learnings from its algorithms. Globally, its private labels contributed $450 million in sales in 2017. In India, Amazon is targeting 25% of its revenue from private labels. It already offers a wide selection of clothes, electronics, home items, among others.
How does it work? For example, in a cell phone Amazon would look for the features that people really want, and to do that by mining data at its disposal and gain product design insights. “Leverage those insights to come out with products that customers will like… That is an interesting effort that we are starting to work on,” says Rastogi.
Figuring out where a customer is on her relationship with Amazon is a key goal. “Customers are on a journey here on Amazon, and over a period they are going to buy a lot of different things,” he adds. Reinforcement learning, for instance, has many such applications. One of its application, he says, is to figure out where the customer is in her purchase cycle, guide her, and take her close to buying the right products.
Reinforcement learning is a type of ML or a type of application of AI. The process involves a system performs a function and assesses its results iteratively until the required result is reached. Think of it as learning to ride a bicycle. Each time after you lose balance, the body will adjust itself the next time so that the same mistake does not happen and after several falls and balance fixes, you learn to ride the bicycle in a stable fashion.
Solving for the future
In the Indian context, Rastogi thinks once the first 100 million users are crossed, Amazon will have to target a different set of customers, people who are not versed with English and are not comfortable with the internet for purchases. That is when he thinks voice will play a critical role.
“There are people who are not internet savvy and there are people who don’t even know how to type,” he says. “There are people who prefer voice interfaces. Having people in tier-II and tier-III towns shopping and interacting through voice interfaces is one big challenge.”
Voice is one challenge that deep learning has helped tremendously, but there are still issues with different accents and dialects. Google is also trying to solve the voice problem – especially when it comes to search and watch videos – but it is more difficult in India.
If ML can enable shopping on mobile with voice-assisted technologies just like you would shop while interacting with a shopkeeper in the physical world, Amazon would have scored. Alexa is one step forward in that direction. Rastogi is quick at giving an example. Old people are not very internet savvy, but then by using Alexa they can use the internet. They can perhaps get the same experience as in a shop. Technology is advancing where it can answer questions like ‘Will the colour of this saree fade’ or ‘Will this cloth shrink’. That kind of interactions, he says, have started happening but it is far from being perfect.
The other area where Rastogi’s team is doing significant work is on listings. The catalogue should be informative, accurate, and keep out listings that go against Amazon’s listing policy. For example, Amazon has something called the obscene content category, where certain products and pictures need to be removed from the website or app. It uses ML to weed out all of that. Certain types of colour mean there is more skin show in the photographs. “We have algorithms to tell when the image is defective. Once your catalogue is of better quality, the machine learns from the catalogue,” says Rastogi.
In a catalogue, if any information is missing, the algorithm tries to fill it. For example, if a particular product is blue in colour, and the listing doesn’t have it in its description, the code will add the information to the product description. If a brand name is there but the name of the company is missing, Amazon’s ML algorithm tries to add that.
“In India, we are working on forecasting for sellers. We will tell them if there is a demand for a particular item, we will tell them how much he should be (stocking),” says Rastogi, adding this project is work in progress. His teams in India are working on as many as 20 different AI and ML projects.
For now, we don’t have general intelligence, explains Rastogi. “We have problem specific intelligence… The challenge in India is again is that the quality of the data is not as good, so the algorithms won’t learn as good.”
Rastogi started his time with Amazon in 2012. His first work was classifying items in Amazon’s 20,000 leaf-node product taxonomy. “Classify the product into the appropriate leaf. We worked on that problem for two years. The first set of models took six months, and then we continue to improve that,” he says.
The holy grail of ML for Rastogi? It will be when “I should automatically generate a Wikipedia page or generate a summary”. He goes a step ahead: “Show a movie to a machine and the machine should be able to generate a review.”
Disclosure: FactorDaily is owned by SourceCode Media, which counts Accel Partners, Blume Ventures, Vijay Shekhar Sharma, Jay Vijayan and Girish Mathrubootham among its investors. Accel Partners and Blume Ventures are venture capital firms with investments in several companies. Vijay Shekhar Sharma is the founder of Paytm. Jay Vijayan and Girish Mathrubootham are entrepreneurs and angel investors. None of FactorDaily’s investors has any influence on its reporting about India’s technology and startup ecosystem.