How to Build a Neural Network & Do You Actually Need One? by Andrei Klubnikin

Although modern AI algorithms are pretty good at identifying data patterns, we’re still a few years away from losing our jobs to robots and smart voice assistants. Unless you possess unlimited financial resources and tech expertise, building neural networks as a primary business might not be a good idea. However, there are certain types of apps where AI (if used correctly!) can be a real game-changer.

Building a neural network: how do AI algorithms work?

While the goals of general Artificial Intelligence are limited to understanding how certain things – for example, languages, – function, Artificial Neural Networks (ANNs) are task-oriented.

Our brain is made up of billions of biological neural networks. Neurons receive data (input) and transmit electrical signals further to other neurons, glands and muscles. The strength and range of these signals (or weight, as developers call it) may vary. From an early age, these networks help us tell the difference between hot and cold, identify and understand languages and make better decisions based on our past experiences.

As of now, modern AI algorithms can’t mimic the human brain, period.

How come IBM Watson is already 40% better at diagnosing cancer than human doctors?

In order to understand how neural networks work, consider the example of a simple employee bonus plan system developed by Pavel Vaskou, Head of iOS Development Unit at R-Style Lab. The system described below is just a prototype of the application we actually employ; however, it will give you a basic understanding of AAN mechanism.


Since we use Redmine to track the actual time spent on projects, assign new tasks to employees and monitor employee attendance, we can use the data as input. 

  • Our neural network takes several binary inputs (1 and 0 meaning “yes” or “no”, respectively) denoting employee attendance, overtime, task statuses and complexity. For variable data, there’s a threshold which enables the network to evaluate an employee’s performance and assign values to it;
  • The data is then sent to the neurons which represent the hidden layer. Here’s where the input numbers are multiplied by the weight of each signal and summed up. If an employee worked regular hours (160 man-hours per month), but handled bug fix tasks mostly, he’s not entitled to the bonus. His colleague who worked overtime but also spent some time idling will probably be taken off the bonus list, too;
  • The network’s final output is thus determined by several factors. Some of these criteria (like overtime or idle time) overweigh other parameters. The more data you feed to a neural network, the smarter it gets.

Of course, this is the simplest example of an AI algorithm. More complex offerings like IP camera-based Smart Parking solutions use multiple hidden neuron layers to analyze camera output (thousands of images!) and notify dispatchers whether a parking spot is occupied, vacant or taken up by a two-space parker.

How to design a neural network: choosing the right tech stack

Neural networks can be written in different programming languages including Python, C++, C and Java. Provided you address a skilled software developer, it does not really matter what language you’ll choose; building a high-performance neural network is all about having “fast code” or “writing code fast”.

  • Python offers multiple libraries including PyBrain (machine learning), SciPy (scientific computing) and NumPy (supports integration with a variety of databases and C/C++ code) to streamline your AI project. According to Pavel Vaskou, Python is one of the most popular programming languages in AI development;
  • Java enables developers to write clear code with scalability in mind and offers a plethora of useful libraries;
  • C++ is an excellent choice for time-sensitive AI projects. The language is widely used in embedded systems and game development. For example, neural networks which allow game engines to evaluate the aftermaths of floods and earthquakes in city-building gamesare primarily created with C++.

Although there are lots of video tutorials and articles teaching amateur programmers how to design a simple neural network, you shouldn’t try to build one yourself – at least if you want to use AI for business purposes.

AI application development is innovative by default. It is carried out by senior software engineers, architects and QA specialists – simply because junior developers do not have the required expertise to train neural networks to a level where 100% accuracy is possible. Considering the fact that AI is now implemented in policy underwriting and fraud prevention, you can’t be too serious about neural network reliability.


3 reasons to consider building a software solution powered by neural networks

  • You want to succeed in the competitive Home Automation market. Although the global Smart Home market will be worth $ 53 billion in five years, the intelligence displayed by most Connected House solutions is limited to pairing gadgets to dedicated mobile apps. If you create a Home Automation system that implements the face recognition technology to identify a house owner’s face and adjusts its settings accordingly, you’re doomed to commercial success;
  • You want to create a face swap app. Picture morphing software took the world by storm last year. Some experts identify the new tech as Augmented Reality; others compare it to Instagram filters. Either way, there’s more to face swap apps than Snapchat lenses. The team, for example, has recently worked on Glamozis – a stylish iOS app designed for a well-known plastic surgeon. The app processes pictures and uses neural networks to enhance certain parts of a face or perform the overall correction showing users what they will look like after a plastic surgery. Glamozis is due for release this August;
  • You have an idea for a killer chatbot. When Facebook, Kik and Telegram launched their chatbot development platforms last year, IT bloggers were quick to pronounce the inevitable death of mobile applications. In 2017, Facebook had to slow down the bot invasion after two experimental algorithms, Bob and Alice, had invented their own language. Today’s bots’ natural language processing capabilities are limited to answering simple questions and navigating customers through online catalogues and shopping malls. If you address an experienced vendor who knows how to build a complex neural network and put it to work, your bot can develop a personality and perfectly handle off-topic questions.

Although neural networks are still in their infancy, the technology will have an enormous impact on banking, healthcare, retail, manufacturing and entertainment (and may finally propel IoT adoption in business). Companies that embark on AI projects today gain a competitive advantage over their rivals; you won’t miss the opportunity, will you?


This article is reposted from here as part of the partnership between R-Style Lab and the Business Transformation Network.


Andrei Klubnikin is Senior Content Manager at R-Style Lab – a custom software development company (IoT, Web, Mobile) with a sales office in San Francisco, CA and dev centre in Belarus, Europe.

Andrei has been a tech blogger since 2011. R-Style Lab is a team of IoT, mobile, web, VR & game developers, experts and geeks. They offer full-cycle software development services since 2006 and want to share their expertise with you!