Neural Networks and Machine Learning - IPS Cloud

Seen from the outside, an artificial neural network is a program run by a computer. Its peculiarity compared to other programs is the ability to learn the relationships between the input data and the output data (the results), this is obtained through a basic logical structure that does not change as the data and relationships vary, but it adapts to them.

The name neural network comes from the comparison with that of our brain. Its structure provides a series of points, called nodes, connected to each other, which receive a numerical value from other nodes, increase or decrease it and return the result to new nodes. Similarly, neurons in our brain receive an electrical impulse from a series of neurons and can retransmit or not this electrical impulse to other neurons. After this explanation, a neuron doesn’t seem like a very intelligent object. It gets small shocks and all it does is relay them or not to other neurons. How can all this current spinning in our head turn into such complex actions we can perform? The secret lies in the quantity. For example, if we had 100 neurons, not only we would not be very intelligent, but, considering that we are made, they would not even be enough to keep us alive (however there are animals that do not have any neurons, such as sponges). What if we have 1000? It wouldn’t make much difference, just think that a jellyfish has about 6000 and belongs to the category of fauna with the smallest brain capacity. A mouse already has around 70 million and we humans reach 86 billion. But how does quantity transform such a basic and banal process into the amazing abilities we possess? To get to the answer, let’s analyze an artificial network.

The artificial neural network

Diagram of a simplified artificial neural network

Diagram of a simplified artificial neural network

Let’s start by schematizing an example of a very simple neural network to understand its mechanism in detail. As you can see in the figure, we have three levels. One of the inputs, where, in this case, there are three nodes (blue circles), these three nodes represent three input information. A central level, called hidden because it does not communicate directly with the outside (white circles). And a layer on the right that represents the results, in this case, made by a single node (orange circle). The gray lines show the connections between the various nodes. The simplest way to explain how it works is with an example.

An example of a weather forecast

We use an extremely simplified weather forecast model. Suppose we want to forecast if it will rain or not an hour from now, based on three simple factors: 1) The number of clouds in the sky, 2) The wind speed, 3) The possible amount of rain at this moment. Our three inputs will be decimal numbers that can go from 0 to 1. For example, for the first factor, the number of clouds, we will have a 0 if there is no cloud in the sky, a 0.5 if the clouded areas and the clear ones are equivalent, up to 1 in the case in which the whole sky is covered with clouds. So we can see our cloud value as the percentage of the sky covered by clouds. We will do the same for the other two factors, i.e. the wind factor, which will be 0 in case of total absence up to 1 in case of maximum speed (the maximum speed will be defined a priori depending on the geographical area where we are making the forecast). Finally, we assign the value of the amount of rain, 0 in case of total absence up to 1 for the maximum intensity. To keep the example as simple as possible we have only one result and we call it raining.

The hidden level

Now that we have decided which are the inputs and outputs of our neural network, we can proceed to explain what this elusive intermediate level does. As you can see from the figure, each of the white dots (that represent neurons) receives all three inputs. So each of these nodes receives three numbers between 0 and 1. The first thing it does is assign a “weight” to each of these three values. This means that it defines a percentage for each of the inputs. Then it calculates these percentages and adds them. Let’s see an example.

Let’s take these three inputs: Clouds = 0.8; Wind = 0.1; Rain = 0.3. We are in a very cloudy sky, with very little wind and a little rain. The first node decides to give the cloudiness a weight of 35%, the wind a weight of 52% and the rain a weight of 2%. So the input values of this node will become 0.8 x 0.35 = 0.28; 0.1 x 0.52 = 0.052; 0.3 x 0.02 = 0.006. After doing these calculations, the node adds up the three results: 0.28 + 0.052 + 0.006 = 0.338. I guess you are asking yourself two questions, where did it take those percentages to calculate the weight of each input? Why does it do this? We begin to answer the first, for the second the answer will come later. These percentages are random. Well, you will say, everything already seemed not intelligent before, now that it makes up numbers it just seems pointless. In reality, we can say that at this point in the process, our system is ignorant, because it has not yet used intelligence to learn, but it will.

The next step is to define a threshold, that is a minimum value beyond which this information will go forward or not. In this case, for example, we can define that if the result of the calculation of a node exceeds 1.5 then the signal is transmitted over, otherwise it stops there. Also for this value, we don’t know a priori which is the correct one for each node, so we could set any number. However, in this case, I introduced the result of my reasoning into the neural network, choosing the average of the sum of the inputs. In our example, the sum of the three inputs can range from 0 (when they are all zero) to 3 (when they are all one). I did this to show how it is possible to start a neural network with parameters that already make sense, therefore knowledge and reasoning come from outside the neural network. The advantage of doing this is simply decreasing the time the network will take to get to the results, but it is not at all a necessary thing. To mathematically obtain the continuation or not of the information, we introduce a function that generates the value 0 if the result of the previous calculation is less than 1.5 or generates a 1 if the result is greater than this threshold. Then a 0 or a 1 will exit the node.

The results of artificial thinking

Now we are at the last level, that of the result. Each central node is connected to the result node, which we called raining. This node receives a 0 or a 1 from all the central nodes, exactly as before, it applies a weight to each incoming value and has a threshold value, under which the same mathematical function will generate a 0, and above it will generate a 1. So nothing different than the previous level. We were at the point when the first node of the central level calculated the value 0.338, which is less than 1.5, so it sent a 0 to the result node. Therefore the result node received a 0 from the first central node. Let’s say it applies to it a weight of 71%, so it gets 0 x 0.71 = 0. Similarly, it received the values from the other two central nodes, so we assume the other values with their weight and do the same sum we did for the central nodes: 0 x 0.71 + 1 x 0.27 + 1 x 0.95 = 1.22. In this case, without doing any reasoning, we decide that the threshold of this node is 2, therefore being 1.22 less than 2 our mathematical function will generate a 0. What does it mean that the node of the result raining is equal to zero? We decide what it means, and we say that if the value is 0 then it will not rain in an hour, whereas, if it is 1 it means that it will rain in an hour. In this example, our neural network told us that it will not rain. If the process ended here it would have the same value as tossing a coin and deciding that heads mean it will rain and tails no, so now we need to make our neural network capable of learning.

Machine learning

