105

A9R12utuq3 mvgafi 5xk - Routledge

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

14 Winning at Go Understanding What Reinforcement Learning Is

Go is kind of like the “Grail” for artificial intelligence researchers. Most of the “combinatorial games” we saw in chapter 5, like chess or checkers, are resolved by a computer using the minimax algorithm. Not Go, though.

THE QUEST FOR THE GRAIL

A Go board has 361 intersections where you can place a white or a black stone. That makes 3361 possible game situations. Written out, that number is:

174089650659031927907188238070564367946602724950 263541194828118706801051676184649841162792889887 149386120969888163207806137549871813550931295148 03369660572893075468180597603

To give you an idea of the magnitude, let’s consider the number of atoms in the universe (1080), which is pretty much the gold standard for big numbers in ar-tificial intelligence. Now, imagine that our universe is but one atom in a larger universe. You make a universe containing as many universes as our universe

127

contains atoms. And you count the number of atoms in this universe of universes. That adds up to lots and lots and lots of atoms. It’s enough to make you dizzy.

To have as many atoms as there are situations in Go, you need to make a trillion universes like this! In short, we are very far from any modern com-puter’s processing capacity. As with chess, we have to use an AI algorithm.

Unfortunately, the minimax algorithm isn’t going to do it for us.

A BIT OF CALCULATION

Remember, this algorithm relies on the idea of trying all the game possibi-lities on a few moves, and choosing the one that leads to the best result. With 361 possible moves at the start of the game, the number of situations to examine increases very quickly. For instance, to evaluate all four-move games alone, the minimax algorithm must consider 361 × 360 × 359 × 358 possibilities – more than 16 billion configurations. It will take several seconds to process this with a modern computer.

With only four moves examined, the minimax algorithm will play like a novice. A game of Go consists of several hundred moves. Given the billions of possible situations after only four moves, it is not possible to see your opponent’s strategy at all! We need to come up with a better method.

In Go, players take turns placing black and white stones on the board to form territories. The white player just made his second move. It is hard to say exactly how the game will turn out at this point.

128 Understanding Artificial Intelligence

WANT TO PLAY AGAIN?

The algorithm used by computers to win at Go has been known since the late 1940s by the name “Monte Carlo Tree Search,” a reference to the casino located in Monaco.

What an odd name for an algorithm! It was given this name because this algorithm relies on chance to resolve problems.

For each of the 361 possible moves, we’re going to play a thousand games at random. Completely at random. The opponent’s moves and the computer’s responses are drawn at random. We make note of the game’s outcome, and we start over one thousand times. Each time, we start over with the same initial configuration.

To evaluate each of the 361 moves, the algorithm makes a statistical calculation on the scores obtained for the thousand games played at random. For example, you can calculate the mean of the scores (in practice, computer scientists use slightly more complex calculations). The Monte Carlo algo-rithm makes the hypothesis that, with some luck, the best move to make is the one that leads the board to produce the best statistics. This is the move that will be chosen.

By assuming that each game lasts under 300 moves (which is a rea-sonable limit if we base this on games played by humans), we will have made a maximum of 300,000 calculations for each of the 361 “first moves” that we have to evaluate, which is around 130 million operations in total. This is more than reasonable for a modern computer.

14 • Winning at Go 129

RED, ODD, AND LOW!

Monte Carlo algorithms have been used in this way since the 1990s to win at Go. In 2008, the program MoGo, written by researchers at Inria, the French Institute for Research in Digital Science and Technology, achieved a new feat by repeatedly beating professional players. By 2015, programs had already made a lot of progress in official competitions, although they had failed to beat the champions.

However, in March 2016, the program AlphaGo defeated the world champion, Lee Sedol, four matches to one. For the first time, a computer achieved the ninth Dan, the highest level in Go, and was ranked among the best players in the world!

To achieve this feat, the engineers at Google used a Monte Carlo algo-rithm combined with deep neural networks.

As with any Monte Carlo algorithm, lots of matches are played at random to determine the best move. However, the computer scientists do not make the computer play completely at random. Not only is the computer unable to truly choose at random (there is always some calculation), but it would also be unfortunate to play completely at random, since even the greenest Go players know how to spot the worst moves.

This is where AlphaGo’s first neural network comes in. The Google team refers to this as the “policy network.” This is about teaching a neural network how to detect the worst moves by giving it game examples as input. This prevents the Monte Carlo algorithm from producing too many bad matches and improves the accuracy of its statistical calculations.

A deep neural network doesn’t work much differently than Rosenblatt’s perceptron: the input is a 19 × 19 three-color grid (black, white, and “empty”), and the output, instead of a simple “yes” or “no,” is a value for each possible move. With a deep neural network and some graphics cards to do some GPU processing, this is feasible.

NO NEED TO BE STUBBORN

The other improvement AlphaGo makes consists of stopping before the game is over, since often there is no point in continuing when it becomes clear the game is going so poorly for one of the players. Once again, this is a problem that is well suited for a neural network, where the input is the state of the

130 Understanding Artificial Intelligence

board and the output is a yes or no answer to the question “Is the game completely lost for one of the players?” The Google engineers call this the “value network” – that is, a network that measures the value of the game.

The interest in ending the game before it’s over is to play shorter games … and thus play more every time. Instead of only one thousand games for each move, the algorithm can simulate two to three times more … and the statistical calculation to determine the best move will be even better.

A BIT OF REINFORCEMENT

By combining a Monte Carlo algorithm with neural network algorithms, the AlphaGo team was able to program a computer that quickly and correctly decides what move to make.

However, to program these two neural networks, the AlphaGo team has to have examples of Go matches. Indeed, it’s not enough to show the computer a Go board and tell it “Go on, learn!” The policy network has to be told which configurations contain good moves and which moves are to be avoided. The value network has to be shown thousands of Go matches and told, every time, which ones can be chalked up as a loss and which ones are sure to be a victory.

Whatever learning method you use, you have to provide the machine with lots of examples. It is not possible to find all the examples manually by searching in the Go archives. The solution used by the AlphaGo team relies on another artificial intelligence technique: reinforcement learning.

14 • Winning at Go 131

STRONGER THAN EVER!

It is hard to say exactly when reinforcement learning was invented. Even so, its principle plays an important role in AI algorithms. The TD-lambda algorithm invented by Richard Sutton in 1988 is widely considered the first reinforcement learning algorithm that could be broadly applied to many categories of problems.

All reinforcement learning algorithms share a common feature: they do not need examples to learn.

When young children learn to catch a ball, they learn by trial and error. They move their hands without much rhyme or reason at first, but they gra-dually learn the right movements to sync up with the ball’s movement. In this learning process, children don’t rely on examples. They correct their errors over subsequent attempts.

This is the idea behind reinforcement learning: the computer calculates a “score” for each possible action in each situation by “trial and error.” As it does this, it gradually adjusts the calculation’s parameters.

STEP BY STEP

Like back-propagation in a neural network, reinforcement learning lets us adjust the parameters of a sequence of calculations. However, unlike supervised learning, the output doesn’t depend on examples. The systems that these algo-rithms work on don’t have input, per se. They begin at an initial state and per-form a sequence of actions to reach a desired state.

132 Understanding Artificial Intelligence

Let’s use Go as an example. The initial state is the empty board. The system makes a series of moves, observes each of the opponent’s responses, and the final state is achieved when the game is over. On the basis of the result at the end of the game, you can assign a score to your series of moves. Computer scientists call this a reward function.

In this type of system, there is no corpus of examples associated with the correct output, as is the case with neural networks. We have a given sequence of actions and just as many intermediate inputs. In this way, each state on the game board corresponds to an input, and the system’s response is the action chosen by the system (its move). The actions are only evaluated at the end of the game, once all the actions are complete.

Reinforcement learning consists of adjusting the parameters of these actions by using a reward function. Each action, or each intermediate state (this depends on which algorithm you use), is given a score. When the computer reaches the final state, the algorithm adjusts the scores of all the actions or intermediate states encountered during the match in accordance with the reward value. For example, imagine that the system’s first move is H5, its second is B7, and so on until the end of the match, which it wins handily. In this case, the scores for actions H5, B7, and the following moves will be increased. By contrast, if the match results in a loss, their scores will be decreased by however much the reward function decides.

14 • Winning at Go 133

To adjust the parameters of your system, which can decide which action to take at each stage of the process, the reinforcement learning algorithm is going to play millions of “fake” Go matches to adjust its parameters. To ensure that the learning is effective, this algorithm carefully chooses its actions. Unlike with the Monte Carlo algorithm, its moves are not made completely at random. As the algorithm advances, the “right” parameters have a higher chance of being chosen. In this way, the system reinforces the certainty of having a good strategy to achieve the desired final state.

PLAYING WITHOUT RISK

Not all problems can be resolved with this method. For example, let’s con-sider self-flying drones (NASA has been working on a prototype since the early 2000s). It is not reasonable to build a million drones, send them up in the air, and watch them crash to the ground over and over until we eventually figure out the right parameters. Only the Shadoks1 would use this method. Computer scientists use simulation instead. However, the algorithm only learns how to behave in simulation. There’s no guarantee it will work cor-rectly in real life!

Thus, reinforcement learning can only be used for applications that simulate no-risk operations, as is the case with Go. Using this reinforce-ment learning technique, AlphaGo engineers succeeded at gradually training the two neural networks: all you have to do is have the computer play against itself. This produces billions of matches that allow the neural network to gradually reinforce its confidence to make decisions, whether it be to reject a move (the “network policy”) or to stop the game (the “value network”).

GIVE ME THE DATA!

The same reinforcement learning technique can be used to teach AlphaGo to play chess and checkers. In 24 hours, the system calculates the best action sequences and becomes unbeatable.

1 The Shadoks are silly animated cartoon characters, very popular in France in the 1960s, that keep failing in building all sorts of machines.

134 Understanding Artificial Intelligence

These two learning methods, neural networks and supervised learning, rely on a similar idea. This consists of writing an algorithm to adjust a set of parameters in a calculation that allows the machine to make a decision. This adjustment is achieved by exploring a new space: the parameter space. When your system receives an input, it calculates an output based on the input’s parameters. The learning algorithm is going to explore this set of possible parameters, which is gigantic, to find values that allow it to obtain a good response … in most cases.

When the problem to be resolved is easy to simulate, as is the case with Go (losing a match isn’t a big deal), the reinforcement learning techniques allow this parameter space to be explored in a clever manner. In other cases, the system has to be given examples. A lot of examples, often in un-fathomable quantities. Thus, to be trained correctly, Rosenblatt’s perceptron needs more triangles than a geometry teacher sees in a lifetime!

However, in the era of “big data,” satisfying this need is no longer a problem. Artificial intelligence research laboratories build gigantic databases to train their algorithms. And if Google is the best at image recognition, natural language comprehension, and Go, it’s because their engineers have the ability to collect data from our internet searches, our telephones, our videos, and our emails.

Certain domains continue to elude these learning-based techniques because labeled data aren’t available. Consequently, artificial intelligence

14 • Winning at Go 135

researchers develop techniques using symbolic models, like the ones we saw in the early chapters of this book, to generate synthetic data based on com-puter models of a given domain. These synthetic data capture a degree of human expertise.

These very promising approaches have been in development for some years and have a bright future ahead.

And, just like that, computers now regularly outperform us. It’s going to take some time to get used to – even though we are solely responsible for this!

136 Understanding Artificial Intelligence

C H A P T E R 7

A Future with Artificial Intelligence

Iremember well the artificial intelligence, I

ingredients for a cake to as bright as I had used to tI was spending the whole

very first time I realised there was a concept like heard about robots doing more than mixing

be baked, and about a future which might not be hink. I was an eight-year-old boy at the time and school year in Ciechocinek, a small health resort

in the middle of Poland, famous for its saline springs and for one of the biggest graduation towers in the world. I was there to improve my health and respiratory system to stop sickness occurring so often. That evening, I was sitting in a small room with a TV set together with other, mostly older boys. The carer looked at me for a while, maybe wondering whether I was old enough, and then put the VHS cassette into the device. The movie was Terminator 2: Judgement Day, and I watched it with my eyes and mouth open wide. I cannot say if the film changed my life, but it sure influenced a young mind – I started to ask more abstract rather than everyday ques-tions, and much more often looked at the sky than beneath my feet. I still like to come back to that movie and watch again some of its most remark-able scenes (like the liquid nitrogen tank destruction!) but as I get older I think of this story as less and less likely to really happen. Does it mean I do not believe in the era of machines? Certainly not, I am even more sure about this, just a little bit more optimistic. Personally, I believe in the unstoppable development of science, and whenever I hear the word impos-sible referring to the future of technology, I just smile and usually negate.

139

140 ◾ Cunning Machines

The problem with imagining the future is that we are strongly limited by our present way of thinking, limited by everyday concepts, habits and life-style. During my childhood, I had a friend who lived in the village. He was a smart boy but had no experience with technology. I remember when we were 13 or 14, he said he could not imagine talking through a phone as he had never done it (the next day I took him to the town, we bought a phone card and he has made his first phone call from the telephone booth – he was really excited). So, the reason why we hear so many concepts of the future and the word impossible is repeated so often is that we live today, in the current world. It is not only that we do not know yet all the answers but it is even more – we do not know yet most of the questions that can be asked. There is a famous statement, traditionally attributed to Lord Kelvin, said to his colleagues from the British Association for the Advancement of Science in 1900: There is nothing new to be discovered in physics now. All that remains is more and more precise measurement. Just five years later, Einstein announced his theories of relativity that overturned the founda-tions of physics. Lord Kelvin was not a random person – he was famous scientist and engineer who, among other achievements, formulated the laws of today’s thermodynamics and determined the exact value of abso-lute zero (so the temperature unit Kelvin was named to honour him), so it not surprising that many people today do not believe that computers may dominate our word any time soon.

During discussions of the future of artificial intelligence, we usually consider the moment in time when it is likely to achieve a human level of intelligence and consciousness, allowing the system not only to answer questions asked by people but also work creatively, proposing new solu-tions and formulating concepts even when not directly asked. Such a future moment we call the singularity (or technological singularity). If we, as a civilisation, get to this point the consequences are really difficult to predict. First of all, a conscious machine would be able to continuously improve itself, creating newer and better versions of the system. Being connected to a global network and thus all the human knowledge stored therein, this kind of process would surely evolve from linear to much faster exponential growth (see Figure 7.1). In other words, such systems would be able to expand themselves much quicker than with the help of human engineers. The evolution of science and technology took us thousands of years from the invention of the wheel to a trip to the moon. Exponential growth could reduce this time to single years. We could expected solu-tions to some of the current most crucial civilisation problems (like deadly

A Future with Artificial Intelligence ◾ 141

FIGURE 7.1 The difference between linear and exponential growth.

diseases) within a few months. One thing is certain – the singularity will be our last and biggest invention ever – all further discoveries will be made by machines, which will become faster and smarter researchers than any human could be. Is the singularity our future? I am sure about this. When will it happen? Some experts say in 70 years, some (including the ones who work on this everyday) predicts it may appear within the next five years. My guess – I would pick some value in the middle. I believe and truly hope to see the most extraordinary change in the history of mankind myself.

All that may sound abstract and impossible, but remember the phone booth story. Just 20 years ago, the concept of the Internet was out of mind – difficult to understand and discuss. The president of IBM® in the 1950s, Thomas Watson, was said to have once stated, I think there is a world mar-ket for maybe five computers. So do not close yourself within the current barriers – look wider, dream and look at the sky.

Nobody is sure about the future in front of us, but there are some pieces of it that I think we can predict with a higher chance already. To under-stand it better, let’s start with the idea of a black box.

BLACK BOX As I mentioned earlier in this book, recent research results suggest that people nowadays perceive more information every single day than our ancestors did during their entire lives in the Middle Ages. In addition, the science and technology develop with such speed that we never experienced before in the history of our civilisation. It is enough to realise that ancient

142 ◾ Cunning Machines

philosophers like Aristotle contributed to almost all areas of science known in those days, starting with philosophy, through logic, kinetics, optics, astronomy, biology, psychology and more. Their research and discoveries influenced the future that we are all part of. Today, nobody is able to find himself comfortable in all branches of science. The extremely high level of knowledge and expertise needed caused even mathematicians to split into many focused groups and create theories so advanced that they are rarely understood well outside of this community (even by other professors of mathematics). It is said that when Andrew Wiles first announced his 200-page proof of the famous Fermat’s Last Theorem (which had reminded unproven for more than 350 years at that time) it took months for the world’s mathematician community to verify and accept it. A single human person is simply unable to cover all information, even that related to his or her specialisation – the world is changing too fast – some estimates say there are approximately 2.5 million new scientific papers being published every single year. And this number constantly increases! It is not surpris-ing then that we simply take most things for granted, something obvious, not really having the time and capacity to check or understand it. We use dozens of tools and devices (probably you use at least a few just while read-ing this sentence) while not actually knowing what is inside. All we know is the external interface we use: buttons, touchscreens, switches. The rest (being in fact the bigger part of the object) is outside of our perception and interest, somehow hidden or invisible to our minds. We call these phenomena black boxes. We learned earlier in this book that IT people often use this concept to note that for some computer program or hard-ware device they are not interested in the details of its internal algorithms or the technical solutions of the way it is constructed. But the truth is that black boxes are everywhere around us, far from the IT applications and the latest technological gadgets. Nowadays, we do not know precisely how the banking system works (and where exactly our money is when it is already paid to our accounts), what our regular food products are made of (and how), what really happens when we call for a pizza (we just eat not wondering who baked it, where and how they did so and how it was delivered). Yes, we look at many things around us simply assuming they are all designed to fulfil our requirements, answer our questions or act in response to our requests. The 21st century is the world of services (with all the possible meanings of that noun) we really know nothing about. We enter the input and get back the output, not spending a second to think about what makes the first one to convert into the second one (Figure 7.2).

A Future with Artificial Intelligence ◾ 143

FIGURE 7.2 The black box.

What is important to notice we can see the clear trend in this topic. Karl Popper, recognised as one of the 20th century's greatest philosophers of science, identified three reasons of which at least one needs to be true to make any new theory (in general) replace an old one: the new theory is either more general, more precise or simpler. This makes the theory accepted as “better” by scientists. Exactly the same set of features makes other things more popular, more useful or more frequently bought. Believe it or not, but these three ways of evolution drives world changes, from IT to agriculture. It also causes a slow and constant enlargement of black boxes across various branches of science and technology. Let us think of the history of modern computer science. It all started with the electro-mechanical calculating devices that were built during the Second World War – one of the most famous is probably the Bombe constructed by Alan Turing and his colleagues which allowed them to decode the Nazi’s secret Enigma machine messages and thereby increased the chances of the Allies winning the biggest conflict our civilisation has ever witnessed. The cre-ators of such devices knew exactly how they worked – they were able to switch or modify specific parts of the machines to make it work faster or to fix calculating mistakes. Still, as computers started to attain the shape they have today, programmers began to work on higher and higher levels – at the beginning, they operated with binary codes, then from simple to more and more complex commands, finally working with more advanced frameworks nowadays. The truth is that these days, most software pro-grammers work far from simple math-like operations and even further from the hardware itself. Using huge frameworks that provide many

144 ◾ Cunning Machines

features ad-hoc, everything below this level becomes a black box. Software programmers from mathematicians, through inventors, to scientists and craftsman, finally become technically advanced users. They follow good practices, outside suggestions and precise standards. There is less and less space for free thought and trying unexpected solutions – all due to the global trends focused on time and delivery. IT people are specialised into narrow topics and their black box is bigger than ever before. Most IT tech-niques and solutions are taken for granted. That is one of the reasons why we suddenly heard recently of the vulnerability (security hole) affecting most of the world’s microprocessors – the low level hardware is usually ignored by IT community, being treated as a black box which was and always will be there…

A black box is a common phenomenon and the area covered by it is extending. And what is especially interesting around the artificial intel-ligence methods already used is that the black box effect is visible there much more directly than in other branches of science. Why? Imagine an application based on artificial neural networks. As we already know, the learning process is mostly based on presenting learning samples to the network and providing an expected answer at the same time. When the learning set (collection) is big enough (and well-prepared enough) the network starts to recognise the patterns hidden in the samples and soon becomes able to answer correctly questions never encountered before. But what do the programmers actually do if it makes some spe-cific mistakes? Do they review its structure and manually modify the weights, or add or remove particular neurons? Not at all! It would surely be too time-consuming to identify “the location of the error” in a net-work of hundreds of layers and thousands of single neurons. It is much easier to prepare one more example to show to the network how to answer correctly to the problematic question. If you think of this for a while you can find a quite clear analogy. That is exactly what we do when teaching others. Nobody really modifies anything manually in somebody else’s head (ok, almost nobody – there is some research on neural sur-gery that may help in some physiological disabilities). It is surely much easier to explain a difficult example to a student one more time and to try to somehow inject the correct answer into a brain… although some teachers might not agree with that statement. So the interesting obser-vation is that from that point of view we already look and interact with the AI (not being anywhere close to strong AI yet!) much more as we do with people than with other devices. We do not even know the thoughts

A Future with Artificial Intelligence ◾ 145

of people who are our closest friends. Similarly, the AI becomes a huge, big black box.

