With the explosive growth of data, it is one of the most important challenges of modern businesses to develop data-driven infrastructures. Scientific breakthroughs in artificial intelligence (AI) have opened the door for a broad range of applications, which can leverage vast amounts of data into real business value. Leading AI researcher Andrew Ng says that AI is the new electricity as it will fundamentally change all industrial sectors, Forrester predicts that AI investments will grow by 300% in 2017, and Barack Obama notes that his successor will govern a country being transformed by AI.

Initially, the hype around big data and AI was quite overwhelming and companies were not really sure how to react.

Big data is like teenage sex: everyone talks about it, nobody really knows how to do it, everyone thinks everyone else is doing it, so everyone claims they are doing it. — Dan Ariely, 2013

By now, most companies have adopted more realistic expectations and understand that AI will neither solve all of their problems nor can it be ignored.

One area that is particularly affected by this development is retail. The number of purchases made online is steadily increasing, which allows companies to gather detailed data on the whole customer experience: what they look at, in what order, for how long, on which day, which questions they might have, what they eventually buy, or how they rate and review products. With AI, this data can then be used to improve this experience to make it easier, more efficient, more engaging, and more adapted to personal needs.

Innovations in this area are based on methods from machine learning, which is the subfield of AI that develops autonomous learning algorithms. This article will introduce five of the most influential machine learning applications in the e-commerce domain.

Product Recommendation

Product recommendation is typically the first thing people have in mind when they think about machine learning for e-commerce. Features like “if you like product x, you will probably also like product y” have been shown to work remarkably well, and they can serve as a valuable tool to guide users through the ever-increasing masses of options available to them. Traditionally, recommendations have been added by hand based on hard-coded product categories, but this is extremely time-consuming, error-prone, and quickly out-dated.

Modern recommendation algorithms are separated into two categories: collaborative filtering and content-based filtering. In collaborative filtering, recommendations for a given customer are based on what similar customers have chosen in the past. Simplifying somewhat, if customer A has bought product X and Y, and customer B has only bought product X, then product Y could be recommended to customer B. On the other hand, in content-based filtering, recommendations try to match the content of customer profiles (e.g. gender, brand preference, or age) to the content of products (e.g. category, price, or color).

Search

eBay has listed more than 800 million products in their catalog. Numbers like these make it apparent that it is increasingly more important to provide efficient search algorithms, because no matter how high the quality or how low the price of a product, it cannot generate sales if customers are not able to find it.

Machine learning can assist with features like search ranking, which allows sorting search results by their estimated relevance. This estimation can take into account frequencies of specific search terms as well as the particular customer profile (e.g. age range, previous product views, phrasing habits, or previous search terms). In short, search algorithms become less about listing all products that match a given sequence of letters, and more about predicting what customers might actually want to see, even when they might not know it yet. Another important feature is query expansion, in which the most likely search term completions are suggested while the customer is still typing.

Apart from typical text-based search, image-based search is becoming an increasingly viable option. Scientific advances in image recognition through deep neural networks now provide the technology to use pictures of products to find similar items online. In addition to that, these methods can be used to classify facial expressions and recognize emotions. But even though the idea of dynamically adapting commerce services to the current emotional state of a customer certainly seems valuable, companies still have not quite figured out how to put this into practice.

Anomaly Detection

The more data you have, the harder it is to check for inconsistencies. One way to handle this problem is automatic anomaly detection. The idea is that an algorithm can identify patterns in the data to learn what is ‘normal’ and then send alerts as soon as data points exceed that range. From the machine learning perspective, the main challenge of this problem is to train a robust model despite having a heavily imbalanced dataset, since there are far fewer cases labelled as ‘anomaly’ than ‘normal’.

A popular e-commerce application of this approach is fraud detection. Retailers frequently have to deal with abusive customers that use stolen credit cards to make excessive orders, or customers that retract payments via their credit card company once products have already been delivered. Besides cases of fraud, anomaly detection can also be used to ensure a high level of data quality for product information. Large databases in the e-commerce sector often contain errors like incomplete product titles, missing images, or products sorted in the wrong categories. Detecting these cases quickly and efficiently can therefore save companies a lot of time, money, and effort.

Customer Support

When you have trouble with a service, trying to get help can often be quite a frustrating experience.

Customers frequently complain about exceedingly long waiting times, having to explain and re-explain their problem multiple times, unqualified advice, or stressed out employees. Given the high amount of resources that are required to provide reliable customer service, it is not surprising that these issues can occur.

Machine learning can help to automatize this process through robots that can answer phone calls. Whereas previous systems were only able to deal with a narrow range of problems and had frequent misunderstandings, recent advances in speech recognition and natural language processing via deep learning have made it possible to have a more flexible and natural interaction with robots. Crucially, these methods have shown improvements in taking contextual information into account. Instead of analyzing a speech sound or a single word in isolation, modern approaches take information from the whole input into account and compare it against frequently occurring patterns, which has boosted the accuracy of machine learning models.

Apart from phone calls, machine learning can also add to other support channels, such as automatically answering emails, categorizing emails (e.g. complaint vs. question vs. request), or providing support via chatbots. Chatbots in particular have inspired a variety of AI startups that want to revolutionize communication channels for marketing, consulting, or recruiting.

Dynamic Pricing

Airlines were among the first companies to embrace the concept of automatically adapting prices. On the basic level, this can simply mean to increase prices when the demand is high and decrease them when the demand is low. But there are plenty of other variables that can also be used to estimate optimal prices, such as prices of competitors, time of day, warehouse stock, or season. However, pricing algorithms cannot be painted with a broad brush and need to be adapted for specific products to accommodate factors like marketing strategies (e.g. whether to give particular competitor prices more weight than others, or whether or not to keep prices low after introducing a new product to boost sales).

From the perspective of the customer, these techniques can have positive as well as negative effects. Some customers will regret their purchase and stop using a shop when they see the price dropping only minutes later. For other customers, dynamic prices can turn out to be an exciting game in which they can try to hunt the best prices. It remains to be seen what the large-scale effects will be, but if the rate at which retailers adopt these new techniques is any indication, then dynamic pricing is here to stay.

Outlook

The applications mentioned above are only a small selection of what machine learning can do for e-commerce, but there are plenty of other options, such as:

Customer Segmentation: Identify systematic groups of customers to make marketing more precise.

Product Categorization: Automatically sort products into categories to speed up inventory management and improve customer navigation.

Churn Prediction: Predict when customers will stop using a service to analyze potential reasons and allow for countermeasures.

Sentiment Analysis: Evaluate the public perception of a product based on sources like social media.

Inventory Forecast: Make production and distribution more efficient by predicting market demands.

Anticipatory Shipping: Ship a product before an order is placed.

It is quite apparent that advances in machine learning have opened up a broad range of options for the commerce sector, and with the increasing availability of open source packages and easier access to distributed cloud computing, these techniques are not just available to large retail giants with armies of data scientists anymore. Based on the vast number of possible applications, it is also important for companies to define strategic priorities to get the most value out of machine learning.

At commercetools, our machine learning projects are focussed on enabling personalized and engaging customer experiences as well as optimizing product information management. It will be interesting to see how the continued advancement of AI, especially in the areas of text- and image-processing, will continue to shape the future of the commerce industry.