To allow the neural network to learn what relationships there are between the input information and the results, we need real data. In our example we have to collect data on cloud coverage, wind speed and rain intensity for a certain period of time. With this information, we have both the inputs and the results, because, if we collect the data every hour, we know that the intensity of rain at a certain time is what I should have predicted an hour earlier, so I am going to correlate it to the three parameters of the previous hour. In our very simple case, the result is not even intensity, but simply the presence or absence of rain. Once I have a good amount of data (obviously the larger it is, the more reliable the predictions will be), I apply what is called the error back-propagation to the neural network.

In other words, it is nothing more than a kind of trial-and-error learning. When the network works on the historical data series, it can make a comparison between the results obtained and the real data. In general, there will be a difference between the two values, therefore an error. The purpose of learning is the same as for a human being, to stop making mistakes, or better, to reduce them as much as possible. In our very simplified example, the neural network could calculate a 0 when the correct result had to be a 1, so no rain when it actually rained (and vice versa). Let’s assume that out of 100 real measurements, in 30 cases the result is correct, while in the remaining 70 it is wrong. To reduce the percentage of errors, the neural network can modify the parameters we saw earlier: the weight of the inputs and the threshold that determines whether the output of the node is 0 or 1.

How to optimise the parameters
Example of a function that represents the error of the result in relation to weights and thresholds, that is, the parameters that the neural network can vary.

Example of a function that represents the error of the result in relation to weights and thresholds, that is, the parameters that the neural network can vary.

A first hypothesis is to continue modifying randomly these values for each node until the error drops below a certain level that we consider acceptable. By doing so we would have a neural network that has learned the correlations between inputs and results. This system could perhaps work for our example composed of a handful of neurons, but think of a network made up of hundreds of thousands of nodes, surely a lifetime would not be enough to see the result, most probably it would go beyond the duration of the universe from its birth to now. Then we have to think about smarter ways to find the correct parameters. We can use a mathematical function that contains our parameters and represents our error, and what we have to do is find where it is minimum (and therefore where the error is minimum). In the image we see an example of an error function in two variables: a curved surface with maxima and minima (peaks and troughs). What we need to do is change our parameters to get to the bottom of the lowest trough. In this case, we assume that with the initial parameters, which cause an error of 70%, we are in point A. We must find a way that, in the shortest possible time, takes us to point B, where we find the parameters that give the minimum error and make our network capable of making this weather forecast. To obtain this, there are very effective mathematical methods, such as stochastic gradient descent. Understanding these methods implies a substantial mathematical study and the purpose of this post is to explain the general concept. I have put the Wikipedia link for the more curious and stubborn readers who wish to delve into the subject.

More complex networks
Example of a network for the recognition of handwritten digits with a resolution of 50x50 pixels

Example of a network for the recognition of handwritten digits with a resolution of 50×50 pixels, each input represents a pixel.

Now our network has the correct parameters, so it has learned what the relationships between inputs and results are and is able to predict if it will rain in an hour with a contained error. This example is extremely simplified, in reality neural networks can handle a much higher number of inputs and the results can also consist of multiple neurons. The intermediate level can be composed of several levels, where each one does a part of the work and passes the partial result to the next level. Let’s take the example of a network that recognises handwritten numbers, where a single digit is an image consisting of 50 x 50 pixels, so it would have 50 x 50 = 2500 input values. Let’s assume three intermediate levels, each composed of 1700 neurons and 10 for the results (the ten possible digits from 0 to 9), would be 5110 neurons in total. Now we can calculate how many parameters there would be to be optimised with each neuron of a level connected to all neurons of the previous level: 1700 x 2500 (weights) + 1700 (thresholds) + 1700 x 1700 (weights) + 1700 (thresholds) + 1700 x 1700 (weights) + 1700 (thresholds) + 10 x 1700 (weights) + 10 (thresholds) = approximately 10 million parameters. A final point to note is that in addition to the increase of neurons and connections, artificial neural networks can work together with other algorithms, creating a more efficient hybrid system.

Why the size makes the difference

Let’s go back to the question we asked ourselves at the beginning. Now that we have an idea of the operating principle of a neural network, we can also understand why a greater number of neurons implies greater skills. Actually, we should also talk about the number of connections. Thanks to them it is possible to have very complex mixes of inputs and therefore the possibility of manipulating in a more refined way what enters a neuron. We must think that a neuron does an extremely simple operation, so if we want to obtain a complex capacity, we must divide it into a certain number of elementary operations, which, combined together, will be able to give the result. If I have many input values, as in the example of the image of the handwritten number, in order to manage them all and not lose information, the number of neurons must be high. Let’s try to exaggerate and put only one neuron in the intermediate level, it will receive altogether the information of the 2500 pixels. It will only be able to vary their weights before adding them all, in this way, however, it will only have a value that will be an average of all the individual values, which says absolutely nothing about the image. If, on the other hand, we have more neurons, the first will only be able to give more weight to certain pixels and send that information forward, the second to others, and so on. In this way, the information is not lost and is processed more and more at each step up to the last level, that of results, where the neuron corresponding to the recognized figure will release the value 1. This division of tasks between neurons is obtained with the learning phase and the relative optimisation of the parameters as we have seen in the previous paragraph.

Lack of intelligence or learning?

Let’s give an example of the human brain. You went abroad, to a country whose language you absolutely do not know. A person approaches you and speaks to you in this language, your brain processes all the sound information received from the ears, each neuron is activated or not by the set of electrical impulses and, depending on the threshold, sends information or not to the following neurons. and so on until the results. But the results won’t make sense, they’ll just be a jumble of unknown sounds, even though your brain has done the same job it always does. The difference compared to when we listen to a dialogue in a known language is that in this case the learning part is missing, where all the parameters are set to process the inputs and give a useful result. Also in this case all the information coming from the person who spoke to you was lost, but unlike the example of the single neuron, that could not process the information of 2500 pixels by itself (lack of intelligence), in this situation, the number of neurons would have been enough, but the previous learning phase was missing.

 

In the next post, we will talk about what concrete results can be obtained with an artificial neural network and its main practical applications with the enormous benefits it brings.

The evolution of artificial intelligence - IPS Cloud