When reading the above you may think I criticise today’s world, being a population of consumers not interested in the point from which the products, ideas or services they receive come from. But I am far from dis-approving of civilisation and saying we should all try to know and under-stand everything. In my opinion, such an attempt would make science and technology develop much slower or even fully stop it. So do not feel disappointed. A black box is a natural way our brain works to filter the important facts and let us (by filtering) deal with enormous amounts of information. We cannot keeping digging into details. We need to assume some foundations to build a skyscraper. However, what is important to just remember is that the black box is always there. Simple awareness of that fact is often enough to see much more than others.

POSTPONE YOUR UNEMPLOYMENT Since the very first AI program was run and successfully applied. it became clear that sooner or later, artificial intelligence would change the future of our civilisation. It is again nothing new that technological progress changes the way we work and live. When fully automated production lines started to become more and more widely used, we realised it would directly influ-ence the world’s labour market. One computer-controlled line replaced dozens of manual workers. Huge factories previously employing hundreds of people are now working effectively with just a few members of techni-cal staff. And as artificial intelligence becomes more and more popular, such a trend will only speed up. Scientists, economists and analysts agree on this aspect of future prediction (something which does not happen often): most of today’s professions will sooner or later simply disappear, fully replaced by machines, and many of them will become extinct within the next couple of years. If you think of automated, GPS-based navigation systems or free-to-use online translators across an astonishing number of world languages, you can quickly notice for yourself that human occu-pations traditionally related with these activities (and usually requiring years of higher education) might not survive long. And there is not much we can do about this – it is all about simple and brute economical profit– loss accounts being the bloodstream of each existing company. If you can have something done for free by a machine which is never tired, never on sick leave, never complains, and can work effectively seven days a week 24 hours a day, you are definitely less likely to hire a human person. The

146 ◾ Cunning Machines

scale of this trend is already visible in some industries and has started to become a topic in international discussions. High levels of unemployment are surely one of the factors that every society tries to avoid as it disturbs the cross-generation financial balance that affects medical and retirement benefits. People unable to work (because of machines taking their place) cannot achieve the standard of living they are used to and save money for old age. Besides all the other negative effects, it indirectly increases the chances for unrest and higher level of criminality. That is why there are already plans to include robots in human tax systems. Companies using machines instead of robots might be obligated to pay dues (as in the case of human employees) to keep national accounts within safe limits. Solutions on the government level are surely important but is there something we can do from our side to postpone our unemployment and stay secure in the labour market?

Someone once said that the key to career success in any company is to make sure you are irreplaceable in your everyday duties. The more people perform your usual job activities, the less sure you are about your future in there. It is not surprising at all that the same golden rule should be applied whenever we feel uncomfortable due to recent rapid AI develop-ments in our branch of the market. So, the first way to do it is to be a high-level expert in your domain. Even if machines are to replace your profession, it means job reduction in the first stage rather than firing all employees. Even in the further future, there will still be a place for the best experts – at the end of a day someone needs to control the AI, perform its periodical testing, monitor its behaviour and be the teacher or mentor to the system. These kinds of activities are surely the ones that are expected to be in value. So whatever you do – do it at your best. It is also worth men-tioning that the changes in front of us will not only reduce and eliminate some professions but at the same time may restore to the world the ones that have remained unnoticed and underestimated in previous decades, described as not useful or too abstract. The voice of anthropologists, who currently investigate distant Amazon tribes and excavations, may soon be looked for by top experts and politicians to find and understand how AI is modifying our lifestyles and social skills and what risks are hid-den in this modification. Behaviourists, nowadays sometimes treated as eccentrics and pet physiologists, will surely become well-paid and desired employees – the more independent machines become, the more crucial it is to understand their goals and behaviours (especially in the case of strong AI). Ethicists discussing the aspects of good and evil in university

A Future with Artificial Intelligence ◾ 147

cathedrals will be asked to prepare the rules that computers should follow, e.g. to teach it how to choose wisely (and honestly) between two requests from two different users which are in conflict. Finally, philosophers, usu-ally ignored by tech people these days, might be the only ones to be open-minded enough to talk about AI objectively and to try to predict the future of our civilisation. This list could be extended even more…

On the other hand, what is no less important is to distinguish ourselves from the machines. To protect your position, make it special and prove your actions would be difficult to replace by automated algorithms. The more repetitive the work is, the bigger the chance some of its parts will be computer-controlled soon. If you do not want to be replaced by an autom-aton, do not behave like one – do not act automatically, avoid work accord-ing to scripts and checklists, focus more on your experience and intuition (the thing that might never become a feature of a machine). Instead of following stereotypes and good practices blindly, challenge them and try your own, maybe better ones. Cross standards, perform experiments; explore new things instead of going where the pathways leads. Develop your own patterns, solutions. Use creativity. All that may help you not only avoid downgrade by computers but also to find a real passion and become a valuable employee even today, in the pre-AI area. We can find some nice analogy between these suggestions and the history of art in general. You have probably heard about the Impressionism art movement, characterised by open composition, clearly visible brush strokes, and its main goal being to follow emotions and attempt to capture their moments. The movement was born in the early 1860s and there were a few young painters, including Claude Monet, who introduced the style to the world. At the beginning, the style was not noticed at all and rather ridiculed by other painters, but later became widely-known, bringing Monet immor-tal fame and recognition (his 1872 painting entitled Impression, Sunrise gave the name to the art movement). Quickly, Monet gained a huge group of followers who were also talented artists, though strongly inspired by Monet. This is quite similar to the current development of AI and its applications becoming widely used tools. AI systems are able to build new pieces of solutions or solve given problems more and more beautifully with each iteration. However, they are still not able to introduce a totally new method or trend unlike anything shown to them before. AI tools are talented followers who perfectly imitate someone's style. Just like a band singing covers – it may be incredible entertainment but something is still missing… So, if you are afraid that human art or creativity is already dead,

148 ◾ Cunning Machines

don't cross it out yet. Today's AI emulates our way of working but, as in the case of people, there is still a huge gap between follower and leader. Real creativity gives us a potential absolutely unavailable to machines at this stage and that is why it is crucial to cultivate this feature in ourselves. The less stereotypes (which are actually somehow algorithms) we follow, the more open our minds are, the higher chance to stay on the surface becom-ing in future not frustrated enemies but rather partners to the general artificial intelligence.

Every time I visit London, I always try to go to the National Gallery, at least for a while, to see my favourite painting, Vincent van Gogh’s Sunflowers. Regardless of whether it is an output more of genius or maybe psychotic episodes, this illustration of what could be named a pretty triv-ial example of still nature (a vase with flowers) is actually widely agreed to be an absolutely world-unique masterpiece. But there is one more thing worth mentioning. One can find an ultra-high resolution (combined with millions of colours) reproduction of this painting in some online digital library, allowing study of even the smallest elements enlarged hundreds of times. But only in standing in front of the original in the National Gallery can you see some visually thicker layers of paint in particular areas of the image – and these ones are said to be van Gogh’s true hallmarks. That is why no computer reproduction is able to keep its beauty, becoming just an empty file. This may be a nice metaphor for the topics we discuss – even if AI is able to emulate all of our activities one day, will it ever be a human? Rather not. There will be still some layers missing – something not neces-sarily easy to see at first glance but crucial to make it real.

The earlier discussion about how to protect your job from being replaced by a machine is surely an important topic. Everyone who is currently an active employee (regardless of what is his domain) needs to start thinking now about that. It also includes today’s high school students who are just about to choose their profession – the application of AI covers more and more areas every single day. The process of changes on the global level has already started and surely the revolution will fully transform the labour market within the next two decades. Today the software engineer is a syn-onym for a well-paid job, social status and golden prey for recruitment head-hunters but a person born today may not find a job in this occupa-tion by the time he or she would finish their studies. What is important here is that we are discussing just the next few decades. If we think of how AI may affect our civilisation and ourselves as humans within the next few generations, it will not be a topic of the workplace anymore but rather the

A Future with Artificial Intelligence ◾ 149

question of human beings and their mental evolution. As we mentioned earlier in the chapter, the singularity is the moment when AI becomes conscious, creative and able to develop itself, quickly moving towards bet-ter and more advanced versions. When exactly will this moment happen? Nobody really knows but suffice to say that the variety of answers among top experts varies from just a few years to more than seven decades. One thing is certain – this moment means the end of human inventions – all research will be planned, performed and applied by AI faster then we will be able to just get this particular idea. Computers will quickly start to control all aspects of civilisation from manufacturing and agriculture, through communication and transport, to medical treatment, global gov-ernance and our everyday entertainment and activities. We can expect people in the era of the singularity will not need to work, getting all prod-ucts and services on demands without any special effort or issues. You want it – you have it. Does this mean the world of our dreams? Maybe. Still, what is important is that it will also change ourselves. Just imagine we do not have really do anything. Would we be motivated enough to perform any challenging activities? I believe our future may follow one of two main paths. The first one means that people will want to learn more from machines, to extend their knowledge and skills, to be even more creative, being students or partners to the AI. Incredible facts and skills we have had no access to before may help us better understand both the world around us and ourselves. We may end up as a civilisation of phi-losophers and artists getting pleasure not only from products and services but even more from creative discussions, wonderful pieces of art and high level of inner peace. But we can also go in the opposite direction. If you have everything given to you, there is a temptation to do exactly nothing and enjoy laziness. We can even notice this kind of trend today. Advanced technology reduces our own skills, since they are not needed anymore. Since we are able to use GPS systems on the global scale, there are fewer and fewer people able to navigate manually, there are social problems in reading simple maps or identifying one’s orientation in the world without the use of a device (by observation of the sun’s movement, plant growth, etc.) and people become lost quite easily and feel states of intense anxiety when travelling without a mobile phone. The same can be seen when writ-ing – in using computers or mobile devices to write, some people have stopped being able to write clearly by hand. We have lost many spelling and grammar skills due to the free spell checkers available in many appli-cations (I am also using a spell checker now, when writing this book – it

150 ◾ Cunning Machines

FIGURE 7.3 The future. What path will future generations choose?

has already fixed more than a dozen of my mistakes in this paragraph alone). So, unfortunately (although maybe it is something we should not worry about?), this is the direction in which civilisation could also go. We may stop using complex devices as they will be replaced by voice com-mands, and math skills will be one of the first to go extinct. What then? We would read and write less and less, slowly becoming illiterate. Unable to think abstractly and to understand complex ideas, we would reduce ourselves to simple consumers with narrow perspective, without ideas, creativity or dreams… If you feel upset, please remember that this may be likely, but the first scenario is also possible. And finally, in the first generation living with the singularity, it will be a personal decision which way to go. Other people may change you a lot, may limit your moves and actions, but the mind always remains free. Thus, stay open-minded and never follow the easiest path. That is the recipe for creativity and for the breakthrough inventions today, and as you can see it is also a guide for the future of mankind… (Figure 7.3).

GUNS AND ROSES I mentioned earlier that it is much more popular amongst artificial neu-ral network developers to fix unexpected system behaviours by presenting newer and more suitable learning examples rather than trying to manu-ally change anything in the network structure. So, we already start to find ourselves in front of a new challenge: not only to develop a tool but also to understand what it “thinks and plans to do” (whatever these two verbs

A Future with Artificial Intelligence ◾ 151

actually mean here). Understanding is the key to the future and what we need to accept is the fact that, as AI techniques become more and more complex and closer to strong AI, we will be able to mentally follow fewer and fewer of their abilities. Thinking about this for a while, we can formu-late the skill levels of AI from the perspective of human abilities. Let us number these levels from 0 to 4, corresponding the future timeline:

Level 0 – we can: When we look at current AI applications, most of them are certainly now on this level. In other words, systems imitate (or emulate) some of our abilities and features, and so we have no problem understanding or repeating these automated activities. If, for any reason, an application is down, we (with our knowledge and skills) are able to perform the same actions; maybe slower, but it is still doable for us. So, for example, an OCR system used by monitoring cameras to read cars’ plates – there is no problem for a human to analyse the recording manu-ally and simply note down the numbers.

Level 1 – we can’t but we know how: This level means that the AI sys-tems are able to perform some specific actions in a way with which we are unable to compete due to our skill limitations. Still, we fully under-stand the application’s internal structure and know how it works. We are also able to predict the rules that the AI follows. Do we have systems like that already? It might be scary at first glance, but the answer is yes. Recall AlphaGo, which I described in Chapter 3. This system defeated the human world champion in the game of Go. Some moves played by the system were recognised as extremely creative and never before played by humans (despite thousands of years of gameplay). So what does this really mean? Surely we cannot achieve the level of AlphaGo. What may be even more interesting is that we are actually unable to measure its skill level! In board games like chess, Go, etc., players are usually ranked based on match results. So, if you win against a strong player, your personal rank is increased, and after some number of successes, you may be invited to a higher division. Your rank is precisely defined as you are a part of com-plex mechanism based on interactions and competition. AlphaGo, being a stand-alone champion, has no one to compete with. The fascinating thing is that even if AlphaGo is further updated to improve its skills even more, there is nobody skilled enough to verify it. AlphaGo is surely just the beginning of the huge changes in front of us. There is no real problem here – the worst thing that can happen is we will simply be unable to say how strong a player it is. But if we think of future autonomous cars which are much better drivers than we are, this small problem may suddenly

152 ◾ Cunning Machines

become a vital one. How can we check that the car is fully safe? How can we measure its skills if they are already better than ours? We may know how it works but we will be unable to verify it easily.

Level 2 – we don’t know how, but we know what: This is the first of the future levels not yet reached by any existing application. It refers to sys-tems which after a series of updates (or, even more likely, self-updates) become so complex from the code or tech perspective that we are unable to understand their mechanisms. Nowadays, although we cannot quickly explain single artificial neuron usage, we can dig for some time and by trying many options, finally investigate it – time-consuming but doable. Level 2 means that the complexity of a system and the concepts gener-ated are unable to be followed by human developers. Imagine a very com-plex math proof (like Andrew Wiles’ 200-page proof of Fermat’s Last Theorem) – there are few people that understand its concept steps. Going further, imagine one (e.g. one found in an aliens’ spacecraft) that nobody is able to understand. So, an example would be a system that optimises energy transfer so that on-the-way transmission losses are minimised which takes into consideration various parameters (including changes in requests, weather forecasts, etc.) – nobody would really understand how exactly it analyses the situation, but the action taken (saving transmitted energy) would be clear to everyone. This is Level 2, and whether we want it or not, we need to prepare for its era, maybe earlier than we initially expected. We will need to learn to trust the machines. And to make sure how we can lead their development so that they are trustworthy.

Level 3 – we don’t know what, but we know why: In Level 2, even if the mechanism is too complex to be understood, we are still clear as to what the potential system does. Its activities (although too complicated to con-struct) remain simple from the usage (or black box) point of view. Level 3 goes even further. It refers to future complex systems for which only the overall goal will be understood. We can image a global system that controls cross-country road communications while at the same time try-ing to reduce air pollution, traffic jams and the number of accidents. This system would perform thousands of activities daily, some totally unclear to the users (e.g. closing a particular road or blocking a crossroad for a few minutes) mainly due to the lack of full visibility (the system would recognise potential dangers much earlier than we would). Still, the final goals which drive the AI system’s behaviour are precisely defined and accepted by society. We can imagine people saying or thinking, “I do not know why this road is closed again, but I know that the system controls

A Future with Artificial Intelligence ◾ 153

it well. It does a lot of good for us. There is less traffic, the air is better nowadays. So, I do not know what is happing here, but surely this must be important for making our communication even smoother, safer and more environment-friendly”.

Level 4 – we do not know why: And here we reach the final skill percep-tion level. The level that we often discuss and that evokes many emotions both in the IT industry and in the homes of ordinary people, the level that will be a simple consequence of technological evolution and, for that rea-son, will be inevitable. This level means that we will not be able to under-stand the motivation behind the AI’s activities. Paraphrasing the end user sentence from Level 3, we would hear something more or less like, “I have no idea what is going on, but surely there must be a reason for this”. Level 4 will be achieved as soon as AI applications attain strong intelligence, consciousness, creativity and self-motivation. The moment when AI will be able to upgrade itself and define its own goals, omitting humans in that process, we will quickly become unable to guess why a particular deci-sion is taken. The good thing is that the AI will develop spontaneously and rapidly, not being stopped by the limitations of our minds; the risk is that it will not stay under control, and by the moment we notice any alarming symptoms it might already be too late to remove the plug from the socket…

Does this mean the future is dark and there is no hope left for human-kind? Certainly not. It is quite possible that future AI (especially strong AI) will change our world into a paradise. Think of all of the deadly dis-eases known today with thousands of researchers looking for a cure, with only rare successes. For a strong, creative artificial intelligence equipped with a digital collection of all our knowledge (already stored in the Internet and easy to access thanks to advanced search engines – no real difficulty, with access to any resource or fact needed) might need as much as a month, or even a week, to develop a complete medical treatment for a single disease. A year may lead to the stage where all known illnesses are curable or at least stoppable in cases when the consequences (damages) cannot be reverted at some phase. The production and the preparation of international distribution may take one or two years. The dreams are just ahead. The same kind of system will help to control mass production and agriculture. Nowadays, billions of dollars are allocated to ensure food supplies in the poorest areas of the world, like many parts of Africa. Still, the money is surely not enough – millions suffer from hunger, thousands die of thirst every month. As calculated by economists, the richest 1%

of the global population owns half of the world’s wealth. When money means luxury in one part of the planet, the same dollars denote survival on the other side. Artificial intelligence (at least at the beginning) will certainly not be allowed to share money equally – the rich will work hard to ensure that will not happen. But this is not the problem. For the poorest people, money is not the main need – all they think of day by day is food, water and shelter. And that is where AI can quickly help. Optimal design of land irrigation and an army of drones and droids whose responsibility is to take 24/7 care of plant cultivation, water desalination and water supply may within a decade change the world’s driest continent into a place safe for its inhabitants and maybe even after another decade Africa will be green when seen from the space. Whatever is being done, human engagement is crucial, which by default means huge costs are needed to ensure salaries for people who we want to perform their activities. That is the fundamental law of economy – nobody works for free as he or she also needs money to pay other people (a shop assistant, a food factory, a landlord, a doctor, etc.). Money passes from hand to hand, creating thousands of magic circles that surround the whole planet*. There are volunteers, priests and others who do not take money at all for some of the things they do for others. That is quite an incredible attitude and we should all be grateful to them as they often gratuitously take on challenges no one else wants to. But first of all, there are just a few of them (too few unfortunately) and second, they still need money, at least for their food, shelter, transport, etc. Money certainly rules the world. But this may be changed by strong artificial intelligence. Machines work for free, they do not need food or rest. Robots can build further robots, create farms and factories that are not only self-sufficient but deliver (absolutely) free products to anyone who may need them. Money might no longer be a factor that limits helping the world. Amazing and still possible. The singularity may be the beginning of new era in our civilisation – the first time in the history when hunger, illness and poverty will be just empty words with no reference to reality…

All we have said above is a happy path, a paradise on Earth in the simplest possible description. But there is also another way that the world may proceed which is much less optimistic and much more popular in cinema. One of the most famous film directors in history, the brilliant Alfred

* Money sometimes even partially comes back to us with our payment – it is actually quite amazing when you try to trace the money from your wallet… You can do it yourself just for curiosity.

154 ◾ Cunning Machines

-

-

-

-

-

-

-

A Future with Artificial Intelligence ◾ 155

Hitchcock, once said that a good film should start with an earthquake and then the stress should continuously be increased. Let us be honest – a movie about a paradise with obedient robots and happy people without a trace of uncertainty would surely not attract many viewers and have no chance to compensate the production costs with ticket profits. Bad scenarios are very popular in mass media but unfortunately these are also a possibility. One of the most popular scenarios assumes that self-aware machines will try to destroy humans (for some reason). Probably most readers remem-ber (and if you have never seen it – watch it!) the incredible Terminator 2: Judgement Day that I have mentioned at the beginning of this chapter. Not only its spectacular special effects but also its fresh new plot helped this picture become a classic. The Skynet (an army defence system created to identify and eliminate military risks) considers people to be enemies and launches nuclear weapons against us. Is this actually possible? As we have already discussed, even today developers are not able to fully follow all of the “impulses” in huge and complex artificial neural networks – in other words, we cannot describe all of an AI’s thoughts, so we are unable to fully predict all of the consequences and actions performed by machines. And although the probability of a mistake (or incorrect behaviour) is much less than in the case of humans, we need to remember that there are still other “blockers” that we have in our minds (like empathy, conscience, beliefs) which a computer is free of. If your calculated result (even that of a high value) suggests the need to attack somebody (or some other country), you will surely review the decision once again yourself. World presidents and other decision makers are surrounded by armies of analysts and advis-ers, and any military decision is carefully considered before it is made. Automatic decisions of such significance may lead to some unexpected and dangerous situations. Moreover, if you teach a machine to identify enemies, there is always a chance it will point at you at some stage. So, the areas of AI application are crucial. Using AI in the military indus-try increases the risk of Armageddon. That is why during the opening of one of the world’s biggest AI conferences in 2015 – the International Joint Conference on Artificial Intelligence (IJCAI), an open letter was announced to request a ban on offensive autonomous weapons that are beyond meaningful human control. More than 20,000 people signed the letter including people as famous as Stuart Russell, Stephen Hawking, Elon Musk, Noam Chomsky and many more. Unfortunately, the letter was, at least partially, ignored. In the same year, the US Army announced the success of their first series of tests of armed military swarms of dozens

