Artificial Intellect at the Service of a Mushroomer

One might wonder: ‘What do mushrooms have to do with artificial intellect? How can high technologies influence one of the time-honored hobbies - picking mushrooms? The answer can be very simple, or complicated. We’ll put it in a way that's easy for everyone to understand because the subject is both important and useful.

Six years ago we created A Great Encyclopedia of Fungi, which since then has been used by thousands of mushroomers across the world. At the beginning of this year we started to introduce a revolutionary function to our mushroom app -  identifying mushrooms with maximum accuracy by using a picture taken by an iPhone or iPad. For nearly the entire six years since we published our Encyclopedia, many mushroom enthusiasts have been asking us to give them such an opportunity. Four months since we completed this work feeling proud for the accomplishment, and are now happy to realize that it has been appreciated by many of our users. Our task was clear and straightforward, i.e. to help people, to make it easier for them to make a decision.

Not long ago we came across an article in The Verge that has to do with another mushroom-related app. Its loud title reads A ‘Potentially Deadly’ Mushroom-Identifying App Highlights the Danger of Bad AI. The mushroom expert, Doctor of Microbiology Colin Davidson, harshly criticizes an app offering a method of identifying mushrooms by a picture and describes this app as potentially the most deadly since the beginning of ‘the mobile  revolution.’ Dr. Davidson stresses that identifying a mushroom only by a picture to decide whether it is edible or dangerous for health  can create a real threat to life and cannot serve as a sufficient basis for a decision. He writes: “The most common mushroom near me is something called the yellow stainer,” he told The Verge, “and it looks just like an edible horse mushroom from above and the side.” But if you eat a yellow stainer there’s a chance you’ll be violently ill or even hospitalized. “You need to pick it up and scratch it or smell it to actually tell what it is.”

Obviously, such an expert opinion hits on the rebound our mushroom app too. Therefore, we’d like to clarify the situation for our existing and potential users. But, first, here is a little bit of theory.

The first and most developed method of using AI to date is the image identification, also known as ‘computer vision.’

The article’s title mentions artificial intellect (AI). It’s AI that a huge number of IT works is based upon. Our app is not an exception.

AI is a certain set of special mathematical and computational algorithms which are implemented and operating in the computer. Such ‘intellectual systems’ perform functions which were traditionally regarded as a prerogative of humans. A computer, thanks to its specialization, can evaluate and analyze a data array and make a certain independent decision by a method similar to the human way of thinking. To make it possible the computer is taught and trained in a special way.  The first and most developed method of using AI to date is the image identification, also known as ‘computer vision.’ How does it work? The system is shown a random image, AI processes it and delivers requested information. For instance, it is able to recognize what object or person is depicted. Even now most contemporary apps or services that work with pictures know how to classify the images according to the content (sea, forest, a street in an old town, and the like), and how to identify who of your friends or relatives is in the picture. Needless to say, this ability of AI can apply to other spheres of life - it can recognize road signs, identify and reject substandard products, etc. Or, as is our case, identify mushrooms.

The ability to identify images is based on a neural network, which is, in fact, a brain’s mathematical analogue simulating the work of billions of neurons. But there is a significant difference between them. The natural intellect (i.e. a human) is capable of solving universal tasks. Not only can it quickly identify what it sees but it's also able to make a decision as to how to react to what it sees: eat it, throw it out, run away, etc. While the artificial intellect (a machine) is specialized, meaning its task is strictly limited to the exact task. If it is trained to identify only faces, then all trees, buildings and other objects will be unidentifiable to it. This specialization allows AI to surpass the human brain (at least, the brain of an average person) in implementing certain tasks. For example, it will take AI by far less time to classify tens of thousands of pictures than it would take a human to just look through them. Or it will take AI just seconds to go through a mass of patients’ detailed test reports to identify their potential diseases, while a doctor will have to spend a lot of time and make exhaustive efforts to do this.