Many people think that computers were invented after the discovery of electricity. In reality, the firsts were mechanical and dated back to the second half of the 1600s and were already able to carry out operations of addition, subtraction, and multiplication. But it was in the thirties of the last century that the foundations for computers and information technology were laid as we know them today. Claude Shannon, from Yale University, showed the potential of using the binary system in telecommunications and started what we now call the digital age, made of ones and zeros. In the same period, Alan Turing (famous for having deciphered the codes created by the German Enigma machine during World War II) published an article about the Turing Machine, a theoretical machine capable of executing algorithms (a procedure of logical instructions) and managing data. What Turing defined in this paper is still the basis of our computers today.

The machine that imitates man

Already during the forties of the last century, people talked about artificial intelligence (even if the name was born during the fifties). Artificial neural networks were born, at least on paper. It had been demonstrated that any computable problem, that is solvable by an algorithm, was solvable with a network of neurons. This network was made up of elements that could be “off” or “on”, and the state of each element was determined by the set of stimuli from the surrounding neurons (we will talk more about neural networks in the next post). In 1950, two Harvard students, based on the discoveries made in the previous decade, created the first rudimentary artificial neural network which they called SNARC (Stochastic neural analog reinforcement calculator). In the following years, a group of ten researchers led by John McCarthy took up the challenge to build a machine that would imitate the learning and intelligence of the human mind in all respects, and all to be completed in two months. Surely you are thinking that their ambition went a little beyond reality and I don’t think I need to tell you how it ended. Unlike them, Allen Newell and Herbert Simon, thanks to a more realistic but still surprising goal for the time, had already managed to build a machine that was able to prove mathematical theorems. In addition to having made various contributions to this subject, McCarthy is the author of the term artificial intelligence, which, from its first use in 1956, officially gave birth to the discipline of the same name.

Ambitions and difficulties

Imagine the enthusiasm that this newborn discipline created. The ability to realise machines able to reason seemed to have catapulted science fiction into reality. The first attempts were very promising. It was possible to prove even very complex geometry theorems and in 1966 James Slagle of MIT (Boston) succeeded in creating a program that solved integrals. This is not an easy operation and I think we can all confirm it by thinking of when we were in high school or university and we faced examples that we just hadn’t got a clue about how to solve. Unfortunately, all this euphoria died down soon. The researchers realised that in reality it was enough to increase the complexity of the system, even slightly, and the computational time became unsustainable. For example, if we apply a resolution system (which can be neural networks or another type of algorithm) to find the value of a variable and we say that in a few hours of computation we arrive at the result, by increasing the number of variables, this time can become longer than the age of the universe. This can depend on both the type of algorithm or system that is used to find the solution, and the computing power of the machine used. Sometimes it is even enough to increase the number of variables from one to two to make the system unsolvable in a reasonable time. For this reason, during the sixties, the interest in artificial intelligence faded and the funds were progressively cut.

From the 80s to now

In the 80s there was a rekindling of this discipline, the spark was fired thanks to the transition from the academic to the industrial world. In 1982, the first commercial intelligent software was used. It was a system to manage the sales of computers, able to recognize if there were missing components in an order. To do this, it had to understand and analyze the relationships that existed between the various components and manage any errors or deficiencies. This “toy” saved the company 40 million dollars a year. It didn’t take long before most of the big companies introduced intelligent systems to manage many different processes.

From 1986 there was also a return of neural networks, which remained somewhat on the sidelines after the limitations encountered during the sixties. New approaches were applied which led to promising results. Furthermore, in 1996 there was the famous chess victory of the computer Deep Blue (built by IBM) against the world champion Kasparov. Although this machine did not use neural networks, it was anyway huge publicity for the machine that imitates and surpasses man. A year later the intelligent systems landed at NASA, which used them to manage various aspects of space missions.

Today, intelligent software is making its way into all sectors. Think self-driving cars or sales forecasting systems. From weather forecasts to failure predictions in industry, passing through finance. Everything is transforming and becoming smart. The loT (internet of things) is leading to the connection of more and more objects to the network, therefore more and more data to be interpreted and exploited to improve efficiency, as well as the ability to remotely control everything. Intelligent systems lead to a breakthrough in the management of what is called Big Data and allow us to partially replace humans in making predictions, as well as optimizing complex systems.

Where will the future lead?

Today, artificial intelligence is able, for example, to recognize a person’s face or spoken language, but it is still far from many other characteristics of the human mind. This doesn’t make its possibilities less surprising or less effective, as we’ll see more in future posts, but if the question is how close it is to a human’s mind, the answer is not much. Many have speculated on where research in this field will arrive and when, but obviously, there is no certainty. Looking at the technological evolution over the centuries, we see an exponential trend. Homo sapiens took 150,000 years to arrive at agriculture with permanent settlements, only 7,000 to build the first empires, and science as we know it today was born just 500 years ago. As we saw at the beginning of the post, the IT era is about a hundred years old and only in the last 40 it has had a dizzying evolution. Looking at this trend, one would think that if it will continue in this way it would not be so strange in a hundred years to witness (for our posterity) machines capable of replicating all or almost all the skills of the human mind. And if we got to that point, maybe we could go even further, with machines that are much more intelligent than humans. On one hand, this fascinates, but frightens on the other. With such a scenario, would human beings still be at the top of the pyramid on our planet? We leave science fiction to answer this question, which has already given vent to many fantasies with the most disparate scenarios.

What is artificial intelligence? - IPS Cloud

We often hear about artificial intelligence, but what it is and what its real potential is, is not always clear. The purpose of this and the following articles is to try to clarify and define its boundaries, up to its practical applications and advantages.

Let’s start with intelligence

First, we should try to define what we mean by intelligence, and this is far from being a simple task. Let’s start with the etymology of the word: intelligence comes from the Latin intelligere, which means to understand, to comprehend. We can see it as the process of passing from not knowing how something works to its understanding. I don’t think anyone could object that Newton used intelligence to understand what lies behind an apple falling to the ground, and he used intelligence to understand that its dynamic is the same as the dynamic of the moon rotating around the earth or the latter around the sun. But if I asked you if a newborn needs intelligence to learn how to walk, what would you answer? Or if our dog approaches and licks us because he understands that we are sad or suffering, is that intelligence? I am sure that for these last two questions, I would not have the same answer from everyone. This makes us understand how intelligence is a concept that can be interpreted in different ways and different people can decide to define more or less wide boundaries