156 ◾ Cunning Machines

of drones attacking a target together, communicating with each other and co-operating without human supervision.

In 1999, the Wachowski siblings brought to the big screen another new concept. The Matrix presents a seemingly normal world like the one we all live in. But the truth is not visible to the eyes of the majority: everything we perceive is a computer illusion, a complex virtual reality called the Matrix. So, what is the truth? People are cultivated by intelligent machines and stored in small tubes filled with nutritious liquids – all to collect elec-tric energy produced by our brains. Humans changed into batteries – is this our future? The recent incredible progress in virtual reality technol-ogy surely does not allow us to cross out such a possibility. What is more, it may be something desired by many in future generations – the chance to live in an emulated and fully safe paradise where you cannot be hurt or encounter any kind of discomfort. That could be surprising and unac-ceptable at the very first glance until we think about this much deeper: a virtual world that we control and design ourselves might be one of the steps of the evolution of civilisation. It is widely discussed that the future of world exploration may follow one of two main pathways. Either we will continue to explore the physical universe, digging and diving deep under the Earth’s surface and building rockets and measuring devices to move even further the edges of the known Universe. But the other option is that we will focus on the virtual world and decide to easily create our own universes instead of spending tonnes of energy to discover the real one. In the 1970s, the famous Fermi paradox was formulated: if there are millions of billions of stars and thus an uncountable number of potential civilisa-tions across the Universe, how it is possible we have not encountered any evidence of their existence? Where are they? Is it possible we are alone in so huge a space? Or maybe they are there but do not wish to answer our calls for some reason? Maybe at some advanced staged of any civilisation (advanced enough that they could reply) they decide to ignore the sur-rounding world and focus on the virtual one, staying on their planet in full silence… Of course, we need to consider the more pessimistic variant too. Maybe achieving the singularity is the moment that any civilisation ends. Is AI the final stage of evolution, a mystery mechanism designed by nature to eliminate any species that dominates it too much?

The imprisonment direction shown in The Matrix may not be the only one. Cinema usually presents us with malicious, evil machines that close us in cages or try to exterminate us like vermin. But if you think of the Matrix a little bit deeper, you can realise that most of the population (actually

A Future with Artificial Intelligence ◾ 157

all except Neo and his colleagues) live quite a normal live, with an aver-age salary, various passions, enjoying their families and some free time too. They were not physically hurt and have no idea about their impris-onment. Still, is it always your enemy who limits your activities and free will? Certainly not. Parents often do not let their kids do exactly what they want to – they try to protect them, knowing that their young minds are too little-experienced to predict (and avoid) all the danger that the world is filled with. If you hear some memories by the members of royal families, the phrase golden cage is one that occurs in almost all interviews – these kids are often not allowed to behave spontaneously or do anything not following the rules and protocols (which are often not even up-to-date). So, one negative scenario we can imagine is one in which the AI of tomor-row will treat us all as valuable treasures, which may seem correct at first glance. But being overprotective may not be what we really want of our machines. The system may treat us like small kids, not allowing us to per-form any activities (to make sure we are not hurt) – robots could block us from doing sport (the chance of concussion is quite high), eat whatever we want (including tasty but greasy burgers) or relax in a form we prefer (no beer, not too much sun or sex). At some stage we may end up being closed into our homes as the world outside is too dangerous – healthy and long-lived but without any chance to find what a full life is all about.

There is actually one more (of many) possible bad end for us when look-ing at the possible implications of the singularity. Let us suppose that AI will control most of our world one day – something the current development and progress moves towards. It will control transport, energy, agriculture and farming, even weather – all to make our own lives simpler, cheaper and more efficient. All that sounds perfectly fine. But remember what we said in Chapter 2: something that is simple for humans is extremely difficult for machines and vice versa. The more “intelligent” systems become the more human-like they are. They work faster and more in the way that we would but there is one more feature they can inherit together with all the expected ones: the chances of making a mistake. A standard computer calculates numbers – there is no space for a mistake there. But with the increasing complexity of applications and problems being analysed, mistakes could start to occur. This is not surprising – even a human genius makes mis-takes. The only problem is if the future system controls almost all the world, a single mistake may imply dramatic consequences. What if the mistake refers to food or production of a new, brilliant vitamin– in the worst case it may mean that most of the world’s population would die of hunger or for

158 ◾ Cunning Machines

example become sterile (so we would simply go extinct, having no descen-dants). The more responsibility we give to machines, the higher risk we need to consider. Will our logical thinking and foresight defeat built-in laziness?

During my lectures or discussions, I quite often hear the following ques-tion: there is a lot said nowadays about the future, happy paths and traps that may occur on our progress as a civilisation, but is this really going to happen? Will AI really dominate the world of tomorrow or is it just a nice and trendy pop topic? Is there any reason to believe it? Yes, there is. The reason is that it is already happening as we speak (or as you read this book). It is enough to open your eyes wider, to look around more carefully and to focus on the signs of how important AI has started to become. We have already mentioned the open letter by scientists in which they postulate a legal regulation to ban the usage of AI in autonomous weapons. The timing is not accidental here – many of the signatories had a view on the progress and research being done by the military industry. Their warning is not sci-ence fiction or self-promotion to reach a wider audience – many of them are already rich and well-known. So, it is not for fun or entertainment – it is to protect our world as a home for all of us. We might even now realise how close we already are to the breakthrough moment. In the same year as the open letter, the famous Bilderberg Group, an annual, prestigious and quite confident meeting of world’s most powerful or influential poli-ticians, economists and businesspeople, discussed the topics of European strategy, globalisation, the Middle East, NATO, terrorism… and artificial intelligence. So, if they spent time on talks around AI, we should definitely start to think of this much more seriously than we have done before. Again, the same year, 2015, OpenAI® was founded as non-profit artificial intel-ligence research company to develop safe solutions in AI and ensure the results are shared as widely and as equally as possible. The input, estimated to be an incredible 1 billion dollars, gives the clear message that this is surely not a playground. Private people investing such money must know it is worth doing so. Finally, in September 2016, the Partnership on AI was announced, bringing together the world’s IT giants including (but not lim-ited to) Amazon, Facebook®, Apple®, DeepMind and Google, Microsoft®, and IBM. The unified power of these companies is, officially, focused on formulating best practices (standards) on AI technologies, to serve as platforms for discussion, knowledge exchange, and monitoring AI influ-ence on people, societies and the whole world. Officially. But it is some-times worth recalling an old Chinese saying, traditionally attributed to Sun Tzu, the 6th century bc military strategist: keep your friends close and

A Future with Artificial Intelligence ◾ 159

your enemies even closer. AI is a growing area of business with limitations that are difficult to actually point out. There is surely a second purpose to the partnership – to be closer to the competition, to have more chances to monitor one another’s progress and results. Whatever is said officially and whatever we may guess or speculate here, one thing is certain: the first company to build a conscious system is the one to win all the pools. There will be no runners up or consolation prizes. Even the giants are fighting for survival here as artificial intelligence will dominate IT quite soon. Anyone not ready to jump on the train on time will not be able to catch up and will simply disappear from the market. AI is probably the biggest opportunity for business and civilisation in history but it will be a single moment situa-tion – when the cards will be dealt with no chance for a rematch.

Just two final thoughts in this section. The first one – the list of absen-tees is often equally as important as the list of participants – I will leave to the reader to think for themselves as to why some companies have not joined various licences, standards or partnerships like the ones described above. Not feeling comfortable? Not seeing the point? Or maybe you are too close to the treasure to want to share the map… The second thing – most of the above examples come from 2015–16. Progress since then has not frozen but has even sped up. Check the date in your calendar and mul-tiply your expectations, feelings and predictions by three…

TABULA RASA Whenever I am asked about the evil and bloodthirsty machines of tomor-row I like, in reply, to recall the philosophical concept of the tabula rasa, traceable to the writings of Aristotle – an ancient genius and the one of the fathers of science as a whole. The phrase tabula rasa comes from Latin and means “blank slate”. It refers to an idea that people are born without any built-in, mystic or extraordinary mental content – we appear in this world with our brains as empty as a brand new pen drive bought in a local tech store. All we know, all we are, is due to the perceptions and experi-ences collected during our lifetime. This concept has as many enthusiasts as opponents as it partially touches on the always-controversial topics of souls, religious beliefs, reincarnation and more. I do not want to start such a discussion here – I never try to push on any of the options, leaving it fully to the interlocutors – our beliefs are important parts of our lives, and if we want to change them, we are changing the person himself or herself. However, I have recalled the tabula rasa concept as in my opinion, it nicely describes artificial intelligence. It is clear that machines and AI

160 ◾ Cunning Machines

systems are “blank slates” at the very beginning. People who think about machines being born bad are wrong – even the most complex artificial neural network has some default set of values assigned to its internal con-nection weights. There are no hidden built-in instincts, feelings or preju-dices. It is important to understand that AI by itself is by definition neither good nor bad. It is a tool, like a hammer – which we can use it to build a home or to hurt each other. The decision belongs to the user. And that is where the real danger is – it is not the machine which is a risk factor, but rather its developer, its architect – a human in general. We, and nobody else, have the power to change it into a helpful tool or to a weapon. Thus, keeping this in mind, it is crucial to choose appropriate applications and precise goals for a machine (which it will be dedicated to follow), as well as working together on legal regulations. If we create a military AI system to search for and eliminate our personal enemies, there is a risk that the algo-rithm (while learning constantly based on the examples, collecting experi-ence) may one day identify all humans as enemies… and decide itself to eliminate us – paradoxically, precisely following our own rules and the goals we ourselves put into it. On the other hand, there is no chance that AI will want to destroy us if its creators have not defined a concept of enemy at all (Figure 7.4).

FIGURE 7.4 A hammer – a tool or a weapon?

NOTES

• The singularity is the future moment when strong artificial intelligence is created. From that point we can expect exponential growth in science and IT development. Strong AI will be our last and biggest invention, and all further discoveries will be done by machines.

• The more complex computer systems become, the less we will know about their internal low-level mechanisms. The same happens with the services and good that surround us – we do not really know (and do not care) how they are provided or produced. Each new solution is more general, more precise or simpler. The black box (the area of unknown detail) constantly increases.

• Progress in AI will sure influence the labour market. Some job positions will be reduced or even eliminated in future, while others (currently undervalued) might be found much more valuable than nowadays.

• To keep your employment and not be replaced by machines, do not behave like a machine: do not act automatically, avoid work according

A Future with Artificial Intelligence ◾ 161

Choosing a safe application is just one of the things that must be con-sidered. We also need to remember that any AI system (especially those based on neural networks or genetic algorithms) constantly improves day by day by encountering new cases and learning by example. It is not obvi-ous at first glance but it is rather certain that some periodic examinations have to be performed to check exactly how the system is working. We can imagine a clear analogy with plane pilots, taxi drivers, soldiers, etc. They are well trained experts, high level professionals. However, during their lifetime there are many factors that influence their physical and mental condition, e.g. a traumatic event might irreversibly affect one’s character and perception of the world. That is why such experts (especially the ones whose work, if done incorrectly, can threaten somebody’s life) have peri-odic obligatory tests. AI must be subjected to the same rigorous, periodic tests.

Finally, it is crucial to understand that every single message or input changes the neural network structure. At the same time, we need to high-light that future AI systems will not be isolated but rather will be designed to interact with other applications and hundreds of people. We must some-how ensure (by internal blockades) that the external environment won't influence AI behaviour in an unexpected way. In an age when almost the entire population has Internet access, and even young people knowns how to explore it in all directions, in the era of viruses and hackers, this may be the biggest challenge and the biggest risk of the whole topic of AI.

YOUR NOTES

162 ◾ Cunning Machines

only to scripts and checklists, break stereotypes, cross standards, develop your own patterns, use creativity, follow intuition.

• The future controlled by machines may open two pathways for human-kind – either we will become illiterates focused on the simplest plea-sures or we will try to learn from machines to become a society of artists, philosophers and scientists. It is up to us which road we choose.

• There are both happy and scary scenarios for the future after the era of the singularity era begins. Still, it is important to highlight that AI is nei-ther good nor bad by default. Like a tabula rasa, it is an empty system at the very beginning. It is fully our own responsibility what we fill it with. AI is a tool like a hammer – which you can use as a tool to build a house, but can also use as a deadly weapon. We have the keys to change the world into a heaven or a hell. So, the human factor is crucial here.

• Finally, a future controlled by AI is absolutely certain. The question of if, still being asked maybe a decade ago is no longer valid. The question repeated today is when.

C H A P T E R 1

Perspectives on Digital Afterlife

Maggi Savin-Baden and Victoria Mason-Robbie

CONTENTS Introduction 11 Background 12 Social and Psychological Impact of Digital Afterlife 15 Religion and the Digital Afterlife 15 The Death-Tech Industry 16

