Machine Learning in Stock Optimization

We cannot ignore it. The complexity of supply chains has increased exponentially in recent years. Whereas once upon a time, a good business strategy alone would be enough to compete, overcoming complexity is now what ultimately sets a business apart from its competitors; a trend which will only become more prevalent in the coming years.

Not only is there an enhanced level of complexity to overcome, but there is also human-factor which comes into play: we want to understand the solutions that are given to us. This is an issue that many managers care about (or at least should care about). “In the past, everything was better”. Well, when it comes to inventory management, that could just be the perfect quote. Of course, simply yelling this out load will not provide a solution.


As a senior consultant and research scientist at Slimstock, Steven Pauly specializes in the mathematical intricacies of inventory optimization. In his role as a consultant, he has been involved in various improvement projects at large companies. Furthermore, Steven is attached to the Slimstock Academy where he offers masterclasses in the field of forecasting and other areas of inventory management.



Over 50 years ago, our understanding of inventory management increased significantly. As businesses realized the enormous return on investment that could be achieved through effective inventory management, this translated into the publication of lots of high-quality literature around the topic.

However, there were no computers back then and solutions were based solely on common sense underpinned by the necessary mathematical analysis. The advantage of this is that solutions were transparent, did not require much effort, provided great insights and were mainly focused on so-called ‘quick wins’. As a manager, you are probably asking yourself: why do anything differently now?

Well, there were many problems back then and more and more continue to arise today. Put simply, solutions based on common sense and mathematical analysis alone no longer suffice.

Perhaps you have heard or read the words: ‘DBC system’, ‘machine learning’, ‘IBM’ and the year ‘1997’ in the same sentence.

IBM’s Deep Blue Chess (DBC) system tells a story that took place in 1997. Through machine learning, they managed to beat the world chess champion. An impressive feat even by today’s standards. The internal employees at IBM boasted that the system understood all possible moves available at any given moment in order to determine the best outcome. This, of course, leans more towards a brute-force approach which makes it especially impressive when you consider the limited computer power that was available at the time.

Yet, there are some snags to this story. Garry Kasparov, the chess champion (or was IBM now the champion?) demanded a rematch. However, IBM refused and the machine was dismantled almost immediately. This, in turn, raised suspicions that Garry Kasparov was cheated by IBM’s Deep Blue Chess (DBC) system.

In 2016, the power of machine learning was once again exhibited. In a strategic game of “Go”, a machine was pitched against another world-champion. Again, the machine was successful!

However, “Go” differs from chess as there are a far greater number of possible combinations. In brief: ‘Go’ has 10^174 possible board configurations. To give you an idea of how this differs from chess: this equates to 1 million, trillion, trillion, trillion more potential combinations.

But what is machine learning? And what makes it different from the brute-force approach or more traditional mathematics? And why and when should we use it? And what exactly do we need to make it work? These are things that management should be shouting about.

First and foremost, is it the learning component of machine learning that separates it from the brute force approach and traditional mathematics. By this, we mean that the machine has the ability to discover relationships and patterns in a data structure without explicitly naming it. It actually learns the ‘rules’ of the problem. This means that solutions can also work in new, unforeseen situations and can tackle problems with high, underlying complexity and a high degree of uncertainty. And that’s exactly where this concept fits into inventory management.

The fact that machine learning differs from other solution approaches creates new, valuable opportunities. Machine learning makes it possible to improve current techniques in, for example, forecasting, but also to tackle a lot of other issues that were not even considered a few years ago. For example, identifying the actual costs if we are unable to deliver an item, or determining when an item is at risk of obsolesce before it even reaches the end of the product lifecycle. Likewise, in production management, latency and machine downtime issues are also in the machine learning queue.

There is no question that machine learning can be very powerful. However, with huge power comes huge responsibility. The main pitfall of machine learning is that for managers, the perquisites are simply not clear.


Machine learning is essentially no more than applied mathematics with an emphasis on integrating the current computer power available today. Given the increasing number of potential data sources, coupled with the rapid rate of evolution in computing power, machine learning can be a tremendously powerful tool in inventory control.

Machine learning is statistics on steroids. Yet, it is in essence still “just another tool in the box.” And of course, there are downsides to machine learning. Therefore, it should not become a goal for companies to ‘do’ machine learning.

 Machine learning is not a holy grail: it finds its strength in situations where data is abundant but the degree of complexity is so high that traditional mathematics fall short. But exactly how much data are we talking about?

If we have a situation with 5 variables that can each take on 10 different values, then we already have 100,000 possible combinations for the machine to learn. In inventory management, there are often many more variables that can take on multiple values.

If the data is available, machine learning has enormous power. However, in practice, this is the greatest weakness of machine learning. Managers must, therefore, consider how data can be collected in a structured, efficient and ‘clean’ way.

Machine learning also requires a lot of computing power. Some machine learning algorithms are based upon an enormous amount of numerical computations and this can sometimes be a problem in inventory management.

In addition, it is important to keep in mind that solutions in inventory management do not only rely on quantitative results. Ultimately, it is the people who have to understand and work with the solutions. Management therefore has to monitor this closely. As a result, it is important to facilitate knowledge about machine learning and theoretical inventory management across the company.


There are already some cases where machine learning has proven that it can offer a superior solution. For example:

  • Optimising promotions policies. 
  • Achieving the optimal sourcing strategy based on a variety of sourcing options
  • Providing more robust forecasting and insight over irregular and new items

There are also projects that are in the pipeline at Slimstock. For example:

  • Minimising shrinkage through parameter optimisation, root-cause analysis and pro-active signals
  • More efficient management of purchasing behaviour through automatic exception management
  • Optimising the service level by determining the actual cost of out-of-stocks
  • Achieving a holistic approach to multi-warehouse optimisation
  • Minimising obsolete stock through root-cause analysis and pro-active signals

Are you interested in how a machine learning project works in practice? Do you want to know more about machine learning and the techniques behind it? Do you want to gain some first-hand experience in doing it? Keep up with the Slimstock website and our LinkedIn page for latest updates!