We could go even further and ask ourselves if the living beings, who made an effort to move out of the water and “learn” to breathe the air, did so thanks to intelligence. In this case, I believe that almost everybody would say no. Because it is an evolutionary process, dictated by mutations and random facts, which brought aquatic beings out of the oceans after many generations. But even primitive man has learned to cook food thanks to random events, as scientists today can discover and learn something thanks to chance or more or less fortuitous attempts. Therefore, could we see the whole evolving living beings as a kind of global intelligence? I don’t want to try to answer this question, but I wanted to go up to this extreme to try to get rid of the prejudices we could have about the meaning of a term and be able to grasp many more facets.

Man-machine comparison

One feature that still surely distinguishes us from machines is the awareness of what we know and what we do. This does not mean that we are aware of everything we do (especially someone, you’d say…). Think of actions such as walking, taking an object with your hand, and so on. These are actions behind which there is no logical reasoning, that would give us a method to elaborate the way to coordinate thousands of muscles and carry out such a complex act. In fact, it seems very simple, we don’t even have to think about it. How many of you happened to be driving your car on your way to work and at some point wondering how you got there? As if your mind had done everything except thinking about driving and where you were going. We can say that we worked on autopilot. But it certainly wasn’t like that the first time you got behind the wheel, the process was much heavier, you had to understand, think, and learn. This denotes how many skills, that do not require reasoning, have become so after a learning process. Therefore, we could say that driving a car requires intelligence. In the first phase, to create the procedure in our memory and then to be able to use it, allowing us to manage all the sensory inputs involved and obtain the result of getting to work safe and sound.

We can summarize that in living beings there are innate abilities (developed through evolution), others that can be learned and transformed into automatic behaviours, and qualities that require the ability to find logical connections between things that apparently seem disconnected (they are those that allow us to discover new things). The time has come to ask ourselves which of these characteristics are typical of machines as well. The answer is all of them. This does not mean that machines can equal human beings in all their intellectual abilities, we are still extremely far from this goal, but it means that they are able to imitate the human mind in some of its capabilities.

Innate abilities and learning

We can look at a machine running an algorithm (a procedure of logical instructions) as an innate ability. Meaning that the computer, as a whole of hardware and software, was built and programmed to perform a certain task. Unlike human beings, it did not autonomously evolve to become what it is today, but it is the product of the cultural and technological evolution of humans. This feature has great potential if we think that it allows machines to obtain results that human beings cannot achieve. This is so thanks to their great speed, to the fact they can have powerful sensors and operate without resting. Let’s think of the security systems that read your retina and compare it to samples in fractions of a second; or to navigation systems that calculate the fastest route for distances of thousands of kilometers in few seconds. These are things that humans are not able to do or even learn, because our characteristics do not allow it. Maybe it would be a bit of a stretch to call this intelligence, but we could see it as a transfer of the human intellect into the capabilities of the machines. Again, I want to dare and try to define the human-machine sum as an entity a little more intelligent than the human alone.

What is really interesting is that a machine is also capable of learning and can do it in a similar way as the human brain. One of these systems is called artificial neural network. In the next posts we will briefly retrace the evolution that in the last century has led us to this point. We will then go into a little more detail, explaining the functioning of these neural networks and how far they have approached the brain’s capabilities, to conclude with the practical advantages they bring to the industrial world.

What are KPIs and how to use them? - IPS Cloud

To operate, a company needs to create profits. There are two macro factors on which we can work to improve this: the increase in revenues and the reduction of costs. In both cases, I need to know the details of the current situation, compare it with the goals I have set, and define what actions will lead to their achievement. To obtain this purpose, KPIs play a fundamental role. Let’s see what they are and how to make the most of them for improving business results.

Measuring for improving

KPI stands for Key Performance Indicators. These are numbers that I measure, not more-or-less subjective judgments. I want to quote Lord Kelvin (nineteenth-century scientist and engineer) “If you can’t measure something, you can’t improve it.” Certainly, this statement is very strong, but it contains a truth. The first step for improvement is to have objective values that show the state of a process, otherwise, the risk is to have the feeling that things are in a certain way when in reality it is not so. And the numbers above all let me know for sure if I’m improving and how much. This does not mean that these indicators are the solution to all problems or the magic wand that makes things better. People’s intuitions and ideas remain the key to improvement, but with targeted and well-made measures, you have at your disposal a very powerful tool to stimulate ideas and measure the goodness of the changes that are taking place.

A method to be more efficient

A KPI can be any measurable parameter, which gives me useful information on the performance of a business area. In most cases, it is not a thing in itself, but is part of a method. Below we outline the fundamental points, which we will then analyse one by one.

  1. Define the area to be monitored and improved (e.g. finance, marketing, production, logistics, quality, sourcing, etc.).
  2. Choose the objectives and the indicators that best describe them.
  3. Measure the state of the art and quantify the objectives.
  4. Define a frequency for comparing the indicators with the objectives.
  5. Maintain and implement a list of practical actions to bridge the gap between measured and desired values.
1. Define the area to be monitored and improved

Surely the first step is to decide where I want to take action. In the case of starting from scratch, it is better to begin with only one business area and focus on that until you master the method and start seeing the first results. Starting too many things together is confusing and normally you cannot follow them all effectively. If there is an area clearly more in difficulty than others, you can start from there. Otherwise, it is advisable to first choose an area where there are more skills, or where there are people who manage it who have more aptitude for change. This will lead to earlier results and stimulate change in other areas. If I can put a positive example in my pocket quickly, it will be easier to convince those who are more reluctant to take this path.

2. Choose the objectives and the indicators that best describe them

The direction we often take is to do our best to improve something as much as possible. Although it seems a very positive approach, it hides a problem: the lack of a clear goal. In its absence, it is easy to get lost and go in different directions without hitting the target. In addition, you may have the feeling that you have done a lot, but the concrete results may be small or even absent. This is why it is important to define from the start where you want to go and define it objectively, with numbers, so you are sure that it will be clear to anyone. Furthermore, a goal should not be too complex unless it is really necessary.

Practical examples of objectives and related indicators