To impart a neural network with this specialized effectiveness, we must teach it specific skills, just like we teach a child to count or put together a puzzle. The process is as follows. The untrained (empty) neural network is ‘shown’ input data, which allows the network to make a guess, for example, whether it is a mushroom or not. After that the ‘teacher’ gives the network a correct answer, and, in response, the network slightly ‘changes’ inside itself. Then the lesson is repeated using some new material. At the beginning of the process the neural network makes predictable mistakes since it has not acquired any knowledge as yet. But after an adequate number of lessons its answers become increasingly more meaningful and correct. All depends on the complexity of the task. It may take tens of millions of such lessons to teach the network a certain task, but, then, you can use it to carry out applied tasks with a high level of correct answers.

Needless to say, the above is just a simplified description of creating and training neural networks. A truly ‘good’ AI requires many other important components, like the network configuration, control of retraining risks. All of these, including the number of ‘lessons’, and the quality of ‘teaching materials’ can have a critical impact on the result. That’s why any two neural networks (like two different people) trained to solve one and the same task will behave in an absolutely different way. One can be unpredictable and dangerous, the other will be precise but cautious in its evaluations.

The neural network does not make decisions for people but helps them to sort out details and make the correct choice

Now back to our ‘mushroom’ app. It is based on a specially trained neural network, which must determine which mushroom is depicted in the picture. The network is taught using a large selection of pictures, each showing a mushroom well-known in advance. For our app we have used an immense selection of data acquired from competent profile sources. It is an average of 1,200 (at least, 1,000) pictures of mushrooms of the same species for each of the species featured in our Encyclopedia. As for poisonous mushrooms, we used a still larger number of their images to enhance the precision of identifying the dangerous species. But we did not confine ourselves to the teaching selection, which is impressive in itself. We carefully configure the network itself taking into consideration the specific task of identifying mushrooms, not berries, or flowers, or anything else. Special attention was paid to the tiny details detected on the mushrooms’ surfaces, because two mushrooms that look very much alike can differ in some minute details in the texture of their stipes or caps.

Nevertheless, despite the high precision of the obtained results we shall neither claim nor guarantee that we have created a 100-percent ‘identification’. No one can do it  without special facilities. Our ‘neural search’ offers a list featuring mushroom versions that look most like the picture taken by a gadget and giving an evaluation of the precision of the guess. Each found mushroom version is accompanied  by a description from our Encyclopedia, examples of pictures, and links to other similar species. All this means is that our user receives comprehensive information about the mushroom in order to make an independent decision - to pick or not to pick. Let’s emphasize it: the neural network does not make decisions for people but helps them to sort out details and make the correct choice.

So why the app mentioned by The Verge was so bitterly criticized? The fact is that its developers declared a 100-percent precision of mushroom identification. But this is impossible even theoretically! Even professional mycologists make mistakes, let alone a machine. By the way, following this ruthless criticism, the app was no longer described as offering the identification of ‘all mushrooms’ but only of ‘home mushrooms', and later the identification was limited to ‘only truffles.’ This prompts a conclusion that the app used a very limited teaching selection. Besides, the app offered neither the list of mushroom versions nor any description of each of them. Needless to say, such an offer of choice could be potentially dangerous to a user, who could either blindly trust the app, or close it and forget all about it. By the way, the app has now been dismissed from AppStore. Probably its developers have realized that their position was not duly substantiated, or, else, they have taken into consideration the experts’ recommendations.

Describing two approaches to developing/ creating apps we want to show you that AI in one and the same field can, indeed, be both ‘good’ and ‘bad.’ It will be ‘bad’ if its developers ignore the important components of training and fail to make enough efforts to ‘educate’ their AI. If your priority is serving the interests of users and protecting them from potential risks, if you consider every aspect of the network’s comprehensive training, then AI will do you justice. Fortunately, so far it all depends on humans, their intellect, aims, knowledge, and commitment to the task at hand.

We hope that people who enjoy picking mushrooms and bring their gadgets to the mushroom hunt, will use our app and appreciate the opportunities it offers.

AppStore link: "Mushrooms: Great Encyclopedia of Fungi"