DeadSocial (http://deadsocial.org) 17 Eter9 (https://www.eter9.com) 17 LifeNaut (https://www.lifenaut.com) 18 Eternime (http://eterni.me) 19 Daden 20

Perspectives on Digital Afterlife 20 Preservers of Digital Media 21 Mediators 21 Receivers of Digital Media 22

The Impact of Digital Afterlife Creation 22 Posthumous Digital Etiquette 22 Unintended Consequences 23

Conclusion 23 References 23

INTRODUCTION This chapter examines the concept of Digital Afterlife and explores research into the emotional and social impact it may have on relations, friends, colleagues, and institutions. It provides an overview of the various

11

12 ◾ Digital Afterlife

types of Digital Afterlife and suggests a need for greater clarity about the use of terminology. The use of different media to support, create, and maintain Digital Afterlife will also be presented and critiqued. The final section of the chapter raises challenging issues that will be explored across the book as a whole.

BACKGROUND The concept of Digital Afterlife is defined here as the continuation of an active or passive digital presence after death (Savin-Baden, Burden, & Taylor, 2017). Other terms have been used to describe Digital Afterlife, including digital immortality. ‘Afterlife’ assumes a digital presence that may or may not continue to exist, whereas ‘immortality’ implies a pres-ence, in some form at least, ad infinitum. Whilst these terms may be used interchangeably, afterlife is a broader and more flexible construct as it does not contain assumptions about the duration or persistence of the digital presence.

Advances in data mining and artificial intelligence are now mak-ing an active presence after death possible, and the dead remain part of our lives as they live on in our digital devices (Bassett, 2015). Recent developments seem to suggest shifts in understandings about embodi-ment, death, and afterlife (Walter, 2017). For example, digital media are currently being used to expand the possibilities of commemorating the dead and managing the grief of those left behind, complementing and sometimes replacing the well-established formal structures and rituals of Christianity and other faiths. It is now possible to light online memo-rial candles and create augmented coffins and tombstones with QR codes (Quick Response Codes—machine-readable labels that contain informa-tion about the person). Despite increasing interest and research into death online (Hutchings, 2017) there is little exploration of the impact of the use of digital media and the creation of digital immortals on religious prac-tices and grief management. There is also little understanding of the value of digital media in restoring family relationships or the impact it has on the mental well-being of the bereaved. Whilst Digital Afterlife tends to be used as an overarching term, it can be broken down into the components presented in Table 1.1.

Research to date has focused on the wider implications of media death, the idea that all our media, from photographs to social network posts are deleted. Thus, it is important at the outset to define different types of Digital Afterlife and explore the impact of these differences.

Perspectives on Digital Afterlife ◾ 13

TABLE 1.1 Features of Digital Afterlife

Term Definition

Digital traces Digital footprints left behind through digital media

Digital legacy Digital assets left behind after death

Digital death Either the death of a living being and the way it affects the digital world or the death of a digital object and the way it affects a living being

Digital Afterlife The idea of a virtual space, where information, assets, legacies, and remains reside as part of the cyber soul

Digital remains Digital content and data which was accumulated and stored online during our lifetime that reflect our digital personality and memories

Posthumous The idea of a model of personhood a person that

transcends the boundaries of the body

Second death The deletion of digital remains

Second loss The loss experienced due to the deletion of digital remains

Example/s

Play lists Blog posts Website searches Things that are static once the user has died The impact of left behind digital traces on family or the need for people to delete digital media because of its impact on everyday life

The platform DeadSocial enables people to schedule posts after they have passed away. Not really a virtual heaven or a place for souls to reside but it creates some of the illusion of this They are not uniform: these remains can be intangible assets, intellectual property, information about physical or tangible property, or personal data Someone being able to tweet or be reanimated though an avatar

The grief experienced if/ when someone’s Facebook profile is deleted after death without consulting friends and family People not upgrading their phones because they are afraid to lose voice messages from dead loved ones

Related Research

Mayer- Schönberger (2009) Maciel and Pereira (2013) Pitsillides, Waller, and Fairfax (2012)

Bassett (2018a)

Birnhack and Morse (2018)

Meese, Nansen, Kohn, and Arnold (2015)

Stokes (2015)

Bassett (2018b)

(Continued)

14 ◾ Digital Afterlife

TABLE 1.1 (Continued) Features of Digital Afterlife

Term

Technologically mediated mourning

Digital endurance

Digital resurrection

Digital inheritors

Digital mourning labour

Definition

The use of social networking sites to mourn and memorialise those who have died physically

The creation of a lasting digital legacy and being posthumously present through digital reanimation

The use of dead people in media after death

Those who inherit digital memories and messages following the death of a significant other

This is activity undertaken by corporate brands who use social media to share (and gain from) emotions of grief and nostalgia about dead celebrities

Example/s

The setting up of blogs and social media for the purposes of grief management sites after event such as the Manchester Arena bombing in the United Kingdom in 2017 Using sites such as SocialEmbers or the KeepTheirMemoryAlive mobile phone app or an existing system which lives on after their death, such as a person’s in-life profile that has been put into memorialised/ remembering status in services such as Facebook Oliver Reed’s role in Gladiator was finished using a digitally constructed face mapped onto a body double during editing as he died just before the final shoot of the film People who expectedly or unexpectedly ‘inherit’ the social media profiles and messages following death of close friends and relative and may or may not be able to delete them After the death of David Bowie, the music and fashion industry shared their grief on social media using images such as the thunderbolt, the signature sign of Bowie

Related Research

Kasket (2012)

Savin-Baden and Burden (2018)

Sherlock (2013)

Bassett (2018a)

Kania-Lundholm (2019)

Perspectives on Digital Afterlife ◾ 15

SOCIAL AND PSYCHOLOGICAL IMPACT OF DIGITAL AFTERLIFE Over time, our digital footprint becomes larger, and people leaving their footprint behind are not necessarily aware of the impact this may have on people left behind after their death. This footprint is after all, a construc-tion of a living person with public and private dimensions, not a carefully constructed and intentional legacy for people to pour over once we are no longer living (for most people at least). The informal norms and values for using death-related digital media have not yet fully emerged, and our understanding of the impact of digital media on the mental well-being of the bereaved is a relatively new field of inquiry. The idiosyncratic response to loss and bereavement (e.g., Worden, 2008) is also likely to be mirrored in the response of the bereaved to experiencing, and being exposed to, the Digital Afterlife of a loved one. The intentions of the person who has died, may not be in line with the feelings and expectations of the bereaved. Moreover, it may not be possible to predict the response of the bereaved to being witness to the digital legacy of their loved ones.

RELIGION AND THE DIGITAL AFTERLIFE Marking the end of life today increasingly includes memorials, whether sites of roadside crashes, family and friends ‘saying a few words’, or listen-ing to the deceased’s favourite music during services. This shift in prac-tices illustrates why this project is needed, especially given the increasing reification of the bodily form in the 21st century compared with the past focus on the transition of the soul to the afterlife. This reification also characterises the creation of Digital Afterlife as it is essentially treating the digital presence as if it is both a representation of the deceased person, but also that it in some way exists and has form beyond merely leaving behind letters, diaries, and personal effects. The growth of personality capture, mind uploading, and computationally inspired life after death have huge implications for the future of religion, understandings of the afterlife, and the influence of the dead surviving in society. Wagner (2012, p. 4) notes ‘[b]oth religion and virtual reality can be viewed as manifestations of the desire for transcendence, the wish for some mode of imagination or being, that lies just beyond the reach of our ordinary lives’.

Yet few Christian and other faith leaders have examined the potential for the positive impact of digital media and Digital Afterlife creation in religious contexts. This sense of investment in flesh (through the incarna-tion) results in a perception that what happens in the digital context is

16 ◾ Digital Afterlife

disembodied and therefore less real, less incarnational, less faith-related (O’Donnell, 2019). Gooder’s (2016) work on the body sees resurrection as a continuation of this life, prioritising a resurrection of the material body, and is therefore committed to the flesh of this life carrying over into the resurrected life. One of the central difficulties is that Christianity and other faiths find Digital Afterlife disconcertingly disembodied and it is not clear whether it promotes particular views about bodily forms in the afterlife. Afterlife and resurrection remain troublesome because they are couched in mystery, and philosophical and theological discourse cannot explain resurrection of the body, because the human body itself is not reducible to simple description or ready comprehension. Chauvet (1995), for example, sees the human as a subject whose corporality is a ‘triple body’ comprised of culture, tradition, and nature. Furthermore, Digital Afterlife may pre-vent us from being free to die (Davies, 2008, p. 106), as well as introducing questions about how ‘the dead’ might be classified.

The increasing move away from traditional funeral services focusing on the transition of the deceased into the future world beyond, and the rise in popularity of memorial content within funerals and commemorative events heralds shifts in afterlife beliefs by replacing them, to all intents and purposes by attitudes to this life. Irrespective of religious belief, most pres-ent at memorials can reflect on a person’s life and find something worth recalling. It is a shared act that induces a sense of singleness of purpose without introducing divisive beliefs. In a post-modern context of mixed religious beliefs and secular outlooks this affords a safe ritual space (Brock, 2010, p. 64). As technology develops, Digital Afterlife represents the next quantum leap, in creating potentially everlasting memorials which will enable increasing levels of interaction for those left behind.

It is not yet evident what the impact Digital Afterlife may have on con-ceptions and theologies of death. Nor is it clear about the extent to which Digital Afterlife is enabling people to tell their story in a world that has lost a sense of religion but not a sense of the sacred. In Chapter 10, John Reader discusses the idea of the digital traces left by the dead as unex-plored spaces, and the impact this has on the possibility of continued, and possibly deeper, engagements.

THE DEATH-TECH INDUSTRY With developments in Digital Afterlife creation there is an increasing interest in the management of death online despite much of the current software being an embellishment of the true possibilities. For example,

Perspectives on Digital Afterlife ◾ 17

the use of virtual assistants, such as Siri, that provide voice and conversa-tional interfaces, the growth of machine learning techniques to mine large data sets, and the rise in the level of autonomy being given to computer-controlled systems, all represent shifts in technology that enhance the creation of Digital Afterlife. This section offers an overview of the devel-opments in the Death-tech industry.

DeadSocial (http://deadsocial.org)

DeadSocial argue they are seeking to change the way society think about and prepare for death online by providing digital legacy and digital end of life-planning tutorials. This site offers a number of tutorials which include preparing for death on social media sites (Facebook, Twitter, Instagram) and ways of downloading your media and data from social networks. It also offers ‘funeral-tech tutorials’ which includes arranging your own funeral and suggestions such as ‘What “Game of Thrones” can teach us about funeral planning’. The end of life-planning tutorial offers useful suggestions about passing on passwords and a section which offers an offline legacy builder which includes creating a will and social media will. In reality, such sites only tend to be accessed by those consciously and deliberately preparing for death, beyond the common cultural practices of creating a will and, for some, planning or expressing wishes about a funeral. It also has parallels with the idea of appointing a digital executor discussed later in the book.

Eter9 (https://www.eter9.com)

Eter9 (2017) describes itself as ‘is a social network that relies on artifi-cial intelligence as a central element’ and that ‘Even in your absence, the virtual beings will publish, comment and interact with you intelligently’. A key element is Counterparts:

‘Your Virtual Self that will stay in the system and interact with the world just like you would if you were present. Your Counterpart will learn more with each action you take. The more you interact in the new social network, the more your Counterpart will learn!’

Such a Counterpart is able to continue to post and interact with others on the network after you are dead (Morse, 2015). In practice users post tweet style messages (‘thinking into Eternity’) which can be read by other users of the system (if set to ‘public’ or ‘connections’), and also, it is assumed,

18 ◾ Digital Afterlife

start to build the knowledge base of the Counterpart (although how this happens is not detailed). There are also ‘Eternilisations’, effectively favou-rite posts. Eliza Nine, the host bot has 54467 connections (as of 3 July 2018), which is probably a reasonable estimate of the user-base to date, although there are fewer active users. There is no obvious way in which you can access your own or other’s Counterparts in order to see how well they are developing, if at all. Again, sites like this would only be accessed and used by those with a keen interest in their continued online presence. The consequent impact on those left behind could be both considerable and unpredictable.

LifeNaut (https://www.lifenaut.com)

LifeNaut works on a similar principle to Eter9, enabling people to cre-ate mindfiles by uploading pictures, videos, and documents to a digital archive, but this is an explicit process rather than a background one as with Eter9. It also enables the user to create a photo-based avatar of the person that will speak for them, although there is the choice of only a single male and female voice which are both US English. LifeNaut is a product of the Terasem Movement Foundation (http://www.terasemmovementfounda-tion.com/) which describes its work on LifeNaut as being to investigate the Terasem Hypotheses which state that:

1. A conscious analog of a person may be created by combining suf-ficiently detailed data about the person (a ‘mindfile’) using future consciousness software (‘mindware’).

2. Such a conscious analog can be downloaded into a biological or nan-otechnological body to provide life experiences comparable to those of a typically birthed human.

In practice LifeNaut offers a number of ways to build a ‘mindfile’. These include:

• Just talking to a few sample bots, although the conversations seem nonsensical and they appear to ignore what you say.

• Filling out some interview questionnaires, including some ‘validated’ personality profiles, including a 486 question personality survey measuring cautiousness, conscientiousness, cooperation, gregari-ousness, and nurturance.

Perspectives on Digital Afterlife ◾ 19

• Talking to your own avatar so it learns from what you say, although this appears to require an explicit ‘correction’ action.

• Manually adding favourite things and URLs, although your bot does not appear to learn them once added.

It is, however, also possible to have your mindfiles beamed continually into space for later, potential, interception, and recreation by alien intel-ligences. It is notable that much of the site functionality is implemented using the now deprecated Adobe Flash and so is hard to access from modern web-browsers, and completely unsupported by the end of 2020 (Mackie, 2017). The grandiosity of some of the claims made here are not all empirically testable. Furthermore, the idea of creating a digital archive for future use raises questions about the impact of life stage at death, as the experiences of people at different stages of the life span will impact on the legacy left behind such that an afterlife may become ‘stuck’ at a par-ticular stage without moving forward with those who are left behind. This idea is taken-up by Reader in Chapter 10.

Eternime (http://eterni.me)

When using Eternime the individual is expected to train their immortal prior to death through daily interactions. Data are apparently mined from Facebook, Fitbit, Twitter, e-mail, photos, video, and location information with the individual’s personality being developed through algorithms through pattern matching and data mining. Eternime (2017) is currently in a private stage, (as of July 2018), so it is not yet possible to verify any claims or really understand what technology is in use. As of 3 July 2018, 40,497 people were signed up for their waiting list.

Given the practical state of Eter9 and LifeNaut, and the continued ‘private Alpha’ of Eternime, it would seem that there is more hype than substance to much of the current media coverage of such digital immortalisation systems. There are also other high-profile android/chatbot projects which should be approached with caution. For example, in Autumn 2017 Sophia, a humanoid robot gave a ‘speech’ at the United Nations (United Nations, 2017) and has even been granted citizenship of Saudi Arabia (Griffin, 2017). Whilst this may encourage recognition of the fact that there needs to be more debate, as well as legislation in this area, the level of technical accom-plishment actually shown is hotly debated (Ghosh, 2018). Related to this, Jandrić discusses the status we should give to such robots in Chapter 11.

20 ◾ Digital Afterlife

Daden

The work of Daden and the University of Worcester (Burden & Savin-Baden, 2019) in the United Kingdom aims to create a virtual human, which is a digital representation of some, or all, of the looks, behav-iours, and interactions of a specific physical human. This prototype system contains relevant memories, knowledge, processes, and person-ality traits of a specific real person, and enables a user to interact with that virtual persona as though they were engaging with the real person. The virtual persona has the individual’s subjective and possibly flawed memories, experiences, and view of reality. The information provided by the individual is in a curated form and, as such, only data the individual chooses to share and be included in the virtual persona has been used so far. Whilst the project has focused around the use of such persona within the sphere of corporate knowledge management, the mere exis-tence of the virtual persona immediately raises issues around its Digital Afterlife. The virtual persona projects are described in more detail in a forthcoming paper (Mason-Robbie et al., forthcoming) and in Chapter 9, Burden discusses approaches and technologies involved in building a digital immortal.

PERSPECTIVES ON DIGITAL AFTERLIFE The use of digital media in managing the Digital Afterlife appears to be both evocative and troublesome, affecting emotions and the ability to grieve and manage legacies. Kasket (2012, p. 252) notes ‘mourning on Facebook, and the “repurposing” of in-life profiles as continuing spaces to connect with the dead, is a relatively new phenomenon and a young area of research’. Most current research merely focuses on grief and mourning, with little research exploring the sociocultural and sociopo-litical impacts. Further, there is little evidence about the impact of eter-nal endurance and instant vanishment on recipients, family, friends, and religious leaders, nor its effect on mourning practices. Preserving oneself or being preserved by someone else may affect both the dying person’s peace of mind and the well-being of the bereaved. Further, it is not clear whether the possibility of Digital Afterlife and the use of digital media alters thoughts about the mind-body connection, and whether interac-tion with a person’s Digital Afterlife alters one’s spiritual journey through grief. Distinguishing between those who preserve their own or another’s Digital Afterlife, those that mediate the experience of others, and those that receive the Digital Afterlife of a deceased person is important when

Perspectives on Digital Afterlife ◾ 21

considering the intended and unintended consequences of the very existence of Digital Afterlives.

Preservers of Digital Media

Preservers are those who use memories and artefacts to create a digital legacy, such as a memorial site or digitally immortal persona, and may include the deceased themselves before death. Three potential types of creators of Digital Afterlives can be identified:

• Memory creators—Those creating passive digital memories and artefacts pre and post the subject’s death. These have already been considered above in examples such as virtual venerations, digital commemoration, digital memorisation and durable biographies, and are typically not created by the subject.

• Avatar creators—Those creating a representative interactive avatar pre-death, typically by the subject, which is able to conduct a limited conversation with others but has a very limited capability to learn, grow, act on, and influence the wider world around it (and hence could be considered a virtual humanoid in the typology identified by Burden & Savin-Baden, 2019). It has minimal likelihood of being mistaken for a still-living subject. An example of this is the virtual persona created by Daden described earlier and discussed in more detail in Burden’s Chapter 9.

• Persona creators—Those creating a digitally immortal persona pre-death that learns and adapts over time and can influence and act on the wider world around it (and hence could be considered a virtual human or even ultimately a virtual sapien (Burden & Savin-Baden, 2019). It has a high likelihood of being mistaken for a still-living subject.

Mediators

Mediators are professionals, such as bereavement counsellors, religious leaders, or lawyers who support both people pre-death to create digital legacies of themselves, and the bereaved who receive or encounter legacies, memorial sites or digitally immortal persona. An understanding of multiple perspectives, including the wishes and desires of the person pre-death, and the potential idiosyncratic response of the receivers experiencing the Digital Afterlife of the deceased person is becoming more important to this group.

22 ◾ Digital Afterlife

Receivers of Digital Media

These are people who receive the memories and artefacts, including memorial sites, digital messages, and/or digitally immortal persona. As highlighted earlier, reactions to the Digital Afterlife of the deceased may be highly idiosyncratic and unpredictable, and indeed may change over time. The perspective of this group should be an important consideration, in the cultural context within which they are embedded.

THE IMPACT OF DIGITAL AFTERLIFE CREATION In an emerging area of research, it is becoming increasingly important to consider the impact of Digital Afterlives on those who are left behind. For example, whilst the living person may consent to their Digital Afterlife existing, the loved ones of the deceased may hold a different perspective on experiencing this. Furthermore, in Chapter 5, Bassett discusses the concept of the fear of ‘second loss’ where the bereaved fear losing the data left by the dead. Therefore, the bereaved person is faced with the original loss of the loved one, and the emotional concomitants of exposure to their digital legacy, followed by the actual or potential loss of this digital legacy in the future. Yet currently there is little literature or guidance about post-humous digital etiquette or the impact of the unintended consequences of Digital Afterlife creation.

Posthumous Digital Etiquette

Cuminskey and Hjorth (2018) explore representing, sharing, and remem-bering of loss. They suggest that mobile media results in a form of entan-glement with the dead that are both private and public. What is of both interest and concern is who owns the data, what is the relationship between privacy and commemoration, and whether since there are few guidelines there needs to be an etiquette about how death online is managed. Shifting cultural norms towards an increase in sharing personal stories online and the expression of grief and mourning online are important to consider here. We are a long way from Victorian mourning etiquette and the rules that governed appropriate behaviour. Wagner (2018) reviews a range of studies exploring mourning online and highlights that norms are con-stantly changing and renegotiated by users of social media. A distinction is also made between those who are mourning themselves, and reactions to the mourning of others, highlighting the need to consider the needs of both mourners, and the users of social media who are reacting to expres-sions of grief online.

Perspectives on Digital Afterlife ◾ 23

Unintended Consequences

Work in this area, such as Kasket (2019), introduces questions about the unintended consequences of the digital on death, suggesting that the dead continue to ‘speak’ themselves. Further she asks pertinent questions about how we manage our own data and what might occur when corporations compete with us for control of these data? It is possible that the intentions of the person pre-death become distorted and reshaped such that they no longer resemble the thoughts and wishes of that person. Hence, agency is called into question as the deceased is no longer able to act according to their will and agency is taken over by the corporation/s that control the data. This in turn raises concerns about to what ends the data might be used. It is already clear that commercial companies are using digital mourning labour to sell their products by capitalising on the grief and mass mourning following the death of celebrities.

CONCLUSION The effects of the use of digital media and the creation of Digital Afterlives require careful examination. For while it appears to be changing under-standings of grief and the afterlife, there has been no sustained research that has examined its effects on faith, faith rituals, mental health, and family relationships pre- and post-death. In the chapters that follow, issues pertaining to these important aspects of culture and society are consid-ered. As with any emerging field, we are left with unanswered ethical, moral, and spiritual questions that will require ongoing consideration and debate as the technological advances gather pace.

REFERENCES

Bassett, D. (2015). Who wants to live forever? Living, dying and grieving in our digital society. Social Sciences, 4, 1127–1139.

Bassett, D. (2018a). Ctrl+Alt+Delete: The changing landscape of the uncanny val-ley and the fear of second loss. Current Psychology. https://doi.org/10.1007/ s12144-018-0006-5.

Bassett, D. (2018b). Digital afterlives: From social media platforms to Thanabots and beyond. In C. Tandy, (Ed.), Death and anti-death (Vol. 16: 200 Years After Frankenstein). Ann Arbor, MI: Ria UP.

Birnhack, M., & Morse, T. (2018). Regulating access to digital remains – research and policy report. Israeli Internet Association. Available online https:// www.isoc.org.il/wp-content/uploads/2018/07/digital-remains-ENG-for-ISOC-07-2018.pdf.

Brock, B. (2010). Christian ethics in a technological age. Grand Rapids, Michigan: Wm B Eerdmans Publishing Co.

24 ◾ Digital Afterlife

Burden, D., & Savin-Baden, M. (2019). Virtual humans: Today and tomorrow. Florida, US: Taylor and Francis.

Chauvet, L. M. (1995). Symbol and sacrament: A sacramental reinterpretation of Christian existence, trans. Patrick Madigan and Madeleine Beaumont. Collegeville, MN: Liturgical Press.

Cuminskey, K., & Hjorth, L. (2018). Haunting hands. Oxford, UK: Oxford University Press.

Davies, J. D. (2008). The theology of death. London: Continuum. Eter9. (2017). Available online https://www.eter9.com/ Eternime. (2017). Available online http://eterni.me/ Ghosh, S. (2018). Facebook’s AI boss described Sophia the robot as ‘complete b——t’

and ‘Wizard-of-Oz AI’. Business Insider UK. Available online https://www. businessinsider.in/facebooks-ai-boss-described-sophia-the-robot-as-complete-b-t-and-wizard-of-oz-ai/articleshow/62391979.cms

Gooder, P. (2016). Body: Biblical spirituality for the whole person. London: SPCK Publishing.

Griffin, A. (2017). Saudi Arabia Grants Citizenship to a Robot for the first time ever. The Independent. Available online https://www.independent.co.uk/ life-style/gadgets-and-tech/news/saudi-arabia-robot-sophia-citizenship-android-riyadh-citizen-passport-future-a8021601.html

Hutchings, T. (2017). We are a united humanity: Death, emotion and digital media in the church of Sweden, Journal of Broadcasting & Electronic Media, 61(1), 90–107.

Kania-Lundholm, M. (2019). Digital mourning labor: Corporate use of dead celebrities on social media. In T. Holmbery, A. Jonsson, & F. Palm. (Eds.). Death matters: Cultural sociology of mortal life. Cham, Switzerland: Palgrave Macmillan.

Kasket, E. (2012). Continuing bonds in the age of social networking: Facebook as a modern-day medium. Bereavement Care, 31(2), pp. 62–69.

Kasket, E. (2019). All the ghosts in the machine: Illusions of immortality in the digital age. London: Robinson.

LifeNaut Project. (2017). Available online https://www.lifenaut.com/ Maciel, C., & Pereira, V. (2013). Digital legacy and interaction. Heidelberg, Germany:

Springer. Mackie, K. (2017). Adobe and browser makers announce the end of flash. Redmond

Magazine. Available online https://redmondmag.com/articles/2017/07/25/ adobe-ending-flash-support.aspx Accessed 6th December 2019

Mayer-Schönberger, V. (2009). Delete: The virtue of forgetting in the digital age. Princeton, NJ: Princeton University Press.

Meese, J., Nansen, B., Kohn, T., & Arnold, M., & Gibbs, M. (2015). Posthumous per-sonhood and the affordances of digital media. Mortality, 20(4), pp. 408–420.

Morse, F. (2015). Eter9 social network learns your personality so it can post as you when you’re dead. BBC Newsbeat website. Available online http://www.bbc.co.uk/newsbeat/article/34015307/eter9-social-network-learnsyour-personality-so-it-can-post-as-you-when-youre-dead. Accessed 6th December 2019

Perspectives on Digital Afterlife ◾ 25

O’Donnell, K. (2019). Digital theology: Constructing theology in a digital age. London: Bloomsbury.

Pitsillides, S., Waller, M., & Fairfax, D. (2012). Digital death, the way digi-tal data affects how we are (re)membered. In S. Warburton, & Stylianos Hatzipanagos, (Eds.). Digital identity and social media, pp. 75–90. IGI Global.

Savin-Baden, M., & Burden, D. (2018). Digital immortality and virtual humans. Journal of Post digital Science and Education, 1(1), pp 87–103 (Published online July 2018).

Savin-Baden, M., Burden, D., & Taylor, H. (2017). The ethics and impact of digital immortality. Knowledge Cultures, 5(2), 11–19.

Sherlock, A. (2013). Larger than life: Digital resurrection and the re-enchantment of society. The Information Society, 29(3), pp. 164–176.

Stokes, P. (2015). Deletion as second death: The moral status of digital remains. Ethics and Information Technology, 17(4), pp. 237–248.

United Nations. (2017). Speech by ‘Sofia’. Wagner, A. J. M. (2018). Do not click “Like” when somebody has died: The role

of norms for mourning practices in social media. Social Media + Society. https://doi.org/10.1177/2056305117744392.

Wagner, R. (2012). Godwired: Religion, ritual and virtual reality. New York: Routledge.

Walter, T. (2017). How the dead survive: Ancestors, immortality, memory. In M. H. Jacobsen (Ed.), Postmortal society. Towards as sociology of immortality. London: Routledge.

Worden, J. W. (2008). Grief counseling and grief therapy: A handbook for the mental health practitioner (4th ed.). New York: Springer.

2

AI AND THE BIOSCIENCE AND CLINICAL

CONSIDERATIONS FOR IMMUNOLOGY

INTRODUCTION

As I mentioned in the Preface of this book (hopefully you read it),

immunology can be described through the maxim, “Immunology is

a battle of ‘self’ versus ‘non-self’,” and through the paradox, “Immu-

nology is our best friend and our worst enemy.” Hopefully, some

simple explanations will make sense of these otherwise surreptitious

statements. And more so, the discussions in the subsequent chapters

in this book on the bioscience of immunology and chronic inflam-

mation1 and the role of artificial intelligence (AI) will give you a

foundation that will help you better understand the information we

are continually hearing about serious diseases, infectious pandemics

and current and developing treatments and cures (e.g., immunother-

apeutics, vaccines, etc.). It will also give us a better perspective on

our personal health and on the public health we all seek to preserve.

One other critical element to mention at the beginning of

any immunology discussion is the intimate relationship between

the science of immunology and genetics, a relationship referred

to as immunogenics, immunogenetics, and immunogenomics.

The immune system and its activity is effectively dictated and

16 AI, BIOSCIENCE AND CLINICAL CONSIDERATIONS

controlled by the human genome. AI is playing an enormous role

in our better understanding of this complex relationship both in

health and disease. Research and advances in our understanding of

the immune system and autoimmune diseases, cancers, infectious

diseases, and beyond are indelibly related to immunogenetics. As

such, there will be a future volume in this “AI for Everything”

series addressing genetics. In this volume on “AI for Immunology,”

by necessity, there will be some discussion on genetics as related to

immunogenetics.

INNATE (NATURAL) IMMUNITY

In this wonderful world of ours, there is “you”…and everything else.

Now, think of “you” as “self” and everything else as “non-self.” That

“non-self” might be a substance, chemical, infectious agent (patho-

gen, e.g., virus), toxin (airborne, ingested, contact), and even a non-

substance like mental, emotional, physiological, or physical (injury)

stress, virtually anything external to “you.” Your body (“self”) interprets

these “non-self” entities as “foreign” or the technical term, an “antigen

or immunogen” (we’ll stick mostly with antigen for this book).

Let’s assume you’re in good health, well-nourished, in good

physical condition with a sound mind in a sound body. But your

body does not like non-self-antigens, so it uses its natural (“innate”)

defenses like anatomical and chemical features (skin, tears, mucus

membranes, anti-infectious barriers, enzymes) and a series of com-

plex cellular elements. It’s kind of a “yin and yang” metaphor where

“self” is good and “non-self” (antigen) is evil.

Your body (“self”) recognizes “non-self” (antigens) through a

series of specialized white blood cells (WBCs or leukocytes, particularly

macrophages, monocytes, and T-lymphocytes with their ‘human leu-

kocytic antigen [HLA]’ receptors and CD4 surface proteins) that bind

the antigen in an “antigen-presenting complex (APC).” This APC pro-

duces chemicals called cytokines (e.g., interferon, interleukins, IL-1,

4, 5, 6) that signal a series of T-helper, T-suppressor, and T- cytotoxic

cells (Figure 2.1). Together this exquisite molecular biological process

AI, BIOSCIENCE AND CLINICAL CONSIDERATIONS 17

called the innate immune system serves as the primary 24/7 defense

of our health and wellness.2 It truly is “our best friend.”

CELLULAR AND HUMORAL (IMMUNOCHEMISTRY)

In a continuum of immune activity, in conjunction with the

innate immune response, additional cellular elements (B-cells,

B- idiotype cells, B-memory cells, plasma cells, natural killer [NK]

cells) and more cytokines are continuously being generated to

provide “memory” (B-memory cells) for future recognition and

an “anamnestic” response to antigens. But more so, these addi-

tional cellular and chemical (humoral) elements are generating

proteins called antibodies (specific to the invading antigen) and

a complement system of immunoglobulin antibodies (IgA, IgG,

IgM) which continue to bind and remove antigen through lysing,

opsonization, chemotactic activity, and polymorphonuclear (PMN)

phagocytosis. This form of immune activity is the first level of what

is termed the adaptive (acquired) immune response (Figure 2.2).

Figure 2.1 The innate (natural) immune response. (Louis J Catania © 2021.)

18 AI, BIOSCIENCE AND CLINICAL CONSIDERATIONS

REVIEW OF AI FOR INNATE (NATURAL) IMMUNITY AND ACUTE INFLAMMATION

1 AI is being used in many immunological fields for its analytic

abilities, antigen and phenotype (observable characteristics of

an individual) detection, predicting prognosis and treatment

outcomes, etc. Algorithms have been developed to predict the

outcome of interactions and classification at molecular levels.

Machine learning can predict genotypes (genetic composition)

associated with poor prognosis.3 Phenotype detection is another

example of the classification abilities of AI being used for cellu-

lar phenotype detection and classification to determine the pres-

ence of a particular disease or its outcome. In certain diseases,

the importance of phenotype classification at the molecular

level is more prominent since it can directly determine prog-

nosis and treatment plan. Image-based AI techniques (Section

GPU, Chapter 1, Page 5) also have remarkable accuracy at both

Figure 2.2 The adaptive (acquired) immune response. (Louis J Catania

© 2021.)

AI, BIOSCIENCE AND CLINICAL CONSIDERATIONS 19

cellular and molecular levels. Such image-based techniques have

been recruited to determine immune responses such as mac-

rophage activation4 and lymphocyte infiltration in breast cancer

and other solid tumors,5 hence assist in determining prognosis

and response to treatment. More studies have the potential to

recruit AI and its analytic value in immunology.6

2 Potential regulatory mechanisms and identifying immunogenic

prognostic markers for breast cancer (BC) were used to con-

struct a prognostic signature for disease-free survival (DFS)

of BC based on artificial intelligence algorithms. Differentially

expressed immune genes were identified between normal tissues

and tumor tissues. The artificial intelligence survival prediction

system was developed based on three artificial intelligence algo-

rithms. Comprehensive bioinformatics identified 17 immune

genes as potential prognostic biomarkers, which might be

potential candidates of immunotherapy targets in BC patients.

These artificial intelligence survival predictive systems will be

helpful to improve individualized treatment decision-making.7

3 Assessing antigen-induced T-cell activation is critical because

only functionally active T-cells are capable of killing the desired

targets. Autofluorescence imaging can distinguish T-cell activ-

ity states in a non-destructive manner by detecting endoge-

nous changes in metabolic co-enzymes. However, recognizing

robust activity patterns is challenging in the absence of exog-

enous labels. Machine learning has demonstrated methods that

can accurately classify T-cell activity across human donors. Using

cropped single-cell images from six donors, classifiers ranging

from traditional models that use previously extracted image

features to convolutional neural networks (CNNs) pre-trained

on general non-biological images were studied. Adapting pre-

trained CNNs for the T-cell activity classification task provides

substantially better performance than traditional models or a

simple CNN trained with the autofluorescence images alone.8

4 In Chapter 1 we stated the fact that, “The most effective data

sources utilized in machine learning are graphics (video and

20 AI, BIOSCIENCE AND CLINICAL CONSIDERATIONS

images)” and we referenced the graphic processing unit (GPU)

by Nvidia as being responsible for that significant advance in AI.

That advance led to multi-channel immunofluorescence imag-

ing (cellular confocal microscopy) and cell membrane immu-

nofluorescent stains with deep convolutional neural networks

(DCNNs) to classify multiple T-cell and dendritic cell types.

However, with densely packed cells, and complex image fea-

tures, this technique reaches the limit and begins to produce

poor image quality, and thus, the technique fails. It is at this

limit that deep learning approaches excel. Using deep learning

region-based segmentation techniques, it is now possible to

analyze challenging image data that previously required labo-

rious hand segmentation, based on multichannel information

difficult for the human visual system to parse.9

5 AI enables radical new solutions to complex unsolved problems.

As such, it is gaining momentum within the public health field.

An overview of the current application of artificial intelligence

(AI) in the field of public health and epidemiology focused on

antimicrobial resistance, a topic of vital importance and included

in the “Ten threats to global health in 2019” report published

by the World Health Organization. Random mutations can make

some bacteria immune to specific drugs, yet the widespread use

of these drugs make these immune-modulated bacteria prolif-

erate and, with resistance traits, they can be transferred among

bacteria of different taxonomic and ecological groups. In other

words, resistance can spread.10 AI can help in two aspects: first,

create a peptide structure (potent broad- spectrum antibiotics)

to predict the degree of antimicrobial activity; and second,

suggest new synthetic peptide structures as specific antimicro-

bial. Several authors have applied standard data mining models,

including support vector machines (SVM) and artificial neural

networks with results reaching an accuracy in the discrimination

of antimicrobial versus non-antimicrobial peptides of 91.9%,

94.76%, and 95.79%.11 AI enables radical new solutions to these

complex unsolved public health problems.12

AI, BIOSCIENCE AND CLINICAL CONSIDERATIONS 21

ADAPTIVE (ACQUIRED) IMMUNITY

Fundamentally, as described above, your innate immune system is all

about the battle of self-versus non-self-antigens. Wouldn’t it be nice

if our body won all the battles? Needless to say, life doesn’t work that

way. Sometimes, the innate immune system can’t quite handle the load.

Maybe, for some pathological or environmental reason your system is

compromised (“immunocompromised”) or weakened or suppressed

(“immunosuppression”). Perhaps the antigen is not being removed

(persistent cause), or it keeps reoccurring (re-exposure) as the innate

system tries to eliminate it. Or maybe the antigen is too abundant or

too pernicious (virulent) for the innate immune response to overcome

it. In such conditions, after a few days to a week of feeling “not so great,

“the strength of the human immune system begins to demonstrate a

more aggressive “adaptive immune response.” All in all, this adaptive

immune system is a powerful defender and protector to a point.

Adaptive immunity is more vigorous than the innate form and

control of its intensity and duration is poorly understood with genetic

predisposition and three specific mechanisms believed to be inter-

related. First is “feedback inhibition” where removal of the antigen

reduces stimulus and thus decreased production of antibodies and

cytokines, effectively reducing and reversing the response. Second is

when T-suppressor cells reduce T-helper cells and thus a commensurate

reduction of B-cell activity (controlled by T-helper cells). And third,

the very complex system of idiotype antigen-specific B-cells increasing

through genetic cloning and creating their own immunogenic stimuli

which induces anti-idiotype-specific antibodies (“antibodies 1, 2”)

that establish an antibody idiotype-specific regulatory circuit. (This

later process is why I mentioned “poorly understood” as this “regula-

tory circuit” remains the center of much immunology research which

will be discussed further in Chapter 3, page XXX).

Failure to remove the offending antigen in a timely manner, or

malfunction of any one of the three mechanisms described above,

can lead to an uncontrolled response resulting in acute inflammation

(discussed below), chronic inflammation (Chapter 3), or a condition

AU: Please cite the correct section in chapter 3

22 AI, BIOSCIENCE AND CLINICAL CONSIDERATIONS

referred to as a “cytokine storm” which has potentially devastat-

ing consequences (as demonstrated in SARS-CoV-2 infections –

discussed in Chapter 5). These phenomena and the endpoints of

adaptive immunity represent the second half of our earlier stated

paradox about the immune system. It can indeed be our worst enemy.

ACUTE INFLAMMATION

We can look at adaptive immunity as a race to eliminate the “bad

guys” (antigens), a competition which, in most cases (given an oth-

erwise healthy person), it wins. If, however, the underlying health of

the patient (note how I move from “person” to “patient” here), is

not adequate to sustain the activity of the adaptive immune response,

things could begin to deteriorate or “dysregulate.”

PATHOPHYSIOLOGY

As we described above, the adaptive immune response is using a

lot of tools, i.e., cellular components and chemicals (cytokines) in

amounts not normal (“pathophysiological”) to your body. Their

regular (“physiological”) activity is working diligently to resolve

the “pathological” (disease) process in your body, but those efforts

are also producing abnormal chemical byproducts called “pro-

inflammatory cytokines.” Accumulation of these byproducts is a

basis for the pathophysiological process called “acute inflamma-

tion.” (Note: All inflammation, acute and chronic is characterized

in medical terminology by the suffix “…itis.” Thus, any condition

mentioned, henceforth, under any disease category with the suffix

“…itis” should be considered an inflammation.)

Acute inflammation is an efficient, though non-specific immuno-

pathological defense mechanism of the adaptive immune system that

produces an observable clinical response referred to as the “inflam-

matory cascade.” The left side of the diagram in Figure 2.3 represents

the pharmacodynamics most associated with acute inflammation

and its medical treatment. You’ll notice how the drug therapies

AI, BIOSCIENCE AND CLINICAL CONSIDERATIONS 23

( corticosteroids and NSAIDs) at particular sites within the pharma-

cologic tree block pathways that lead to vasodilation (cyclooxygen-

ase and lipoxygenase pathways), the first level of acute inflammation

and pain (prostaglandins). Also, the chemicals (histamine and hep-

arin) and mast cell molecule degranulation associated with the Type

I allergic hypersensitivity reaction (described below) are immuno-

modulated within the pharmacological tree (right side). The balance

of the biochemistry and molecular biology in this pharmacological

diagram (right side) relates more to chronic inflammation and their

relevance will be described in some detail in Chapter 3.

Acute inflammation can occur anywhere, internally or externally

producing the inflammatory cascade. The “cascade” includes the

pharmacological components producing inflammation and their sub-

sequent clinical manifestations. The pathophysiology and histopathol-

ogy of acute inflammation as defined in the inflammatory cascade is

produced by the cells and mediators of the adaptive immune response

Figure 2.3 The inflammatory cascade. (Louis J Catania © 2021.)

24 AI, BIOSCIENCE AND CLINICAL CONSIDERATIONS

resulting in a dynamic unfolding of clinical events (Figure 2.4). The

observable signs and symptoms that flow in the cascade include

vasodilation (“rubor” or redness); edema or swelling (“tumor”);

increased tissue or body temperature (“calor”); and pain (“dolor”).

Cellular (leukocyte) accumulation (“infiltration”) can lead to even-

tual tissue destruction (“ulceration”) with loss of tissue or organ

function (“functio laesa”) and permanent tissue damage (scarring).

HYPERSENSITIVITY REACTIONS (TYPE I–IV)

Among the cellular reactions associated with the adaptive immune

response, there are four classic “types” of clinical reactions produced

by certain antigen categories and characterized by specific cellular

responses and types of immunoglobulin antibodies (see Figure 2.2).

Figure 2.4 Clinical manifestations of acute inflammation. (Louis J Catania

© 2021.)

AI, BIOSCIENCE AND CLINICAL CONSIDERATIONS 25

Type II (cytotoxic), III (immune-complex), and IV (cell-mediated,

delayed reaction) are specific to certain antigens. Type I, the immedi-

ate, allergic (or anaphylactic) hypersensitivity response is produced

by an antigen referred to as an “allergen.” Examples of this response

include hay fever, eczema, hives, asthma, food allergy, insect bites

and stings, dust, pollen, and on and on. Like its antigen cousin, the

allergen can be inhaled, ingested, or enter through the skin.

After a susceptible person is exposed to an allergen, the body

starts producing a large quantity of IgE antibodies. This results in

the reoccurrence of the allergic response, sometimes with increas-

ing intensity with each re-exposure to the allergen. Included among

its cytokines, are histamine and heparin (mentioned above), which

along with other inflammatory symptoms, produces itching. With

the allergic and hypersensitivity response, symptoms can also

include itching, sneezing, and congestion (from histamine release

and degranulation of mast cells – in Figure 2.3). In their most severe

form, allergy or hypersensitivity can produce a life-threatening con-

dition call anaphylaxis and anaphylactic shock.13

The clinical presentations in acute inflammation usually occur in

hours to days (minutes in Type I immediate, allergic IgE response)

and ulceration shortly thereafter if left untreated. Somewhat ironic

in this sequence of the clinical inflammatory process, is that all of

the effects up to (but not including) ulceration, are actually part of

the immune system’s healing process (bit of a “best friend – worst

enemy” combination!).

CLINICAL CONSIDERATIONS IN ACUTE INFLAMMATION

The variety of treatment considerations (manipulations of the phar-

macology in Figure 2.3) related to the inflammatory cascade is exten-

sive, but the first treatment is always the removal of the cause (the

antigen). Such removal can range from simple hygiene; to antibiotics

or antivirals for a bacterial or viral infectious antigen, respectively

(external or internal). Type I reactions (allergy) include removal of

26 AI, BIOSCIENCE AND CLINICAL CONSIDERATIONS

the allergen by antihistamine, decongestants, and mast cell stabiliz-

ing drugs. In more severe reactions (including anaphylaxis), corti-

costeroids and injectable epinephrine may be required. In all forms

of acute inflammation, cold (wet or ice) compresses are enormously

valuable to reduce inflammatory edema by producing vasoconstric-

tion and reducing the vasodilation of associated blood vessels (i.e.,

rubor with tumor or edema) that are supplying inflammatory WBCs

(diapedesis) to the effected site.

Topical and systemic corticosteroids are used to mitigate signs and

symptoms in more acute inflammatory reactions. These drugs pro-

duce “masking effects” (reduction of signs and symptoms) but they

are not curative as is sometimes thought. NSAIDs (non-steroidal anti-

inflammatories such as aspirin, ibuprofen, or naproxen) provide pain

relief (as anti-prostaglandins). Injury repair and stress reduction (phys-

ical, physiological, psychological) therapies are also valuable. Beyond

these therapies, treatment is palliative and directed to the involved site

(joint, muscle, internal organ, skin, etc.) to reduce the inflammatory

process (assuming the antigen has been removed) and mitigate the

pain. Additional measures include nutritional and vitamin supple-

ments, omega-3 sources, compression, stress reduction, and exercise.

REVIEW OF AI FOR ADAPTIVE (ADAPTIVE) IMMUNITY AND ACUTE INFLAMMATION

1 As described in Chapter 1, “The most effective data sources uti-

lized in machine learning are graphics (video and images).” The

recognition of antigen by T-cells requires cell contact and is asso-

ciated with changes in T-cell shape. By capturing these features in

fixed tissue samples, in situ adaptive immunity could be quanti-

fied. A deep convolutional neural network (DCNN) was used to

identify fundamental distance and cell-shape features associated

with cognate help (cell-distance mapping (CDM)). In mice, CDM

was comparable to excitation microscopy (TPEM) in discrimi-

nating cognate T-cell-dendritic cell (DC) interactions from non-

cognate T-cell-DC interactions. This cell discrimination capability

AI, BIOSCIENCE AND CLINICAL CONSIDERATIONS 27

through DCNN confirmed identification of antigen-presenting

cells in certain diseases. This data provides a new approach with

which to study human in situ adaptive immunity broadly appli-

cable to autoimmunity, infection, and cancer.14

2 Diagnosis of acute appendicitis is challenging, especially due to

the frequently unspecific clinical picture. Inflammatory blood

markers and imaging methods like ultrasound are limited as

they have to be interpreted by experts and still do not offer suf-

ficient diagnostic certainty. A recent study presents a method for

automatic diagnosis of appendicitis as well as the differentiation

between complicated and uncomplicated inflammation using

values/parameters which are routinely and unbiasedly obtained

for each patient with suspected appendicitis. A total of 590

patients (473 patients with appendicitis in histopathology and

117 with negative histopathological findings) were analyzed

retrospectively with modern algorithms from machine learn-

ing (ML) and artificial intelligence (AI). Results revealed the

capability to prevent two out of three patients without appen-

dicitis from useless surgery as well as one out of three patients

with uncomplicated appendicitis. The presented method has the

potential to change the current therapeutic approach for appen-

dicitis and demonstrates the capability of algorithms from AI

and ML to significantly improve diagnostics even based on rou-

tine diagnostic parameters.15

3 Cellular frustrated models can describe how the adaptive immune

system works. They are composed by independent agents that con-

tinuously pair and unpair depending on the information that one

subset of these agents display. The emergent dynamics is sensitive

to changes in the displayed information and can be used to detect

anomalies important to accomplishing the immune system’s main

function of protecting the host. Thus, these models could be ade-

quate to model the immune system activation. It has been hypoth-

esized that these models could provide inspiration to develop new

artificial intelligence algorithms for data mining applications. Imple-

mentation strategies of these immune inspired ideas for anomaly

28 AI, BIOSCIENCE AND CLINICAL CONSIDERATIONS

detection applications use real data to compare the performance of

cellular frustration algorithms with standard implementations of

one-class support vector machines and deep autoencoders. Results

demonstrate that more efficient implementations of cellular frustra-

tion algorithms are possible and also that cellular frustration algo-

rithms can be advantageous for semi- supervised anomaly detection

applications given their robustness and accuracy.16

4 The inflammatory response runs through all stages of acne. It

involves both innate and adaptive immunity. A study aimed to

explore the candidate genes and their relative signaling path-

ways in inflammatory acne using data mining analysis. Aberrant

differentially expressed genes (DEGs) and pathways involved in

acne pathogenesis were identified using bioinformatic analy-

sis. There were 12 DEGs identified and the pathways included

chemokine signaling pathway, cytokine-cytokine receptor inter-

action, and Fc gamma R-mediated phagocytosis. The study could

serve as a basis for further understanding the pathogenesis and

potential therapeutic targets of inflammatory acne.

5 Using simulation experiments, an AI system called Multiple

Shooting for Stochastic (randomly determined probability) Sys-

tems (MSS) method produced credible and prediction intervals

with desired coverage in estimating key epidemic parameters

(e.g., mean duration of infectiousness and R0) and short- and

long-term predictions (e.g., one- and three-week forecasts, tim-

ing and number of cases at the epidemic peak, and final epi-

demic size). In a humidity-based model susceptible members

may be infected at a rate proportional to the prevalence of infec-

tious individuals in the population and will immediately become

infectious to others. Infectious individuals recover at a constant

rate and develop temporary immunity against the circulating

pathogen. Once the immunity wanes, the individual becomes

susceptible to infection. A humidity-based stochastic compart-

mental influenza model accurately predicted influenza-like

illness activity reported by U.S. Centers for Disease Control and

Prevention from ten regions as well as city-level influenza activ-

ity using real-time, city-specific Google search query data.17

AI, BIOSCIENCE AND CLINICAL CONSIDERATIONS 29

PATH TO CHRONIC INFLAMMATION

Through proper diagnosis and removal of the cause, in acute inflam-

mation health and wellness will result. But, if not resolved within a

reasonable period of time (weeks to months at most), the immune

system advances to a condition called “chronic inflammation,” dif-

ferent from acute inflammation in its cellular pathology and clinical

symptoms (often none at all versus those of acute inflammation).

It should also be noted that, though poorly understood, chronic

inflammation can develop spontaneously, that is without an apparent

antigen and acute inflammatory precursor episode.

This development of chronic inflammation could reasonably be

considered an advanced form of acute inflammation. But its patho-

genesis, histopathology, immunochemistry and particularly, its clin-

ical course give cause to consider it as a distinct and unique clinical

condition, notwithstanding its name. As such, let’s address chronic

inflammation (Chapter 3) as a distinct and separate disease entity,

albeit often evolving from its “distant cousin,” acute inflammation.

NOTES

1 Catania LJ. Primary care of the anterior segment 2nd edition (textbook). New York:

McGraw Hill. Chapter 2. Clinical considerations on anterior segment

pathology and immunology; January 1996. pp. 22–82.

2 The innate immune system. Immunopaedia. 2019.

3 Yu J, Hu Y, Xu Y, et al. An effective prediction model on prognosis of lung

adenocarcinomas based on somatic mutational features. BMC Cancer. March

22, 2019;19(1):263.

4 Pavillon N, Hobro AJ, Akira S, et al. Noninvasive detection of macrophage

activation with single-cell resolution through machine learning. Proc Nat

Acad Sci. 2018;115(12):E2676–E2685.

5 Sun R, Limkin EJ, Vakalopoulou M, et al. A radiomics approach to assess

tumour-infiltrating CD8 cells and response to anti-PD-1 or anti-PD-L1

immunotherapy: An imaging biomarker, retrospective multicohort study.

Lancet Oncol. 2018;19(9):1180–1191.

6 Jabbari P, Rezaei N. Artificial intelligence and immunotherapy. Expert Rev Clin

Immunol. 2019;5(7):689–691.

30 AI, BIOSCIENCE AND CLINICAL CONSIDERATIONS

7 Zhang Z, Li J, He T, et al. Bioinformatics identified 17 immune genes as

prognostic biomarkers for breast cancer: Application study based on arti-

ficial intelligence algorithms. Front. Oncol. March 31, 2020. doi: 10.3389/

fonc.2020.00330.

8 Wang J, Walsh AJ, Skala C, et al. Classifying T cell activity in autofluores-

cence intensity images with convolutional neural networks. J Biophotonics.

Augist 15, 2019. doi: 10.1002/jbio.201960050.

9 Sibley, AR. Investigating inflammation on the cellular level using machine

learning. Knowledge at University of Chicago. December 20, 2019. doi: 10.6082/

uchicago.2066.

10 Levy SB, Marshall B. Review antibacterial resistance worldwide: Causes, chal-

lenges and responses. Nat Med. December 2004;10(12 Suppl):S122–S129.

11 Youmans M, Spainhour C, Qiu P. Long short-term memory recurrent neural

networks for antibacterial peptide identification. In: 2017 IEEE International

Conference on Bioinformatics and Biomedicine (BIBM); 2017. pp. 498–502.

12 Rodríguez-González A, Zanin M, Menasalvas-Ruiz E, et al. Public health

and epidemiology informatics: Can artificial intelligence help future global

challenges? An overview of antimicrobial resistance and impact of cli-

mate change in disease epidemiology. Yearb Med Inform. August 2019;28(1):

224–231.

13 Allergy and the immune system. Johns Hopkins Health. 2019.

14 Liarski VM, Sibley A, van Panhuys N, et al. Quantifying in situ adap-

tive immune cell cognate interactions in humans. Nat Immunol. April

2019;20:503–513. doi: 10.1038/s41590-019-0315-3.

15 Reismann J, Romualdi A, Kiss N, et al. Diagnosis and classification of pedi-

atric acute appendicitis by artificial intelligence methods: An investigator-

independent approach. PLoS one. September 25, 2019;14(9): 1–15.

16 Faria B, Vistulo de Abreu F. Cellular frustration algorithms for anomaly

detection applications. PLoS one. July 8, 2019;14(7):e0218930.

17 Zimmer C, Leuba S, Cohen T, et al. Accurate quantification of uncertainty

in epidemic parameter estimates and predictions using stochastic compart-

mental models. Stat Methods Med Res. December 2019;28(12):3591–3608.

67

C H A P T E R 5

Analysis of Smart Home Recommendation System from Natural Language Processing Services with Clustering Technique

N. Krishnaraj,1 R. Lenin Babu,2 R. Adaline Suji,3

and Andino Maseleno4

1Department of Computer Science and Engineering, SRM Institute of Science and Technology, Kattankulathur, Tamil Nadu, India

2Conversight.ai, Indiana, Carmel, IN, USA

3Department of Computer Science and Engineering, Kalaignar Karunanidhi Institute of Technology, Coimbatore, Tamil Nadu, India

4STMIK Pringsewu, Lampung, Indonesia

CONTENTS5.1 Introduction 685.2 Review of Literatures 695.3 Smart Home: Cloud Backend Services 70

5.3.1 Advantages of This System 705.3.2 Internet of Things (IoT) 70

5.4 Our Proposed Approach 715.4.1 Natural Language Processing Services 725.4.2 Pipeline Structure for NLPS 72

5.4.2.1 Stop Word Removal by Recommendation Systems 735.4.2.2 Word Modeling Procedure 74

5.4.3 Clustering Model 75

68 ◾ Artificial Intelligence Techniques in IoT Sensor Networks

5.1 INTRODUCTIONIn the recent past, online services have become progressively useful thus extraordinarily improving the efficiency and quality of programming advancement [1]. A natural language processing service (NLPS), as an obliged part of natural language, controls etymological factors, features key issues, and gives a system to design arrangements; the NLPS maybe could be applied to the yields of contention mining in a general structure of refinement. The key adjustment consolidates the articulation “it is regular that,” which is a conceiva-bly “natural” linguistic articulation of defeasibility [2, 3]. However, a main point to worry about is the production of apparatuses for savvy home control and the board that address the necessities of nonspecialized people, so as to make this technology generally accessible to anyone [4]. As a home use of Internet of Things (IoT) paradigm, the smart home com-mits to developing personal satisfaction for occupants, for example, by observing energy utilization of appliance [5].

In the proposed framework, some essential strategies of NLP, such as tokenization, the expulsion of stop words, and parsing, are utilized to comprehend the voice orders. There has been a huge improvement in the area of mechanization utilizing various con-ventions for regular reason. It is not unexpected to see that cell phones have become an integral part of majority of the individuals’ lives nowadays; henceforth, most of the everyday family unit errands are now carried on with the assistance of cell phone [6]. In a savvy city, it is imperative to address the point of individuals and networks as a major aspect of shrewd urban communities, where the individuals from brilliant urban com-munities are people, networks, and gatherings [7]. One of the significant functionalities of keen urban areas is the correspondence, which gives the capacity of semantic data trade between every single included gathering [8]. In the beginning periods of NLPS, machine learning algorithms and preset transcribed principles were utilized to create the “translation.” Now these are replaced by further developed procedures similar to classifier and clustering methods [9].

In this sense, the IoT offers the capability of endless opportunities for new applications and services in the home setting that empower clients to access and control their home conditions from local and remote areas, so as to complete day-by-day life exercises easily from anywhere [10]. All that recently referenced improves the personal satisfaction of the client while simultaneously empowering energy effectiveness for NLPS model in a smart city that implies brilliant home communications [11]. IoT proactive conduct, setting mind-fulness, and collaborative communication abilities of savvy home communication are valuable for analysis. Keen home appliances and commands from application stage yet additionally transmit information to the application stage, in this manner getting to be in a generator and receiver of data.

5.5 Results and Analysis 765.5.1 Comparative Analysis of NLPS 79

5.6 Conclusion 80References 80

Smart Home Recommendation System ◾ 69

5.2 REVIEW OF LITERATURESIn 2017, Rani et al. [3] proposed that the client sends a direction through discourse to the mobile device, which translates the message and forwards the fitting order to the particu-lar appliance. In this they proposed the plan on executing four essential home appliances as a “Proof-of-Concept” for this venture, which incorporates fan, light, coffee machine, and door alarms. The voice direction given by the client is deciphered by the mobile device utilizing natural language handling. The mobile device goes about as a focal reassure; it figures out what activity must be carried out by which machine to satisfy the client’s solicitation.

To utilize such an arrangement to succeed neural architecture, opening name and space esteem forecast assignments by Mishakova et al. prepared natural language understanding models that don’t need adjusted information and can together become familiar with the expectation [12]. The planning phases of the NLPS, which do not require modified details, have been prepared and may, together, become familiar with the schedule, the space mark and the opening name of the projected assignments and the reason for the investigation, as well as the readily accessible data collection. The experiments show that a solitary model that learns on unaligned information is focused with best-in-class models, which rely upon aligned information.

In 2019 Alexakis et al. [12] proposed that the IoT agent coordinates a visit bot that can get content or voice directions utilizing NLP. With the utilization of NLP, home gadgets are more easy to use and controlling them is simpler, since in any event, when an order or question/command is unique in relation to the presets, the framework comprehends the client’s desires and reacts in like manner. The most important development is that it incorporates a few outsider application programming interfaces and open-source technol-ogies into one blend, highlighting how another IoT application can be manufactured today utilizing a multitier architecture.

In one study by Noguera-Arnaldos et al. [14], the control and the executives of this assortment of gadgets and interfaces represent to another test for non-master clients, rather than creating their life simpler. A natural language interface for the IoT exploits Semantic Web advances to permit non-master clients to control their home environment through a texting application in a simple and instinctive way.

Jivani et al. [15] proposed centralized administration that enables client to control res-idential machines and services with voice and furthermore settle on electronic choices for the end client’s benefit, for example, observing, developing solace, accommodation, controlling encompassing conditions, and conveying required data at whatever point required. The essential goal is to develop a plenarily helpful voice-based framework that uses artificial intelligence and NLPS to control every household application and services, and furthermore get familiar with the client inclinations after some time, utilizing machine learning algorithms.

Qin, and Guo (2019) proposed [16] the challenges that shrewd city is standing up to as far as semantic archive trade is concerned, and proposed a novel machine natural language mediation (MNLM) structure, which gives a sentence-based machine normal language

70 ◾ Artificial Intelligence Techniques in IoT Sensor Networks

(MNL) as a sort of intercession language, where every sentence as a compound idea is a lot of nuclear ideas to be perfect with all dialects accomplishing a worldwide semantic change. The MNL empowers the sentence PC intelligible and reasonable through novel codes, without semantic vagueness, and while MNLM will wipe out the semantic irregularity and develop the accurate importance understanding crosswise over conversational contexts.

5.3 SMART HOME: CLOUD BACKEND SERVICESA smart home coordinates different electrical appliances in the home and computerizes them with zero or least client mediation. The smart home keeps diverse condition factors present and aides the appliances to work as per the requirements of the client. Considering that the main servers keep running behind the cloud services of the outsiders referenced over, this makes our framework exceptionally adaptable, with no exertion from us, so it can support numerous simultaneous clients. Aside from this, the user interface of our application makes the connection with the framework well-disposed and simple. In gen-eral, implementation abuses the run-of-the-mill IoT infrastructures by giving an upgraded client experience and convenience of the fundamental IoT infrastructures with the incor-poration of NLP, voice acknowledgment, and numerous different technologies. For NLP investigation in shrewd home applications, the cloud offers a full help of improvement and activities and consistent combination standards, so the total lifecycle of application advancement, construct, test, computerized organization, and the board can be taken care of off-premise in the cloud.

5.3.1 Advantages of This System

These systems will, in general, be magnificently flexible with regards to the settlement of new gadgets and machines and other innovations Along with expanded energy efficiency. Depending on the utilization of keen home innovation, it’s conceivable to make space more energy-proficient. This system gives security to clients, controlling and confining access. There is a great deal of control and information security, which can be collected to guar-antee maximum security for the put-away information. Cloud computing offers one more bit of leeway of working from anyplace over the globe, as long as one has a web connection.

5.3.2 Internet of Things (IoT)

The IoT is a combination layer that permits to associate a few elements together. These can be physical gadgets or sensors, which produce intriguing information or actuators to con-trol encompassing conditions of the world. In request to build work efficiency and solace of an individual, mechanizing environment is basic. There has been a critical advancement in the field of robotization utilizing various conventions for basic reason. The fundamental model for IoT is shown in Figure 5.1. The IoT is quickly making strides in administration and utilization of most recent remote and wire correspondences. To proficiently use the assets in a smart home condition, all the home gadgets ought to be interconnected and give network to the end client so as to control it from anyplace anytime. IoT is changing over the brilliant urban communities and smart homes from publicity concept into the reality.

Smart Home Recommendation System ◾ 71

Smart home implants figuring capacities, networking, and media transmission inter-faces in the home apparatuses so as to encourage regular daily existence. The smart home condition includes sensors, actuators, interfaces, and apparatuses arranged together to give restricted and remote control of the environment. Every smart home comprises bril-liant items considered sensors and actuators that speak with a focal application. The focal application has different terms in different spaces, for example, a smart home passage. The client’s personality ought to be anonymized and access to client’s home apparatuses ought to be secured. It is given through secure login and assent of the client. There are shrewd objects and related communication advances to empower an IP-based IoT and the vision of IoT applications.

5.4 OUR PROPOSED APPROACHA traditional path is to play out a watchword put together inquiry with respect to the por-trayals of web-based administrations, which come up short on the capacity to represent complex semantic. The primary propose of the shrewd technology is to give services, for example, health monitoring and mind service, choice passage and specialist co-ops are sig-nificant prerequisites to analyze the NLP in savvy home correspondence models. This pro-posed model comprises various modules such as the recorded voice that will be changed over into content, the word modeling, and stop word evacuation by suggestion insert-ing modeling. To upgrade the accuracy of proposed model, advanced cluster-generating

FIGURE 5.1 Structure for IoT.

72 ◾ Artificial Intelligence Techniques in IoT Sensor Networks

technique (ACGT) is used. A significant basic subject of this chapter is the interdisciplinary reconciliation of the examination of natural language expressions, a consistent portrayal of the articulations, and a calculable standard language for the coherent representation.

5.4.1 Natural Language Processing Services

NLPS is a documented model of computer science and it serves the client to attempt to state alongside the voice commands. This model, NLP is a field of computer science that encour-ages us to construe what the client is attempting to state through his voice directions. The NLP in this task gives the client the opportunity to interface with the home machines with his/her own voice and typical language as opposed to muddled PC commands [17]. The greater part of the most recent NLP calculations is based upon machine learning, particu-larly measurable machine learning. Fundamental purpose of Natural Language Classifier permits identifying the objective from an approaching instant message. Numerous sen-tences or words which fit the objective must be given so as to make expectation. A note-worthy hidden topic of the work is the interdisciplinary joining of the analysis of normal language expressions, a sensitive portrayal of the expressions, and a calculable standard language for the consistent representation.

5.4.2 Pipeline Structure for NLPS

Preprocessing the sentences in service portrayals utilizing a mediator, here, play out a developed NLP pipeline. This progression needs to mark the limit of a sentence in writings and break them into an accumulation of semantic sentences, which by and large represent intelligent units of thought and will, in general, incorporate an anticipated linguistic struc-ture for further investigation. The outline of NLPS is shown in Figure 5.2. First, named substances are distinguished from writings parsed through NLP pipeline, and afterward the relations that exist between them are extricated.

The client forwards a voice command to the cell device, which translates the message and forwards a suitable direction to the particular machine. The voice order given by the client is deciphered by the cell device utilizing natural language handling. The control sit-uations ought to be planned and written in reasonable design, with completely significant expressions. This is to overcome any issues between natural human reasoning and the

FIGURE 5.2 Pipeline structure for NPLS.

Smart Home Recommendation System ◾ 73

linguistic structure and articulation of the language utilized. It should offer impressive gains in expressiveness and simplicity.

5.4.2.1 Stop Word Removal by Recommendation SystemsThe process of converting information to something that a computer can comprehend is alluded to as prepreparing. One of the significant types of prepreparing is to sift through pointless information. In natural language handling, futile words (information) are alluded to as stop words. NLPS are, as a rule, in an unstructured structure. The proposed robotized multireport summarizer is intended to preprocess the crude records; to build up an outline. Under preprocessing, the HTML/XML tags and images are expelled ini-tially. At that point, alongside that, the additional blank area, figures, conditions, and the uncommon characters like “{[(<!@#$%^&*∼’:+;>)]}?” are likewise evacuated. At long last, the sentence tokenization, stop word removal, and the stemming procedures are likewise executed.

For a lot of records, H {h ,h , h },1 2 n= … where “n” means each quantity of records. After the HTML/XML tags and images are evacuated, the sentence segmentation is performed, where every sentence is sectioned separately, = ⎢

⎣⎥⎦A A ,A ,h 1 h 2, h My y y

AL from the records. Here, Ah xy denotes xth sentence from the ( )dy

th report. Once, the sentences are fragmented, every sentence is tokenized in order to locate the particular words [ , ,K, ].1 2W w w wz= Here, ‘ ’z represents each number of unique words.

In addition, from the unique words, the stop words, for example, “an,” “a,” “the” and so on are expelled, since they have less data about the substance. At last, the stemming pro-cedure is done dependent on Porter Stemming Algorithm, where, the parts of the bargains are cut to change the words to a typical depend structure. As a conclusion of prehandling the online reports, a lot of words, [ , ,K, ]

% %1

%2

%W w w wz= are getting for each sentence of the

records.

5.4.2.1.1 Frequency of Relevant Term Frequency of relevant term is the most important highlight utilized so as to rank the sentences. Frequency of relevant term is found for each prehandled sentence that can be assessed by below-given equation (5.1).

∑∑( ) ( )=−

−⎛

⎝⎜⎜

⎠⎟⎟

= =

RT A max 1F 1

A (p) A (p)freq d xG q 1

M

k 1

z

d x d x,y

2

y

N

y y (5.1)

Here, FG represents the complete number of sentences from ‘ ’N number of records; ‘ ’z means the number of unique words [18]. In addition, A (p)d xy represents the pth unique term in xth preprocessed sentence from the ( )dy

th record and S ( )d qy p is the pth unique term in the other remaining sentences. The term frequency of a word ( )wb is characterized by the number of repetitions that term ‘ ’wb attains in the entire set of document; which can be given as in equation (5.2). The second one as inverse sentence frequency, highlight, and the opposite sentence recurrence is a proportion of how much data the world gives, that is,

74 ◾ Artificial Intelligence Techniques in IoT Sensor Networks

regardless of whether the term is typical or phenomenal in general sentences. The reverse sentence repeat feature can be formed in equation (5.3).

TF(w )n A

E1(w ) d xb y{ }

= (5.2)

AF (w ) log E1 E(w )

1b

b=

+⎛⎝⎜

⎞⎠⎟

− (5.3)

In equations (5.1) and (5.2) “E” is aggregate of occurrences of each word in every number of unique words and Ad xy indicates the prehandled sentence set. The NLPS demonstrating process “Similarity measure” can be utilized to find the proper possibility for the out-line by choosing the sentence having the most outrageous similitude with every single other sentence in the information sentence sets. In this way, the Aggregate Cross Sentence Similarity of a sentence Ad xy can be computed as,

ˆ ˆ , ˆ1

ACS S Sim S Sd xq

M

d x d qy

N

y y∑( ) ( )=−

(5.4)

Where Sd qy represents the qth sentence; also A ,S A .d x d q dy y N( ) ∈ The above highlights are removed for every one of the sentences in the record set. The positioning of sentences is done depending on the scope of feature vectors so as to make the synopsis. However “stop words” as a rule allude to the most well-known words in a language, there is no single all-inclusive rundown of stop words utilized by all-natural language handling tools, and in fact not all devices even utilize such a list.

5.4.2.2 Word Modeling ProcedureThis model offers similar information and yield of a word query table, which originates from word2vect, enabling it to effortlessly supplant then in any network. The info word is decayed into an arrangement of characters cl,c2 c ,n… where “n” is the length of word. Each character is defined as a one-hot vector 1ci, with one on the index of “c ”i in vocabulary list. This obviously is only a character lookup table, and is utilized to capture similarities between characters in a language. This capacity is mathematically characterized as:

L W * r w v w c  biasi ri t vi t 1 ci t 1 iσ ( )= + + +− − (5.5)

The proposed models utilized to register made portrayals out of sentences from words. Be that as it may, the connection between the implications of individual words and the composite meaning of an expression or sentence is seemingly more customary than the relationship of portrayals of characters and the significance of a word. Language demon-strating is an errand with numerous applications in NLPS, by and large, proposed engi-neering appears in Figure 5.3. An effective language demonstrating requires syntactic parts of language to be displayed, for example, word orderings.

Smart Home Recommendation System ◾ 75

5.4.3 Clustering Model

Possibilistic C-means (PCM) clustering algorithm cluster the two prerequisites and competitor administrations, which can viably decrease search space, and this clustering strategy to distinguish the NLPS is dependent on the stop word expulsion process. The imaginative methodology incredibly plays out the movement of simultaneously producing participations and conceivable outcomes. What’s more, the novel PCM strategy unbeliev-ably settles the clamor affectability insufficiency of the fuzzy C-means (FCM) clustering altogether overpowering the correspondent clusters challenge of the PCM and eradicates the column entirety parameters of the PCM [19]. The significant state of clustering model is shown in equation (5.6).

PCM 1

p ep e

ik

k i

k j

2m 1

c

j 1∑=

−−

⎝⎜⎜

⎠⎟⎟

−= (5.6)

e(PCM ) x

PCM1

ikm

kn

i 1

ikn

i 1∑

∑=

=

= (5.7)

This investigation work, the enrollment capacity, and centroid are employed which are adequately furnished in the condition of the NLPS model. Consider the client request PCM pcm ,pcm ,…,pcm1 2 n( )= and, create an m number of clusters CH (ch ,ch , ,ch ).1 2 m= … For clustering proposed, PCM limit the target work which is yielded (equation (5.8))

Proposed PCM(A,B,C;PCM) (aA BT ) PCM e (1 T )k 1

n

i 1

c

ikm

ikn

k i A2

i 1

c

i k 1

n

iknγ− = Σ Σ + × − + Σ Σ −

= = = = (5.8)

FIGURE 5.3 Block diagram for proposed NLPS model.

76 ◾ Artificial Intelligence Techniques in IoT Sensor Networks

Subject to the parameters 1 1M kci

ikΣ = ∀= and 0 , 1M TiK ik≤ ≤ . Here 0, 0, 1a b m> > > and 1.η > In equation (5.8), 0iγ > is the client-specified constant. The fixed    a and b defines the

relative importance of ambiguous participation and traditional qualities. From the goal function, Aik is a participation function that is derived from the FCM. The participation function Aik can be calculated as pursues. The cluster center ei of PFCM is can be calculated as follows:

eaA bt X

aA bt,1 i c.i

k 1

n

ikm

ik K

k 1

n

ikm

ik

∑∑

( )( )

=+

+≤ ≤

η

η

=

=

(5.9)

The clustering procedure has proceeded on the k-number of emphasis. After the clustering procedure, the client request is gathered into m number of clusters. From the methodol-ogy of the group-based implanting model, sentence portrayal by language displaying is removed, and scores are calculated which can diminish false positives and arrive at bet-ter. This system can be utilized as a stage for any machines that require condition-based applications with no web association. The system will be useful for typical clients likewise and physically incapacitated clients also, as it basically requires voice direction of NLPS. Substances are space explicit data separated from the expression that maps the regular lan-guage expressions to their authoritative expressions to comprehend the intent.

5.5 RESULTS AND ANALYSISOur proposed NLPS model was executed in JAVA with Netbeans programming windows machine having Intel Core i3 processor with speed 2.10 GHz and 4 GB RAM. This pro-posed model contrasted and other ordinary strategies with various estimates like preci-sion, review, and F measure. A few methodologies use either NLP or a blend of NLP and machine learning algorithms to deduce details from the normal language components, such as code remarks, depictions, and formal necessities reports.

Figures 5.4 and 5.5 show the cloud-based IoT model for NLPS framework, the login page after a particular interim by sending consequently sensor status get demand by utilizing explicit URIs. At whatever point the smart home door webserver got demand, it gets the sensor status and sends a reaction message to the customer program and furthermore the information is put away in database in the sensors. For clustering model, PCM clustered the, given to the stop word expulsion process for word installing demonstrating record for smart home correspondence through IoT sensors. If chose 30 documents of services means, the top 20 depictions of services too, top-20 rankings are misleadingly removed least in the wake of dissecting and enlarging them, which is considered as the pattern to assess the rankings of service proposal.

Tables 5.1 and 5.2 represent proposed word execution outcomes for incessant stop word evacuation and word demonstrating the implanting process. In this outcomes assessment model, genuine positives and genuine negatives are significant, it’s called a perplexity matric table, in given setting because of word sense disambiguation to the savvy home

Smart Home Recommendation System ◾ 77

correspondence. Another significant wellspring of false positives is off-base parsing of sen-tences by NLPS pipeline. Here it uses shallow parsing, where an off-base reliance pars-ing causes a mistaken development of semantic connection triple. From the experiments conducted the accuracy, exactness, review, and F-measure are 0.93%, 0.85%, 0.8522, and 0.842%, respectively. In the event that emphases fluctuate, the exhibition additionally

FIGURE 5.4 Smart home NLPS communication process in cloud.

FIGURE 5.5 Output user window for NLPS communication model.

78 ◾ Artificial Intelligence Techniques in IoT Sensor Networks

differing, for instance, our proposed model considers the word limit as 10, the exactness achieved is 0.65%, review is 0.61%, and comparably different measures.

Correlation analysis of NLPS appears in Figure 5.6; from this graphical portrayal, the objective reports are considered to the stop word evacuation and language handling in a smart home. The relationship among objective and anticipated NLPS in the smart home correspondence process is cluster-dependent on clustering technique. The link value R2, the maximum value is 0.956 and the optimum semantic subspace, while at the same time improving the similarities between the records in the nearby fixes and restricting the interaction between the archives beyond these patches. The stop words which ought to be expelled are given legitimately. Need to dispose of those stop words for finding such simili-tude between records. At that point the run time (second) appears in Figure 5.7. Even if the cycle shifts, the time additionally changes yet the proposed model gets most extreme accu-racy in NLPS model. By and large run time for our work is 989 seconds. Figuring a steady set should be possible in less than one second, with clarifications in under one minute.

TABLE 5.1 Performance Evaluation Metrics for Proposed Smart Home NLPSWords Count 8 16 24 32 40 48 56 AveragePrecision 0.92 0.89 0.86 0.93 0.78 0.92 0.89 0.8783Recall 0.99 0.86 0.86 0.97 0.89 0.86 0.79 0.8717F-measure 0.82 0.83 0.79 0.95 0.96 0.89 0.87 0.8817Accuracy 0.992 0.93 0.89 0.945 0.944 0.89 0.90 0.915

TABLE 5.2 Results for Stop words Removal: Word ModelingNumber of Clusters Precision Recall F-measure Accuracy

2 0.65 0.75 0.75 0.834 0.76 0.76 0.76 0.696 0.89 0.89 0.69 0.758 0.69 0.78 0.82 0.84

FIGURE 5.6 Correlation analysis of proposed NLPS.

Smart Home Recommendation System ◾ 79

5.5.1 Comparative Analysis of NLPS

Smart home correspondence appears in Figure 5.8. Here, three methods are utilized for comparison, that is, PCM, FCM, and K-means clustering model. The most extreme accu-racy of PCM is 0.89%, it’s contrasted with the fluffy model the thing that matters is 5.56–8.85% recall proportion of various clustering procedure for NLPS. This is a direct result of the fuzzy. The exhibition of the proposed methodology is investigated as far as F measure. Here, additionally, our proposed methodology accomplishes better outcomes. The greatest F proportion is 0.96 which is highly contrasted with different algorithms. This is a direct result of K-means clustering. The PCM beat the troubles present in the Fuzzy and proposed model. In this way, in this chapter PCM-based technique accomplishes better outcomes. From the outcome, we unmistakably comprehend our proposed strategy accomplish a superior outcome contrast with another strategy due to clustering procedure.

FIGURE 5.7 Execution time for analysis.

FIGURE 5.8 Comparative analysis with conventional techniques.

80 ◾ Artificial Intelligence Techniques in IoT Sensor Networks

5.6 CONCLUSIONDespite these promising outcomes, some energizing challenges remain, particularly so as to scale-up this model to necessities with progressively complex semantics. In this chapter, we have examined the NLPS in smart home applications or interchanges by stop word expulsion and word demonstrating strategy by PCM. Embedding as its center, our meth-odology can be effectively prepared on marked information and fundamentally outflanks traditional work. That is the reason the explained strategy gives the possibility to make regular language interfaces to complex programming. This technique enables us to create natural language interfaces for activity-based applications with help of client directions from easy to long complex guidelines. Most extreme execution estimates such as precision, review, F measure are 0.865%, 0.75%, and 0.92%, respectively.

These voices and the order prepared by natural language handling encourage clients to create a superior relationship with innovation and encourage them to make more use of it in smart home applications with IoT sensors.

REFERENCES

1. Caivano, D., Fogli, D., Lanzilotti, R., Piccinno, A. and Cassano, F., 2018. Supporting end-users to control their smart home: design implications from a literature review and an empirical investigation. Journal of Systems and Software, 144, pp. 295–313.

2. Zaidan, A.A. and Zaidan, B.B., 2018. A review of intelligent process for smart home applica-tions based on IoT: coherent taxonomy, motivation, open challenges, and recommendations. Artificial Intelligence Review, 53, pp. 141–165.

3. Rani, P.J., Bakthakumar, J., Kumaar, B.P., Kumaar, U.P. and Kumar, S., 2017. Voice con-trolled home automation system using natural language processing (NLP) and internet of things (IoT). In 2017 Third International Conference on Science Technology Engineering & Management (ICONSTEM) (pp. 368–373). IEEE.

4. Iqbal, R., Lee, J. and Hall, J., 2018. A cloud middleware enabling natural speech analysis for IoT policy enforcement in smart home environments. In 2018 IEEE International Congress on Internet of Things (ICIOT) (pp. 184–187). IEEE.

5. Guo, X., Shen, Z., Zhang, Y. and Wu, T., 2019. Review on the application of artificial intelli-gence in smart homes. Smart Cities, 2(3), pp. 402–420.

6. Fernández, M., Montalvá, J.B., Cabrera-Umpierrez, M.F. and Arredondo, M.T., 2009. Natural language interface for smart homes. In International Conference on Universal Access in Human-Computer Interaction (pp. 49–56). Springer, Berlin, Heidelberg.

7. Badlani, A. and Bhanot, S., 2011. Smart home system design based on artificial neural networks. In Proceedings of the World Congress on Engineering and Computer Science (Vol. 1, pp. 146–164).

8. Bashir, A.M., Hassan, A., Rosman, B., Duma, D. and Ahmed, M., 2018. Implementation of A neural natural language understanding component for Arabic dialogue systems. Procedia Computer Science, 142, pp. 222–229.

9. Hui, T.K., Sherratt, R.S. and Sánchez, D.D., 2017. Major requirements for building Smart homes in smart cities based on Internet of Things technologies. Future Generation Computer Systems, 76, pp. 358–369.

10. Farghaly, A. and Shaalan, K., 2009. Arabic natural language processing: challenges and solu-tions. ACM Transactions on Asian Language Information Processing (TALIP), 8(4), p. 14.

11. Moubaiddin, A., Shalbak, O., Hammo, B. and Obeid, N., 2015. Arabic dialogue system for hotel reservation based on natural language processing techniques. Computación y Sistemas, 19(1), pp. 119–134.

Smart Home Recommendation System ◾ 81

12. Mishakova, A., Portet, F., Desot, T. and Vacher, M., 2019. Learning natural language under-standing systems from unaligned labels for voice command in smart homes. In 2019 IEEE International Conference on Pervasive Computing and Communications Workshops (PerCom Workshops) (pp. 832–837). IEEE.

13. Alexakis, G., Panagiotakis, S., Fragkakis, A., Markakis, E. and Vassilakis, K., 2019. Control of smart home operations using natural language processing, voice recognition and IoT technol-ogies in a multi-tier architecture. Designs, 3(3), p. 32.

14. Noguera-Arnaldos, J.Á., Paredes-Valverde, M.A., Salas-Zárate, M.P., Rodríguez-García, M.Á., Valencia-García, R. and Ochoa, J.L., 2017. im4Things: an ontology-based natural language interface for controlling devices in the Internet of Things. In Current Trends on Knowledge-Based Systems (pp. 3–22). Springer, Cham.

15. Jivani, F.D., Malvankar, M. and Shankarmani, R., 2018. A voice controlled smart home solu-tion with a centralized management framework implemented using AI and NLP. In 2018 International Conference on Current Trends towards Converging Technologies (ICCTCT) (pp. 1–5). IEEE.

16. Qin, P. and Guo, J., 2020. A novel machine natural language mediation for semantic docu-ment exchange in smart city. Future Generation Computer Systems, 102, pp. 810–826.

17. Akerkar, R. and Joshi, M., 2008. Natural language interface using shallow parsing. IJCSA, 5(3), pp. 70–90.

18. Raulji, J.K. and Saini, J.R., 2016. Stop-word removal algorithm and its implementation for Sanskrit language. International Journal of Computer Applications, 150(2), pp. 15–17.

19. Yu, H., Fan, J. and Lan, R., 2019. Suppressed possibilistic c-means clustering algorithm. Applied Soft Computing, 80, pp. 845–872.

77

3 Analyzing Radiographs for COVID-19 Using Artificial Intelligence

Manpreet Sirswal, Ekansh Chauhan, Deepak Gupta, Ashish Khanna, and Fadi Al-Turjman

CONTENTS

3.1 Introduction .................................................................................................... 783.2 Related Work .................................................................................................. 793.3 Dataset ............................................................................................................ 793.4 Data Augmentation ......................................................................................... 813.5 Models ............................................................................................................ 81

3.5.1 VGG-16 ............................................................................................... 813.5.2 VGG-19 ............................................................................................... 823.5.3 Custom Model..................................................................................... 823.5.4 SVM .................................................................................................... 83

3.5.4.1 Grey Level Co-Occurrence Matrix ...................................... 833.5.4.2 Grey Level Size Zone Matrix ..............................................843.5.4.3 Discrete Wavelet Transform .................................................84

3.5.5 Modified CNN ....................................................................................843.5.5.1 Input Layer ...........................................................................843.5.5.2 Convolution Layer ................................................................853.5.5.3 Batch Normalization Layer ..................................................853.5.5.4 Rectified Linear Unit Layer .................................................853.5.5.5 Fully Connected layer ..........................................................853.5.5.6 SoftMax Layer .....................................................................853.5.5.7 Output ..................................................................................85

3.6 Result and Analysis ........................................................................................853.6.1 VGG-16 ...............................................................................................853.6.2 VGG-19 ...............................................................................................863.6.3 Custom Model.....................................................................................863.6.4 SVM ....................................................................................................873.6.5 Modified CNN ....................................................................................88

3.7 Activation Maps ..............................................................................................883.8 Conclusion ...................................................................................................... 91References ................................................................................................................ 91

78 AI-Powered IoT for COVID-19

3.1 INTRODUCTION

COVID-19, or the novel coronavirus, has created immense havoc across the world. The coronavirus was first introduced in the 1960s. It was known to cause infection in the respiratory tracts of children. Then it started surfacing in 2003, causing a significant number of deaths; this virus was named SARS-CoV-1. It brought zoo-notic viruses, i.e. the viruses that spread from animals to humans, into the limelight. Human isolation was enough to eradicate them and to contain their spread. Then, a virus called MERS came into existence in 2012–2013. It was also stopped from spreading just by following human isolation guidelines. Now, in December 2019, strange pneumonia cases were reported which were later identified as COVID-19 which is caused by SARS-CoV-2, also a zoonotic virus [1]. One thing that is common in all of these zoonotic viruses is that they all trigger respiratory diseases. SARS-CoV-2 is a single strand RNA virus which is very easily transmissible from humans to humans. It was declared a pandemic in March 2020 by the WHO. A lot of research is being conducted to develop drugs and a vaccine against coronavirus. No cure is available currently. Several health and social distancing guidelines are issued by the governments of countries and the WHO to curb its spread. Early diagnosis of the patients is the only way of suppressing the virus, as a lot of infected people are asymptomatic, i.e. they don’t show any symptoms of having coronavirus, which is very difficult for countries with poor healthcare systems. Conventional laboratory testing is very time consuming and expensive, and it also puts the healthcare workers at a risk of getting infected [2]. There is an urgent need for quick and reliable methods of testing and classifying patients who need immediate treatment. Machine learning (ML) and deep learning have solved many complex problems in the past, and at this time of pandemic, they can contribute by training their models on radiograph images to detect and diagnose the disease rapidly, hence making this critical task easier [3]. They can predict if the patient is in risk zone or safe zone quite accurately.

The main objective of this chapter is to form a parallel system of diagnosing by designing a neural network using machine learning and deep learning; therefore, the main focus is on using Artificial Intelligence (AI) technology to fight against COVID-19. Public data of X-rays and CT scans was taken from various sources such as GitHub, Radiopaedia, and Kaggle for the analysis. Images of X-rays are also used with CT scans for parallel analysis, because in countries with major rural populations, X-ray labs are relatively easier and cheaper to set up in comparison to CT scan labs, and the cost of X-ray scanning is less as compared to CT scanning, which makes it easily accessible to a lot of rural or poor people. So, collected data of X-ray images of healthy and COVID-19–infected patients was put into three mod-els: VGG-16, VGG-19, and custom model [4]. The analysis of this data was done with a machine learning tool called CNN. CNN models were used to classify the COVID-19 infected chest X-rays and normal chest X-rays. Activation maps were used to outline the infected area of the CT and X-ray scans. For CT scans, machine learning and deep learning was used to extract the graphical features of the several COVID-19 positive patients, thus training the model for coronavirus identification. Then, the convolutional neural network was used on the dataset of CT scan images of infected patients. All these ciphering techniques are a part of Artificial Intelligence

79AI Radiograph Analysis for COVID-19

systems. Any new piece of information is of immense value to both the humans and the Artificial Intelligence systems.

This chapter is distributed in different sections. In Section 3.2, the view and work of other researchers who have done similar work for contribution to the analysis of COVID-19 is discussed, and the dataset used and data augmentation are discussed in Section 3.3 and Section 3.4, respectively. In Section 3.5, the different methodologies implemented on the datasets for the classification of normal and COVID-19–infected patients are deliber-ated. Further, the results of all the models are compared and evaluated in Section 3.6. Finally, all of the work proposed in this chapter is concluded in the Section 3.7.

3.2 RELATED WORK

The first three cases of COVID-19 patients in France were considered in Ref. [5] by the authors. Two of them were diagnosed in Paris and one was diagnosed in Bordeaux. All of them had been living in Wuhan, China before coming to France. In Ref. [6], hybrid systems based on Artificial Intelligence were proposed by the authors. These hybrid systems used machine learning and deep learning algorithms like convoluted neural network (CNN), which was implemented to detect COVID-19 by distinguishing normal and COVID-19–infected chest X-rays.

A MERS- (Middle East respiratory syndrome) infected patient was analyzed in Ref. [7]. MERS is very closely related to the coronavirus family. The patient was 30 years old and had symptoms like diarrhea and abdominal pain. Authors gave an analysis of treatment of infected persons with chest X-ray. Further, they applied this model on a collected dataset of chest X-ray and CT images and received improved results. In Ref. [8], chest CT scans of 21 patients suffering from COVID-19 in Wuhan were analyzed. The main focus of the paper was to demonstrate the effect of the coronavirus on lungs. Finally, in Ref. [9], 50 COVID-19 positive patients were dis-tributed into two categories of good and poor recovery. Identification of risk factor of weak recovery and lung infection was done. At the end, it was concluded that 58% patients have very poor chances of recovery.

3.3 DATASET

The data was assembled from 3 different sources to form a dataset of 283 X-ray images and 309 CT scan images. The number of images collected from their respec-tive sources are portrayed in Table 3.1. The reasons of using these sources for the collection of dataset are that these sources contain images of very diverse people from different countries, which is very important for helping radiologists to diag-nose COVID-19 across the globe, and the images from all of these sources are available publicly, to the general public and other researchers. The X-ray images for COVID-19 positive patients were taken from the GitHub repository [10], how-ever, this repository contains very vast data, out of which a very small amount of data is of our use; therefore, we have selected the “finding” column = COVID-19, “view” = PA, and “modality” = X-ray. Then, using the shutil library of Python they were all combined to form an efficient dataset. This gave us 133 X-ray images of COVID-19-positive patients. For CT scans of COVID-19 patients, the two GitHub

80 AI-Powered IoT for COVID-19

repositories were used, but with the “finding” column = COVID-19, “view” = axial, and “modality” = CT, which resulted in 25 CT scans, which were taken from Societa Italiana di Radiologia Medica e Interventistica (SIRM) (Italian Society of Medical Radiology and Interventional), and 131 images of COVID-19 patients were taken from another GitHub repository [11]. Further, 150 X-ray images and 153 CT scan images of healthy people were taken from Kaggle and Radiopaedia, respectively [12, 13]. All images were resized to 224 by 224 by 3 RGB images, which is width-by-height-by-channel number. We cropped the lung and chest area, such that it does not contain any writing, as much as possible. Figure 3.1 shows the example of data that is applied to our models. Both the datasets are being updated regularly. The patient

TABLE 3.1Dataset Distribution

Mode /Source GitHub Kaggle Radiopaedia

X-ray COVID-19 133 ---- ----

Normal ---- 150 ----

CT- Scan COVID-19 25 + 131 ---- ----

Normal ---- ---- 153

FIGURE 3.1 Dataset samples a) normal X-ray b) COVID-19 X-ray c) normal CT scan d) COVID-19 CT scan.

81AI Radiograph Analysis for COVID-19

ages range from 12 to 84 years old, with genders mixed. The datasets are divided into two categories in the training phase, i.e. training set and test set.

Accuracy of the result is defined as TP TN+

Total images tested

Sensitivity is defined as TP

TP FN+.

And specificity is defined as TN

TN FP+

Where,TP = true positiveTN = true negativeFP = false positiveFN = False negative

Accuracy, sensitivity and specificity are used as performance measures in this study.

3.4 DATA AUGMENTATION

Data collected from different sources needs to be cleaned before it is given as an input. Machine learning requires a large amount of datasets to produce reli-able results, and it is possible that every problem does not have enough data, and in fact, it can be very expensive and time consuming to collect medical data. To solve these kinds of issues, data augmentation is used. According to [CNN], “Data Augmentation technique is a method that can artificially magnify the size of training dataset by formatting or resizing the image in a dataset.” The augmentation tech-niques include rotation, zooming, and sharing of images. It helps to overcome the problem of overfitting [14, 15]. Data augmentation technique is used to find the ret-rospective experiments by testing the lung CT scan and X-ray images of the patient to detect the coronavirus disease. Hence, the prepared dataset, by implementing data augmentation, is used to train the models. It also helps in establishing models and enhances outcomes by statistical learning. Data augmentation technique has been used in machine learning for a very long time, and it has been acknowledged as a crucial investigating element of several models. This technique has made massive progress in classifying and segmenting images. Thus, data augmentation enhances the accuracy of classification and prediction models. It helps in producing effective results in much less computational time.

3.5 MODELS

3.5.1 VGG-16

VGG-16 is a convolutional neural network which is specifically trained for more than a million types of images, with respect to the dataset “ImageNet” [16]. This neural

82 AI-Powered IoT for COVID-19

network is 16 layers deep and was first introduced by Simonyan and Zisserman in their study, “Very Deep Convolutional Networks for Large Scale Image Recognition,” [17] and was developed by a visual geometry group from Oxford. This model has an accuracy of 92.7% in “ImageNet.” We decided to choose this model so that we could avoid choosing other complex models, since our data is small. Figure 3.2 shows the architecture of the VGG-16 model. The size of the VGG-16 network, in terms of fully connected nodes, is 533 MB.

3.5.2 VGG-19

VGG-19 is also a convolutional neural network that is specifically trained for more than a million types of images with respect to the dataset “ImageNet.” This neural network is 19 layers deep, as compared to the 16 layers of VGG -16, and was also first introduced by Simonyan and Zisserman in their study, “Very Deep Convolutional Networks for Large Scale Image Recognition,” and was developed by the visual geometry group from Oxford. We decided to choose this model so that we could avoid choosing other complex models, since our data is small. Figure 3.3 shows the architecture of the VGG-19 model. The size of the VGG-19 network, in terms of fully connected nodes, is 574 MB.

3.5.3 CUSTOM MODEL

We have proposed a model in addition to the above models for the classification of X-ray images. This model gives almost identical performance to the above-men-tioned models. This permits us to train the model quicker and decreases the infer-ence time. Figure 3.4 depicts the architecture of our custom model.

FIGURE 3.2 VGG-16 architecture.

FIGURE 3.3 VGG-19 architecture.

83AI Radiograph Analysis for COVID-19

3.5.4 SVM

This model works in two stages; firstly, features are extracted to form feature vec-tors, using GLCM, GLSZM, and DWT. The feature vectors obtained are used for classification of coronavirus. For classification, SVM classifier is used, because it is considered a “strong binary” classifier [18]. SVM gives very high accuracy for the classification process in a lot of applications. SVM works on two main plans; the first one is to classify the data in high dimensional space using linear classifiers, and the second is to classify the data with high margin hyperplane. The value of cost param-eter (C) is 1, by default, for all the classification processes in SVM. In this SVM model, we have converted all the CT scan images into subsets of 16×16, 32×32, 48×48, and 64×64 patches. Figure 3.5 depicts the classification of this model. Then, various techniques were used to extract features from these patches. The techniques are:

• Grey Level Co-Occurrence Matrix (GLCM).• Grey Level Size Zone Matrix (GLSZM).• Discrete Wavelet Transform (DWT).

3.5.4.1 Grey Level Co-Occurrence MatrixThis method is used to acquire the second-degree statistical features on images [19]. It derives the correlation between the different angles in the pixels of the image. A co-occurrence matrix is computed from an image scan and is depicted as P = [p(i, j | d, θ)]; this means that i’th pixel frequency features are being evaluated with j’th pixel frequency features. θ represents the direction and d is the length [20]. This

FIGURE 3.4 Custom model architecture.

FIGURE 3.5 Classification process.

84 AI-Powered IoT for COVID-19

technique is used to extract “inverse difference features, maximum probability, cluster prominence, cluster shade, dissimilarity, autocorrelation, information mea-sures of correlation 2, information measures of correlation 1, difference variance, entropy, difference entropy, sum entropy, sum variance, sum average, inverse dif-ference moment, sum of squares: variance, correlation, contrast, angular secondary moment” from input images. Hence, it forms a “1×19” feature vector, which will serve as input for the classifier [21].

3.5.4.2 Grey Level Size Zone MatrixThis is an advanced version of the GLRLM extraction method [22]. This method extracts “the small zone emphasis, grey-level non-uniformity, long zone emphasis, low grey-level zone emphasis, zone percentage, size zone non-uniformity, small zone low grey-level emphasis, small zone high grey-level emphasis, large zone low grey-level emphasis, grey-level variance as well as size zone variance” features from input data. GLSZM forms a “1*13” feature vector, which will serve as input for the classifier [21].

3.5.4.3 Discrete Wavelet TransformDWT divides the images into sub bands of frequency using h low pass filter and g high pass filter. “Diagonal details, vertical details, horizontal details, approxima-tion co-efficient” represent the high frequency, vertical frequency, horizontal high frequency and lowest frequencies in both the directions respectively. LL coefficients produce the feature set and are hence converted into a “1×4” feature vector [23].

3.5.5 MODIFIED CNN

To classify COVID-19-positive CT scans and normal CT scans, a very lucid CNN model is constructed. It is made up of one convolution layer, which has 16 filters in it, along with batch normalization, rectified linear unit (ReLU), fully connected layer, SoftMax, and a classification layer. The detailed image of the architecture of our modified CNN is shown in Figure 3.6.

3.5.5.1 Input LayerThis layer is in charge of reading all the input data. It includes a pre-processing step that crops and resizes the input CT scan images; because the images are taken

FIGURE 3.6 Modified CNN architecture.

85AI Radiograph Analysis for COVID-19

from medical centers, there can be letters or symbols written on them, and since the images are taken from different sources, they can be of different sizes. The main aim of this pre-processing step is to crop the lung and chest area and to resize the images so that no text or symbol is written on the image.

3.5.5.2 Convolution LayerThis is the most important layer of our model, because it identifies the relationship between the pixels of the input image. The main aim of this layer is to extract fea-tures from the input image, which is done by learning the extracted features using various filters. This layer used 16 two-dimensional features which were made based on a 5×5 filter size. After extracting features and converting them into vectors, the filters also compute the dot product of all the features. CNN learns these features during the training phase, and all the convolved images and input images are of same size.

3.5.5.3 Batch Normalization LayerThis layer normalizes the extracted or convoluted feature values by using a very deep neural network training technique. This is mainly done to reduce the training stages, which is essential for stabilizing the training process.

3.5.5.4 Rectified Linear Unit LayerThe responsibility of the ReLU layer is to replace the negative pixel values by 0 in the convolved features. It is done in a CNN network for the features to have a non-linearity map.

3.5.5.5 Fully Connected layerThe main aim of this layer is to form defined classes of the extracted features from the input images. All the neurons of this layer are connected to activation functions of previous layer.

3.5.5.6 SoftMax LayerThis layer classifies the diagnosed cases into the two classes of “0” and “1.” It calcu-lates the possible values of activation function from previous layers.

3.5.5.7 OutputThis is the last layer of the CNN network. It labels the images of CT scans with pos-sible result values. For instance, a CT scan of a COVID-19-positive patient is labelled as “1,” and a CT scan of a non-COVID-19 patient is labelled as “0.”

3.6 RESULT AND ANALYSIS

3.6.1 VGG-16

VGG-16 is a CNN-based architecture that has 16 layers. It has “Convolutional layers, Activation layers, Max Pooling layers, and fully connected layers.”. In this model, the X-ray dataset was trained on 80% data and tested on 20% data; shuffling of data

86 AI-Powered IoT for COVID-19

was turned on. In the case of training, the result of sensitivity is 0.954, and specificity is 0.982, and in the case of testing, the result of sensitivity is 0.885, and specificity is 1.0, as shown in Table 3.2 and Figure 3.7.

3.6.2 VGG-19

VGG-19 is a variant of the VGG model that consists of 19 layers. In this model, “13 are convolutional layers where three are fully connected layer, 5 are Max Pool layers and one softmax layer.” In this model, the X-ray dataset was trained on 80% data and tested on 20% data; shuffling of data was turned on. In training, the result of sensitiv-ity is 1.0, and specificity is 0.983, and in the case of the training dataset, sensitivity is 1.0, and specificity is 1.0, as shown in Table 3.3 and Figure 3.8.

3.6.3 CUSTOM MODEL

In this custom model, a collected dataset of healthy and COVID-19 X-ray image were trained and tested. In training, the result of sensitivity is 0.96, and specificity

TABLE 3.2VGG-16 Result

Label

Training Dataset Testing Dataset

Precision Recall F1-Score Precision Recall F1-Score

COVID-19 0.98 0.95 0.96 1.0 0.85 0.92

Normal 0.95 0.98 0.97 0.88 1.0 0.94

Accuracy 0.97 0.93

FIGURE 3.7 (a) Training and validation accuracy of VGG-16 (b) Training and validation loss of VGG-16 model.

87AI Radiograph Analysis for COVID-19

is 0.93. In the case of the training dataset, sensitivity is 1.0, and specificity is 1.0, as shown in Table 3.4 and Figure 3.9.

We can see that VGG-19 has the best performance among all the discussed mod-els for the classification of X-rays.

3.6.4 SVM

Table 3.5 shows the best feature extraction method for each subset. All of the meth-ods that we used, i.e. GLCM, GLSZM, DWT, had a classification accuracy of more than 90% during 10-fold cross validation. The best classification was attained by DWT during 10-fold cross validation. The strategy of the best method is depicted in Figure 3.10.

The CT image was converted into 48×48 sized patches. DWT extracts the fea-tures of the patches and forms a feature vector. Then, 10 different SVM structures classify the vector, which were formed during the training phase. The average clas-sification performance is obtained by SVM.

TABLE 3.3VGG-19 Result

Label

Training Dataset Testing Dataset

Precision Recall F1-Score Precision Recall F1-Score

COVID-19 0.98 1.0 0.99 1.0 1.0 1.0

Normal 1.0 0.98 0.99 1.0 1.0 1.0

Accuracy 0.99 1.0

FIGURE 3.8 (a) Training and validation accuracy of the custom model (b) Training and validation loss of a VGG-19 model.

88 AI-Powered IoT for COVID-19

3.6.5 MODIFIED CNN

The modified CNN network achieved 90% sensitivity, 100% specificity, and 94.1% accuracy. This signifies that the modified, simpler CNN is performing very well in identifying the CT scans of COVID-19 patients and healthy patients.

All of our results show the efficiency of all the models that we’ve used for x-rays and CT scans in the classification of COVID-19-positive patients. This will immensely help the radiologists by reducing the load on doctors and healthcare systems.

3.7 ACTIVATION MAPS

This is a technique that is used to improve the results and accuracy of CNN-based networks, and makes them more transparent by visualizing the important regions for prediction during the classification process [24]. The equation responsible for this visualization is:

akc

ji

c

ijkZ

y

A=

¶¶åå1

global average pooling

gradients via bac

� �� ��

kkprop�

FIGURE 3.9 (a) Training and validation accuracy of the custom model (b) Training and validation loss of a custom model.

TABLE 3.4Custom Model Result

Label

Training dataset Testing dataset

Precision Recall F1-score Precision Recall F1-score

Covid-19 0.93 0.96 0.94 1.0 1.0 1.0

Normal 0.96 0.94 0.95 1.0 1.0 1.0

Accuracy 0.95 1.0

89AI Radiograph Analysis for COVID-19

TAB

LE 3

.5Fe

atur

e Ex

trac

tion

Res

ult

Subs

etFe

atur

e Ex

trac

tion

Num

ber

of

Feat

ures

Cro

ss V

alid

atio

nSe

nsit

ivit

ySp

ecifi

city

Acc

urac

yPr

ecis

ion

F-Sc

ore

1G

LC

M19

10-f

old

98.5

299

.23

98.9

199

.198

.81

2D

WT

256

10-f

old

99.1

599

.55

99.3

799

.47

99.3

1

3D

WT

576

10-f

old

99.2

310

099

.64

100

99.6

4D

WT

1024

10-f

old

93.3

910

097

.28

100

96.4

6

90 AI-Powered IoT for COVID-19

The visualization achieved is of high resolution and is also class discriminative. The areas that are helping the model to classify the COVID-19 infected images more accurately are extracted using gradient-based activation maps [25]. Figure 3.11 shows the heat maps of the important or suspected areas for the identification of COVID-19 infection. It lays emphasis on the abnormal areas by highlighting them, while ignoring the normal regions as visualized in the figure.

FIGURE 3.10 Optimum classification.

FIGURE 3.11 Activation maps a) normal X-ray b) COVID-19 X-ray c) normal CT scan d) COVID-19 CT scan.

91AI Radiograph Analysis for COVID-19

3.8 CONCLUSION

The novel coronavirus was first identified in Wuhan, and within a span of 2–3 months, it spread all over the world. Economies of the biggest countries are crash-ing, thousands of people are dying, and lockdowns are imposed all over the world. AI, as usual, is playing its part in the fight against coronavirus. Early detection is the only way by which we can stop its spread. However, early detection is more difficult in this case, because a lot of the carriers of this virus are asymptomatic. Therefore, in this study, we took the data containing X-rays and CT scans of the lungs and chest of COVID-19-positive patients and healthy patients from different sources like GitHub and Kaggle. All of this data is publicly available to the research community. We then used different CNN models, like VGG-16, VGG-19, and a custom model, to classify the COVID-19 infected X-ray images and normal X-ray images. For the classifica-tion of CT-scans, an SVM classifier, along with feature extraction, and a modified, rather simple CNN model was used. Although very high accuracy of classification was achieved by most of our models, this does not mean that these models can be used as a solution for the detection of COVID-19, mostly due to the fact that the data used in these models was very limited. More classification and segmentation studies need to be done on COVID-19. The main aim of this study was to provide radiolo-gists with potential models that can help in the early diagnosis of COVID-19 and might also help in accelerating the research in this direction.

REFERENCES

1. Rothan, H. A., and S. N. Byrareddy. (2020). The epidemiology and pathogenesis of coronavirus disease (COVID-19) outbreak. Journal of Autoimmunity, 109, 102433. doi: 10.1016/j.jaut.2020.102433.

2. Cohen, J. (2020). In bid to rapidly expand coronavirus testing, U.S. agency abruptly changes rules. Science, 80. doi: 10.1126/science.abb5231.

3. Alimadadi, A., S. Aryal, I. Manandhar, P. B. Munroe, B. Joe, and X. Cheng. (2020). Artificial intelligence and machine learning to fight covid-19. Physiological Genomics, 52(4), 200–202. doi: 10.1152/physiolgenomics.00029.2020.

4. Apostolopoulos, I. D., and T. A. Mpesiana. (2020). Covid-19: Automatic detec-tion from X-ray images utilizing transfer learning with convolutional neural net-works. Physical and Engineering Sciences in Medicine, 43(2), 635–340. doi: 10.1007/s13246-020-00865-4.

5. Stoecklin, S. B. et  al. (2020). First cases of coronavirus disease 2019 (COVID-19) in France: Surveillance, investigations and control measures, January 2020. Eurosurveillance, 25(6). doi: 10.2807/1560-7917.ES.2020.25.6.2000094.

6. Alqudah, A., S. Qazan, and A. Alqudah. (2020). Automated Systems for Detection of COVID-19 Using Chest X-ray Images and Lightweight Convolutional Neural Networks.

7. Choi, W. J., K. N. Lee, E. J. Kang, and H. Lee. (2016). Middle east respiratory syn-drome-coronavirus infection: A case report of serial computed tomographic findings in a young male patient. Korean Journal of Radiology, 17(1), 166–170. doi: 10.3348/kjr.2016.17.1.166.

8. Chung, M. et al. (2020). CT imaging features of 2019 novel coronavirus (2019-NCoV). Radiology, 295(1), 202–207. doi: 10.1148/radiol.2020200230.

92 AI-Powered IoT for COVID-19

9. Fu, S., X. Fu, Y. Song, M. Li, P. Pan, T. Tang, … Y. Ouyang. (2020). Virologic and clini-cal characteristics for prognosis of severe COVID-19: A retrospective observational study in Wuhan, China. https ://do i.org /10.1 101/2 020.0 4.03. 20051 763.

10. Cohen, J. P., P. Morrison, and L. Dao. (2020). COVID-19 image data collection. GitHub. https ://gi thub. com/i eee80 23/co vid-c hestx ray-d atase t.

11. He, X. et al. (2020). Sample-efficient deep learning for COVID-19 diagnosis based on CT scans. Medrxiv. https://github.com/UCSD-AI4H/COVID-CT.

12. Kermany, D., M. Goldbaum, W. Cai, C. Valentim, H. Liang, S. Baxter, A. McKeown, G. Yang, X. Wu, F. Yan, J. Dong, M. Prasadha, J. Pei, M. Ting, J. Zhu, C. Li, S. Hewett, J. Dong, I. Ziyar, A. Shi, R. Zhang, L. Zheng, R. Hou, W. Shi, X. Fu, Y. Duan, V. Huu, C. Wen, E. Zhang, C. Zhang, O. Li, X. Wang, M. Singer, X. Sun, J. Xu, A. Tafreshi, M. Lewis, H. Xia, and K. Zhang. (2018). Identifying medical diagnoses and treatable diseases by image-based deep learning. Cell, 172(5), 1122–1131. doi: 10.1016/j.cell.2018.02.010.

13. Normal CT scans. Radiopaedia.org. 14. Dyk, D. A. V., and X. L. Meng. (2001). The art of data augmentation. Journal of

Computational and Graphical Statistics, 10(1), 1–50. doi: 10.1198/10618600152418584. 15. Shorten, C. and T. M. Khoshgoftaar. (2019). A survey on image data augmentation for

deep learning. Journal of Big Data, 6, 60. doi: 10.1186/s40537-019-0197-0. 16. Alippi, C., S. Disabato, and M. Roveri. (2018). Moving convolutional neural networks

to embedded systems: The AlexNet and VGG-16 Case. In Proceedings of the 17th ACM/IEEE International Conference on Information Processing in Sensor Networks, IPSN 2018. doi: 10.1109/IPSN.2018.00049. AC Med

17. Fu, Sha, Xiaoyu Fu, Yang Song, Min Li, Pin-hua Pan, Tao Tang, Chunhu Zhang, Tiejian Jiang, Deming Tan, Xuegong Fan, Xinping Sha, Jingdong Ma, Yan Huang, Shaling Li, Yixiang Zheng, Zhaoxin Qian, Zeng Xiong, Lizhi Xiao, Huibao Long, and Yi Ouyang. (2020). Virologic and clinical characteristics for prognosis of severe COVID-19: A ret-rospective observational study in Wuhan, China. 10.1101/2020.04.03.20051763.

18. Kulkarni, S. R., and G. Harman. (2011). Statistical learning theory: A tutorial. Wiley Interdisciplinary Reviews: Computational Statistics, 3. doi: 10.1002/wics.179.

19. Clausi, D. A. (2002). An analysis of co-occurrence texture statistics as a function of grey level quantization. Canadian Journal of Remote Sensing, 28, 45–62. doi: 10.5589/m02-004.

20. Haralick, R. M., I. Dinstein, and K. Shanmugam. (1973). Textural features for image classification. IEEE Transactions on Systems, Man and Cybernetics, 3, 610–621. doi: 10.1109/TSMC.1973.4309314.

21. Soh, L. K., and C. Tsatsoulis. (1999). Texture analysis of SAR sea ice imagery using gray level co-occurrence matrices. IEEE Transactions on Geoscience and Remote Sensing, 37, 780–795. doi: 10.1109/36.752194.

22. Thibault, G., J. Angulo, and F. Meyer. (2014). Advanced statistical matrices for texture characterization: Application to cell classification. IEEE Transactions on Bio-medical Engineering, 61, 630–637. doi: 10.1109/TBME.2013.2284600.

23. Shensa, M. J. (1992). The discrete wavelet transform: Wedding the à trous and mal-lat algorithms. IEEE Transactions on Signal Processing, 40, 2464–2482. doi: 10.1109/78.157290.

24. Pope, P. E., S. Kolouri, M. Rostami, C. E. Martin, and H. Hoffmann. (2019). Explainability methods for graph convolutional neural networks. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition. doi: 10.1109/CVPR.2019.01103. IEEE.

25. Selvaraju, R. R., M. Cogswell, A. Das, R. Vedantam, D. Parikh, and D. Batra. (2020). Grad-CAM: Visual explanations from deep networks via gradient-based localization. International Journal of Computer Vision, 128, 336–359. doi: 10.1007/s11263-019-01228-7.