Let’s try to give practical examples of possible objectives. In the production field, I could set the goal to be more efficient, therefore reducing costs. But as we said before, I have to find measurable and easy-to-obtain indicators. One can be the ratio between the hours sold (used to cost the product) and the hours actually spent. Or the ratio between the productive hours and the hours of the presence of operators. In the first case, I see if I am taking more time than the budget and I can react by looking in detail at the production process. I might discover that I was wrong in budgeting, but there is no guarantee that I can sell my product at a higher price, so, I have to understand how to reduce the time cycle. Or I could see that the estimate was correct, but there is a problem in the process that slows it down and, consequently, I act to remove it. On the other hand, in the case of the ratio between productive hours and presence hours, I might notice that the work is not well organized and the operators spend a lot of time around looking for what they need, taking time away from production.

Let’s move on to another example in a different area, sales. In this area, I could opt for three macro objectives: the annual sales, which might be divided by geographical areas; the minimum margin on orders, and the number of new customers in the year. In this case, in addition to having indicators that measure these three values, I can decide to add some more to better identify possible problems. An example would be the ratio between the number of orders and the number of offers, broken down by geographical area. This would help me understand if in some countries they are interested in my products, but maybe my pieces are not competitive enough. I could take aimed actions or decide to drop one country to put more focus on another.

Every company and every business sector has its features. It would be ineffective to try to define standard objectives that can be suitable for everyone. Except for the more general ones, such as production efficiency, percentage of scrap, value of sales, stock value, up to the economic and financial ones. But to be really effective you need to be well-aimed, a good approach is to look at your company in a detached way, trying to ask yourself as many questions as possible about all the improvement areas and always questioning habits. One of the best approaches is to ask the opinion of someone external. Not because he or she is more competent than we are, but simply because we no longer see many things that have become normal. A person who sees the factory for the first time notices many more things and helps us to see them, as well as bringing a different point of view that almost certainly contains positive ideas.

The combination of indicators

There are two reasons to combine indicators, the first is to aggregate micro objectives and make them become a single higher-level objective. In this way, we can adapt the monitoring to all company levels (this topic will be further explored later). The second reason is to obtain reliable indicators. Let’s take the example of production. If the operator does not record the productive hours correctly, we could see a budget hours / actual hours indicator fairly high. But the reason could be that the hours recorded are less than the ones actually spent. In the same way, I could see the indicator productive hours / presence hours high, but, as happened before, because the productive hours have not been recorded correctly, in this case in excess. However, if I create a third indicator which is the product of the previous two, the result will always tell me if there is a problem, even if it is “hidden” by one of the two indicators. As we have seen, in the first case the error is the productive hours lower than reality, instead, in the second case, the productive hours are higher than reality. This means that if one of the two indicators erroneously (or unfortunately, sometimes voluntarily) becomes better, the other will get worse, therefore in the third (the combination of the two) the error is canceled out and I see a reliable value. Keep in mind that this method works if I have only one potentially unreliable parameter.

Making measurements automatic

In cases where the potentially incorrect parameters may be more than one or in cases where I cannot apply the combination of indicators to cancel the errors out, a solution is to switch from manual to automatic detections. Today, technology allows for automatic measurements and data management at very low costs. These systems can potentially be applied to all machines and lines, even the most obsolete ones, by equipping them with the missing sensors. In this way, not only I always have reliable values without errors or manual system forgetfulness, but I eliminate the cost of hours spent by employees to collect data, enter it into a computer, create reports, and so on. They also allow the detection and processing of an amount of data that would not be possible to process manually. This last feature is causing a real revolution in the way companies are managed and, as computers did in the 80s, it is taking us into a new era.

The use of moving averages

Sometimes, the single collected values are too variable or lack information to be meaningful when read individually. For example, if every end of the day we detect the productivity of a machine that works 8h a day, we can have days when it is low because the machine could have not finished the last piece within the day. If the pieces had a long cycle time, e.g. 3h, the machine would finish 2 pieces in an 8h-shift. Therefore, the productive hours recorded at the end of the shift would be: 2pcs x 3h = 6h and the productivity would become 6h / 8h = 75 %, but in the last 2h the machine worked. There are two ways to overcome this problem: not measuring the productivity on the basis of the number of produced pieces, but on the number of effective productive hours of the machine (also for this, the automatic data collection systems come in help), or calculate the moving average of a reasonable period, which in this case could be a week. The average filters the single anomalies, giving us more reliable values.

The moving average is nothing but an average that is recalculated at each new incoming value over the period I have chosen. Going back to the example above, at each end of the shift, in addition to recording the value of the day, the average of the last 5 values is calculated and recorded ?(assuming to work 5 days a week). This is done every day, so we will have two sets of numbers: one of the daily values and the other of the averages of the last 5 days. If we imagine it on a graph, we can see the moving average as a smooth curve compared to the “sawtooth” curve of the single-day values.

3. Measure the state of the art and quantify the objectives

To quantify future goals, we must first know what the current situation is. A key feature of a goal is that it must be achievable. Otherwise, it would not give us a big added value, we would only be frustrated by the fact that we cannot get there and at some point, we would let it go. A future goal must be a reasonable percentage increase in today’s values. For example, if today I have the production hours / presence hours indicator at 78%, it does not make sense to set the goal at 100% to be reached in six months. First, because it will never be 100%, I have to count people’s breaks; secondly, because things do not change overnight, but are processes that require time and perseverance. It would be much more reasonable to target a 5% increase, which, in six months, could already be challenging. A small constant increase over time is better than trying to climb Everest and giving up because it is too hard.

4. Define a frequency for comparing the indicators with the objectives.

KPIs are very useful tools for identifying problems and helping us to improve. But we must avoid falling into the trap of turning them into numbers that I collect when I have time and, after they are collected, I throw them in a drawer to look at them one day that will never come. The best method is to schedule periodic reviews, involving people who have a responsibility for those goals. If we want to achieve results, the two priority and strictly necessary characteristics are determination and perseverance. Sometimes we see situations where the method is not exactly the best, the skills might be higher and the ideas are definitely not outstanding, nevertheless, the result has come. Normally in those cases, determination and perseverance were so strong that they made up for those shortcomings. Don’t get me wrong, I don’t think that these two characteristics alone are sufficient (skills, method, and good ideas are very important), but I mean that they are an ingredient that cannot be lacked if we want to reach the result and to get there in a reasonable time.

5. Keep and implement a list of practical actions to bridge the gap between measured and desired values.

During these periodic reviews, we need to check where there are gaps between indicators and targets. Whenever we find an indicator that is not going as we expected, we must try to list the possible causes. Let’s go back to the previous example, the productive hours / presence hours. If this indicator is lower than what we have set, some of the possible causes may be a lack of raw material for the machines, malfunctions of the machines that cause too many stops, operators doing unnecessary activities, etc. To list the causes, there is nothing better than carefully observing the workstations for a while, at least until the main problems have been identified. Then, with automatic detection systems, we can have constant and precise control, but in the early stages, a direct presence is always preferable.

The second step is defining actions that will lead to improvement. These actions must be short-term. If we think of something in the medium or long term, it is better to divide it into short actions, which we can do and verify within the next revision. They must be practical. We must always stay grounded and do concrete things that we know how to do. They must bring a substantial advantage. At least at the beginning, let’s focus on actions that bring a sizeable result and leave the details for a second phase. For each action, we must always define one person in charge and a deadline. In most cases, defining two or more persons is equivalent to defining no one and there is a high risk that the action will not be completed on time. Lastly, let’s never forget to write down everything we define to do, with the features we have just listed, and share it with everyone involved. This will avoid any misunderstanding or forgetfulness.

How to aggregate KPIs to obtain different levels of detail

According to the size and structure of the company, it can be necessary to make a sort of KPI tree. The managers of specific areas will use specific indicators, but as we go up into the company structure, more aggregate indicators are needed. They must give an overview of the area to the upper level, this is up to the general manager. Assuming that all indicators are ratios (therefore dimensionless percentages), we can aggregate them by calculating the average. It is always better to also define a weight for each indicator, because not all of them have the same impact. For example, if productive hours / presence hours = 78%, production budget hours / production actual hours = 89% and packaging budget hours / packaging actual hours = 86% and I estimate that the impact of the packaging is small compared to production, I can decide to give it less weight. In this way, in the aggregate I give more importance to the other two indicators. The calculation could be: (0.78 x 1 + 0.89 x 1 + 0.86 x 0.3) / (1 + 1 + 0.3) = 0.84. In this case, we decided that the packaging weighs 30% and the others 100%.

Another method that can be applied is to directly multiply the ratios (as we did above, even if the purpose was different). In this way, the negative effects are not mediated, but added together and the aggregate indicator becomes more sensitive to inefficiencies. Again it might make sense to use different weights for different indicators, but being a product and not an average, we have to do it differently. Suppose that, as before, I want to give a weight of 0.3 to the third indicator. First, we have to find the coefficient “C” of this weight, to be multiplied by the third ratio “R” (packaging budget hours / packaging actual hours). It will not simply be equal to 0.3 as in the weighted average, but to obtain it we must apply the following formula: C = P x (R – 1) / R + 1 / R, where “P” is the weight I want to give to that KPI. Therefore in our specific case it will become: C = 0.3 x (0.86 – 1) / 0.86 + 1 / 0.86 = 1.114 and this is the coefficient to be multiplied by the third indicator in the aggregation formula: 0, 78 * 0.89 * 0.86 * 1.114 = 0.67. The result is an aggregate KPI equal to 67%. As you can see, it is significantly lower than the same indicator calculated with the weighted average, which was 84%. You can choose the method you prefer, as long as you use the same method also to aggregate the respective objectives, otherwise, we would compare apples and oranges.

IPS Cloud - Company network security

Today all corporate networks are connected to the internet. The reasons are numerous, from the exchange of emails to the search for information, from the use of the cloud for data storage to the various services that we access with a browser. Furthermore, we increasingly need to access the corporate network remotely, whether from our home or during a business trip. For this reason, it is essential that all these connections are made with the right level of security. Let’s see what are the available means, how they work, and when to use them.

Authentication and authorisation

Let’s imagine we are suppliers of aerospace components and go to visit a NASA site. Surely when we get there, before letting us in, they will ask us to identify ourselves with a document. They will want to know the reason for our visit and they will register us to track it. They will give us a badge to wear that identifies us and someone will escort us exactly where we need to go. We would never be alone. If we were ill-intentioned persons, who want to steal information, we wouldn’t have an easy life. It would not be simple to get out of the secure path in which we are. And even if we did, the various areas would have controlled access systems, perhaps through badges, if not more sophisticated. This all started with two basic steps. First of all, we were identified and authenticated, and consequently, we were given permissions on where we could go and what we could see.

The same thing occurs in the digital world. If users of our company are not required to authenticate before accessing the data, any intruders who manage to enter the network could freely access the servers and PCs. They could do whatever they want with our data, in addition to the possibility of blocking the operations. To go back to the previous comparison, the more checkpoints where “I need a badge to enter” I put in my network, the more the hackers will find the access difficult. Consequently, they will have a hard time trying to damage or steal the data. An apparently trivial but very effective example is how to access the operating system of your PC. If I log in as an administrator I am allowed to do what I want on my computer. You may be thinking it’s good, but we must take into account that if hackers manage to get into my PC, they can do whatever they want as well. And this is a little less good. If instead, I log in with a profile that authorizes me to do only what I need daily, it becomes much more difficult for hackers to tamper with sensitive parts of the operating system or access data for which my user is not authorized. This does not mean I must necessarily be limited too, if sporadically I need to access sensitive functions or data, I access them with another user who has these permissions, but only for a very short time. This method is called the principle of least privilege. If you have internal IT experts, the best thing is to let only them access sensitive areas of PCs and servers. This prevents inexperienced people could inadvertently making the system vulnerable. This does not mean that the principle does not apply to an IT operator as well, who must use administrator privileges only when they are needed.

System monitoring

How do we find out that something dangerous is going on before it’s too late? The first thing is certainly the use of an antivirus, which blocks any risky actions in advance, like opening potentially dangerous files or accessing unsafe websites. However, malware is not always identified in advance, therefore it is good practice to have the antivirus periodically perform in-depth scans. Furthermore, it wouldn’t be a bad thing to have a system that records everything that happens on the network, so who has access to what and when. So we can check if something anomalous has happened and take action before it is too late. For example, those who have a Google account have probably experienced the login from a new device. Google immediately notifies us that there has been an access from an unknown PC or smartphone on that day at that time from that place. In this way, if it were not you, maybe you would be in time to change the account password before the attacker manages to steal or damage data.

Data encryption

Nowadays, transferring information through the Internet has become an essential necessity. But this leads to another need: not having my data read by anyone who is not authorized. On the World Wide Web, as the name implies, there is the whole world. Anyone can potentially read what we transfer unless we make it unreadable. This is achievable by means of cryptography; that is, the translation of messages in an incomprehensible language, such as a code made of apparently random letters and numbers. To obtain this, an encoding key is used, which is a series of rules that determine in which code a sentence is transformed.

Symmetric key cryptography

The simplest encryption system is the so-called symmetric key system. This method uses a single key to both encrypt and decrypt the message when it is received. So this process requires that the person who writes the message and the person authorized to read it are both in possession of the key. The weak point of this method lies in the management of the key. If the key is intercepted by hackers when we send it to the other person, they can use it to decipher all the messages we are exchanging on the internet encrypted with that key.

Asymmetric key cryptography

In 1976 the two mathematicians Diffie and Hellman published a new cryptography system. This method involves the use of two keys, one public and one private. To explain how it works we use the classic analogy of padlocks. Suppose we want to exchange some boxes by mail with a friend of ours and we want to be sure that no one can open them. We could put a padlock on the box, send the key to our friend first, and then the box. But in this case, we would have the problem mentioned above. If someone intercepts the key, they could make a copy of it and then open the lock of the box in transit. To avoid this we can do something more clever. We ask our friend to send us an open padlock of which he is the only one who has the key. We put this padlock on the box and send it to him. Since it was never sent, it is impossible that someone could have intercepted the key during the transit.

The padlock in our example corresponds to the public key, while the key that never left our friend’s house corresponds to the private key. Obviously, if we want to exchange messages in two directions, we would need four keys in total, two public (two padlocks) and two private (the two keys of the padlocks). In reality, even this system has a weak spot. Since I am sending an “open padlock”, anyone could look into it trying to reconstruct the key. To build the public key (the padlock) starting from the private key (its key) and avoid this problem, mathematical calculations that are difficult to reverse are used. For example, with a computer, finding the result of the multiplication 709 x 887 is immediate, but it is not so fast to find which two numbers have been multiplied to obtain the result 628883. If we make this number large enough, let’s say at least 600 digits, the time to find the two values that multiplied together give that result is so long that in practice it is not feasible. The two numbers to be multiplied represent the private key of the padlock, while the result of the multiplication represents the open padlock that I send. This is just an example to explain the concept, there are various methods for obtaining a secure “padlock”.

Where cryptography is used

Maybe you have noticed that today almost all websites start with HTTPS. This additional S indicates that the exchange of information with that site is secure because it is encrypted using the public and private key system. If we are going to a site that does not use encryption, the browser warns us with a message saying not secure. In reality, the systems used are often hybrids between asymmetric and symmetric keys, because using only the former, communication would become very slow.

There is still a problem to solve. For example, when my bank’s website sends me the public key, that is the padlock to close my box before I send it, how can I be sure that it is really my bank and not a hacker who pretends to be the bank? The answer lies in certificates. There are certification authorities that ascertain that a public key actually belongs to its owner, who has deposited it with this authority. In this way, if an attacker sends his public key to try to steal information from us, the browser does not recognize the certificate as reliable and immediately warns the user of the risks.

The VPN

In addition to websites, encryption is used to create secure channels between two physically distant private points. An example is when I want to connect to the corporate network from home. If I log in without taking any precautions, all the data exchanged would be accessible by anyone, given that they pass through the internet. To solve the problem I can use a VPN (virtual private network). It is a virtual channel that connects my PC to the company network, where the data passing through it is encrypted. In this way, I am confident that nobody can read what I am exchanging.

But even though the VPN channel is encrypted, someone could try to enter this virtual tunnel and get to the corporate network, the same way I entered it to exchange data. To avoid this, the authentication and authorization systems that we saw at the beginning are used. So, in addition to using encryption, there is an “entrance check” system as well.

In case we do not need to have a flow of incoming data, but we only want to send it outside our network (for example to a cloud server), instead of using a VPN, we can decide to open the communication only in one direction: outbound. In any case, the data must travel encrypted, otherwise anyone could read it. With this system, a hacker would not be able to read the information sent and could not even access our network through this communication channel, because the entrance is closed. To do this, however, we must choose a protocol that does not require communication in both directions, otherwise it would not work. An example is the MQTT, which publishes data on an intermediate server, to which the final server (where we want to send the data) will make a request to have it. This system is called publish-subscribe. The flow of information becomes bidirectional only from the intermediate server onwards. While, for our network, it allows the door used for this communication to always remain closed for the inbound flow.

The firewall

The name derives from the systems (e.g. fire doors) used to confine a fire in an area of a building and prevent it from spreading undisturbed. In a computer network, we can imagine it as a door manned by someone who checks what enters and exits. It can be placed between the corporate network and the internet, between a PC and the corporate network, or within the network itself at intermediate points. The aim is to avoid unwanted access.

A firewall is a set of rules that determines what can pass through a specific point. For example, to connect a user from home to the company, we can set as a firewall rule that only certain PCs can access (each computer has a unique identifier). So anyone who tries to connect from another computer is blocked. Or accept connections only from certain IP addresses (the address that uniquely identifies any device connected to a network). Its use can also be reversed. Let’s assume that a program with a virus has ended up on my PC. This program attempts to connect to the internet to open a channel that will allow a hacker to enter. I can set on the firewall that only certain programs can communicate with the internet, and only in certain pre-established ways.

Let’s summarise the 10 key points for cybersecurity

After having explained what the security tools are, we conclude by summarising the 10 main actions that need to be taken to make our network secure:

  1. Divide the network into areas and filter each entry through a firewall, and not only between the corporate network and the internet (which is the bare minimum).
  2. Manage areas, devices, and software with an appropriate authentication and authorization system.
  3. Always apply the principle of least privilege.
  4. Use a monitoring system to see what is happening on the network.
  5. Use strong passwords (the longer, the more secure) and not the same for different things.
  6. Constantly update operating systems and software.
  7. Have an active and updated antivirus on every computer and server.
  8. Use a VPN for private connections with the outside (unless encrypted connections that open only the outbound flow are used).
  9. Use only secure sites (you can read it in the browser).
  10. Do not use non-original programs, they can hide malware.
Cyber security - IPS Cloud

I want to start with the assumption that anything connected to the internet is potentially vulnerable to cyber-attacks. It can be a computer, a mobile phone, an alarm system, or any other device. It has an umbilical cord that can turn into a gateway for hackers. Therefore, it is sufficient not to connect anything to the internet and the problem is solved. Obviously, this statement is a provocation, the advantages that the Internet gives us are enormous. The impact would probably be comparable to do without electricity. And as for electricity, the solution is not to avoid using it, but to make systems and networks with the right level of security.

What are cyber attacks

There are various attack systems and the common factor is to reach the device with a software called malware. The purposes can range from creating a malfunction of the attacked object, to reading the information, up to controlling the system. Let’s consider hackers who take control of the computer network of a modern hotel. As in all other sectors, the level of digitalization is quite high and the doors of the rooms are locked and unlocked with coded cards. The hackers could lock all the doors and ask for a ransom to reopen them. And this is not just imagination, but a true story. They could lock the company’s computers and unlock them only if their requests are granted. In a more hidden manner, they could steal the data present in the computers (emails, documents, etc.) to resell them to whoever may be interested. Nevertheless, we must not be scared of this. Let’s consider another example; think about how our money is managed, in an IT system that goes through the internet and interconnects millions of users. But that doesn’t mean that when we get up in the morning we have to start worrying that someone will steal money from our bank account. In fact, let’s say it’s such a remote possibility that nobody thinks about it. Not because banks keep everything disconnected from the internet, on the contrary, they are totally connected, but because the security system they use is so well structured that being able to penetrate it would be an extremely difficult challenge.

Who are the hackers

Let’s start with the amateurs. These hackers lack advanced technical skills, but they exploit malicious programs found on the internet. Their purpose can even be only to cause damage, sometimes they do it just out of curiosity, other times to demonstrate their skills. In any case, we should never underestimate the troubles they can cause.

Then we find the actual hackers. People with in-depth knowledge of networks and IT systems, who are divided into three types. The White Hats look for vulnerabilities in IT systems in order to improve security. They do this for the owner, to whom the results are reported. On the contrary, the Black Hats do it illegally to make a personal profit. The job can be commissioned by someone else. The Grey Hats are located in between. They find the vulnerabilities of a system and, depending on the case, either they may communicate them to the owner or they publish them on the internet to let other hackers exploit their achievements.

Finally, there are real criminal organisations. These are well-organised and funded people, who can work for other people or even governments. Their attacks are aimed at specific targets, behind which there are often political motivations.

Why choose the Cloud

By cloud system we mean remote servers or, more in general, remote services. Instead of having local computers that manage data storage or different kinds of software, all this is done on computers located in special centres dedicated to this type of service. So, with all the risks we have seen earlier, why should we choose the cloud? I ask you the following question by using a comparison: Why put money in a bank instead of hiding it in our mattresses? After all, It becomes digital, into the network exposed to hackers, so this wouldn’t seem such a clever solution. This would be true if we don’t consider that the security level of a digital banking system is far superior to that of our house. Similarly, the cloud services of big players such as Microsoft, Amazon, or Google have much higher security levels compared to those we can have at home or in our company. These providers spend more than a billion dollars a year just on cyber security.

A migration already in progress

In reality, all of us are progressively moving towards the cloud, even if we don’t always realise it. To read our emails, we open a browser and go to the page of our email provider, or through an app on our mobile phone. All of our emails are on a server somewhere in the world, the same as the backup of our pictures or the files we upload on OneDrive or Google Drive, not to mention on social media. We are much more scared of keeping our photos only on our mobile phone, or emails only on PC because they could malfunction and we would lose everything. Whereas, in the cloud, they are constantly backed up.

Configuration and update of devices

Another important point to be considered is the state of our devices. Let’s take the example of a corporate server where there is a lot of sensitive data. Are we sure that the operating system is constantly updated? As soon as a hacker finds and exploits a bug and the problem becomes known, the operating system supplier releases an update to fix the bug, but, if the update is not promptly installed, our server is at risk. The same can apply to our PC or smartphone. Moreover, security configurations must be set correctly. Even a single wrong or unsuitable setting is enough to make a server or a computer vulnerable. Unfortunately, we cannot always have the best IT security experts who configure our network and the devices connected to it, whereas Microsoft, Amazon or Google have them, as well as banks. Lastly, there are backups. If a device is managed by us, we must manage correctly the backup of all data, to avoid a malfunction causing their loss. On the cloud, this is part of the service, so one thing less to be managed, checked, and maintained, with all the risks it would bring with it.

In conclusion, we can say that a cloud service is an intrinsically more secure system, always updated, with data backup and best configured to make an attack very difficult. The cloud alone is not the solution to every problem, we must also think about the security of the devices that remain on our premises. In the next post, we will talk in more detail about how these IT security systems and configurations work and their importance for the protection of our company from cyber attacks.

Why invest in monitoring plants and machines?

Keeping an industrial site under control not only means knowing what is happening on each machine or line at all times, but also allows you to use the data to improve maintenance processes and increase efficiency. This means eliminating all those wastes that in the past could not be avoided.

Traditional maintenance involves works based on the life expectancy of a given component, but often this forecast cannot have a good reliability, because the variables involved are manifold and the unexpected is around the corner. So we find ourselves working on a machine and maybe replacing components that would have worked for a long time or, on the contrary, not replacing a worn out component and causing a machine stop with all its consequences. In both cases the money to be paid out can be absolutely not negligible.

The latest technologies in this sector allow you to manage targeted maintenance works, avoiding both unnecessary replacements and downtime. The costs saved with these types of systems are much greater than you can imagine and consequently there is a return on investment in a short time. Our IPS Cloud system is based on these technologies and offers a 360-degrees service for all types of needs.

For further information do not hesitate to contact us