# Artificial neural network

# Artificial neural network

**Artificial neural networks** (**ANN**) or **connectionist systems** are computing systems that are inspired by, but not identical to, biological neural networks that constitute animal brains. Such systems "learn" to perform tasks by considering examples, generally without being programmed with task-specific rules. For example, in image recognition, they might learn to identify images that contain cats by analyzing example images that have been manually labeled as "cat" or "no cat" and using the results to identify cats in other images. They do this without any prior knowledge of cats, for example, that they have fur, tails, whiskers and cat-like faces. Instead, they automatically generate identifying characteristics from the examples that they process.

An ANN is based on a collection of connected units or nodes called artificial neurons, which loosely model the neurons in a biological brain. Each connection, like the synapses in a biological brain, can transmit a signal to other neurons. An artificial neuron that receives a signal then processes it and can signal neurons connected to it.

In ANN implementations, the "signal" at a connection is a real number, and the output of each neuron is computed by some non-linear function of the sum of its inputs. The connections are called *edges*. Neurons and edges typically have a weight

The original goal of the ANN approach was to solve problems in the same way that a human brain would. However, over time, attention moved to performing specific tasks, leading to deviations from biology. ANNs have been used on a variety of tasks, including computer vision, speech recognition, machine translation, social network filtering, playing board and video games, medical diagnosis and even in activities that have traditionally been considered as reserved to humans, like painting^{[1]}

History

Warren McCulloch and Walter Pitts^{[2]} (1943) opened the subject by creating a computational model for neural networks.^{[3]} In the late 1940s, D. O. Hebb^{[4]} created a learning hypothesis based on the mechanism of neural plasticity that became known as Hebbian learning. Farley and Clark^{[5]} (1954) first used computational machines, then called "calculators", to simulate a Hebbian network. Rosenblatt^{[6]} (1958) created the perceptron.^{[7]} The first functional networks with many layers were published by Ivakhnenko and Lapa in 1965, as the Group Method of Data Handling.^{[8]}^{[9]}^{[10]} The basics of continuous backpropagation^{[8]}^{[11]}^{[12]}^{[13]} were derived in the context of control theory by Kelley^{[14]} in 1960 and by Bryson in 1961,^{[15]} using principles of dynamic programming.

In 1970, Linnainmaa published the general method for automatic differentiation (AD) of discrete connected networks of nested differentiable functions.^{[16]}^{[17]} In 1973, Dreyfus used backpropagation to adapt parameters of controllers in proportion to error gradients.^{[18]} Werbos's (1975) backpropagation algorithm enabled practical training of multi-layer networks.In 1982, he applied Linnainmaa's AD method to neural networks in the way that became widely used.^{[11]}^{[19]} Thereafter research stagnated following Minsky and Papert (1969),^{[20]} who discovered that basic perceptrons were incapable of processing the exclusive-or circuit and that computers lacked sufficient power to process useful neural networks. In 1992, max-pooling was introduced to help with least shift invariance and tolerance to deformation to aid in 3D object recognition.^{[21]}^{[22]}^{[23]} Schmidhuber adopted a multi-level hierarchy of networks (1992) pre-trained one level at a time by unsupervised learning and fine-tuned by backpropagation.^{[24]}

Hinton et al. (2006) proposed learning a high-level representation using successive layers of binary or real-valued latent variables with a restricted Boltzmann machine^{[25]} to model each layer. In 2012, Ng and Dean created a network that learned to recognize higher-level concepts, such as cats, only from watching unlabeled images.^{[26]} Unsupervised pre-training and increased computing power from GPUs and distributed computing allowed the use of larger networks, particularly in image and visual recognition problems, which became known as "deep learning".

Ciresan and colleagues (2010)^{[27]} showed that despite the vanishing gradient problem, GPUs make backpropagation feasible for many-layered feedforward neural networks.^{[28]} Between 2009 and 2012, ANNs began winning prizes in ANN contests, approaching human level performance on various tasks, initially in pattern recognition and machine learning.^{[29]}^{[29]} For example, the bi-directional and multi-dimensional long short-term memory (LSTM)^{[31]}^{[32]}^{[33]}^{[34]} of Graves et al. won three competitions in connected handwriting recognition in 2009 without any prior knowledge about the three languages to be learned.^{[33]}^{[32]}

Ciresan and colleagues built the first pattern recognizers to achieve human-competitive/superhuman performance^{[35]} on benchmarks such as traffic sign recognition (IJCNN 2012).

Models

ANNs began as an attempt to exploit the architecture of the human brain to perform tasks that conventional algorithms had had little success.

They soon reoriented towards improving empirical results, mostly abandoning attempts to remain true to their biological precursors.

Neurons are connected to each other in various patterns, to allow the output of some neurons to become the input of others.

The network forms a directed, weighted graph.^{[36]}

Components

Neurons

ANNs retained the biological concept of artificial neurons, which receive input, combine the input with their internal state (*activation*) and an optional *threshold* using an *activation function*, and produce output using an *output function*. The initial inputs are external data, such as images and documents. The ultimate outputs accomplish the task, such as recognizing an object in an image. The important characteristic of the activation function is that it provides a smooth transition as input values change, i.e. a small change in input produces a small change in output.^{[37]}

Connections and weights

The network consists of connections, each connection providing the output of one neuron as an input to another neuron.

Each connection is assigned a weight that represents its relative importance.^{[36]} A given neuron can have multiple input and output connections.^{[38]}

Propagation function

The *propagation function* computes the input to a neuron from the outputs of its predecessor neurons and their connections as a weighted sum.^{[36]} A *bias* term can be added to the result of the propagation.^{[39]}

Organization

The neurons are typically organized into multiple layers, especially in deep learning. Neurons of one layer connect only to neurons of the immediately preceding and immediately following layers. The layer that receives external data is the *input layer*. The layer that produces the ultimate result is the *output layer*. In between them are zero or more *hidden layers*. Single layer and unlayered networks are also used. Between two layers, multiple connection patterns are possible. They can be *fully connected*, with every neuron in one layer connecting to every neuron in the next layer. They can be *pooling*, where a group of neurons in one layer connect to a single neuron in the next layer, thereby reducing the number of neurons in that layer.^{[40]} Neurons with only such connections form a directed acyclic graph and are known as *feedforward networks**]]* evious layers are known as *recurrent networks**]]* ^{[42]}*

Hyperparameter

A hyperparameter is a parameter whose value is set before the learning process begins. The values of parameters are derived via learning. Examples of hyperparameters include learning rate, the number of hidden layers and batch size.^{[43]} The values of some hyperparameters can be dependent on those of other hyperparameters. For example, the size of some layers can depend on the overall number of layers.

Learning

Learning is the adaptation of the network to better handle a task by considering sample observations.

Learning involves adjusting the weights (and optional thresholds) of the network to improve the accuracy of the result.

This is done by minimizing the observed errors.

Learning is complete when examining additional observations does not usefully reduce the error rate.

Even after learning, the error rate typically does not reach 0.

If after learning, the error rates too high, the network typically must be redesigned.

Practically this is done by defining a cost function that is evaluated periodically during learning. As long as its output continues to decline, learning continues. The cost is frequently defined as a statistic whose value can only be approximated. The outputs are actually numbers, so when the error is low, the difference between the output (almost certainly a cat) and the correct answer (cat) is small. Learning attempts to reduce the total of the differences across the observations.^{[36]} Most learning models can be viewed as a straightforward application of optimization theory and statistical estimation.

Learning rate

The learning rate defines the size of the corrective steps that the model takes to adjust for errors in each observation.

A high learning rate shortens the training time, but with lower ultimate accuracy, while a lower learning rate takes longer, but with the potential for greater accuracy.

Optimizations such as Quickprop are primarily aimed at speeding up error minimization, while other improvements mainly try to increase reliability. In order to avoid oscillation inside the network such as alternating connection weights, and to improve the rate of convergence, refinements use an adaptive learning rate that increases or decreases as appropriate.^{[44]} The concept of momentum allows the balance between the gradient and the previous change to be weighted such that the weight adjustment depends to some degree on the previous change. A momentum close to 0 emphasizes the gradient, while a value close to 1 emphasizes the last change.

Cost function

While it is possible to define a cost function ad hoc, frequently the choice is determined by the functions desirable properties (such as convexity) or because it arises from the model (e.g., in a probabilistic model the model's posterior probability can be used as an inverse cost).

Backpropagation

Backpropagation is a method to adjust the connection weights to compensate for each error found during learning.

The error amount is effectively divided among the connections.

Technically, backprop calculates the gradient (the derivative) of the cost function associated with a given state with respect to the weights. The weight updates can be done via stochastic gradient descent or other methods, such as Extreme Learning Machines,^{[45]} "No-prop" networks,^{[46]} training without backtracking,^{[47]} "weightless" networks,^{[48]}^{[49]} and non-connectionist neural networks.

Learning paradigms

The three major learning paradigms are supervised learning, unsupervised learning and reinforcement learning. They each correspond to a particular learning task

Supervised learning

Supervised learning uses a set of paired inputs and desired outputs. The learning task is to produce the desired output for each input. In this case the cost function is related to eliminating incorrect deductions.^{[50]} A commonly used cost is the mean-squared error, which tries to minimize the average squared error between the network's output and the desired output. Tasks suited for supervised learning are pattern recognition (also known as classification) and regression (also known as function approximation). Supervised learning is also applicable to sequential data (e.g., for hand writing, speech and gesture recognition). This can be thought of as learning with a "teacher", in the form of a function that provides continuous feedback on the quality of solutions obtained thus far.

Unsupervised learning

Reinforcement learning

In applications such as playing video games, an actor takes a string of actions, receiving a generally unpredictable response from the environment after each one.

The goal is to win the game, i.e., generate the most positive (lowest cost) responses.

In reinforcement learning, the aim is to weight the network (devise a policy) to perform actions that minimize long-term (expected cumulative) cost. at each point in time the agent performs an action and the environment generates an observation and an instantaneous cost, according to some (usually unknown) rules. The rules and the long-term cost usually only can be estimated. At any juncture, the agent decides whether to explore new actions to uncover their costs or to exploit prior learning to proceed more quickly.

ANNs serve as the learning component in such applications.^{[51]}^{[52]} Dynamic programming coupled with ANNs (giving neurodynamic programming)^{[53]} has been applied to problems such as those involved in vehicle routing,^{[54]} video games, natural resource management^{[55]}^{[56]} and medicine^{[57]} because of ANNs ability to mitigate losses of accuracy even when reducing the discretization grid density for numerically approximating the solution of control problems. Tasks that fall within the paradigm of reinforcement learning are control problems, games and other sequential decision making tasks.

Other

In a Bayesian framework, a distribution over the set of allowed models is chosen to minimize the cost. Evolutionary methods,^{[58]} gene expression programming,^{[59]} simulated annealing,^{[60]} expectation-maximization, non-parametric methods and particle swarm optimization^{[61]} are other learning algorithms. Convergent recursion is a learning algorithm for cerebellar model articulation controller (CMAC) neural networks.^{[62]}^{[63]}

Modes

Two modes of learning are available: stochastic and batch. In stochastic learning, each input creates a weight adjustment. In batch learning weights are adjusted based on a batch of inputs, accumulating errors over the batch. Stochastic learning introduces "noise" into the process, using the local gradient calculated from one data point; this reduces the chance of the network getting stuck in local minima. However, batch learning typically yields a faster, more stable descent to a local minimum, since each update is performed in the direction of the batch's average error. A common compromise is to use "mini-batches", small batches with samples in each batch selected stochastically from the entire data set.

Types

ANNs have evolved into a broad family of techniques that have advanced the state of the art across multiple domains.

The simplest types have one or more static components, including number of units, number of layers, unit weights and topology. Dynamic types allow one or more of these to evolve via learning. The latter are much more complicated, but can shorten learning periods and produce better results. Some types allow/require learning to be "supervised" by the operator, while others operate independently. Some types operate purely in hardware, while others are purely software and run on general purpose computers.

Some of the main breakthroughs include: convolutional neural network s that have proven particularly successful in processing visual and other two-dimensional data;^{[64]}^{[65]} long short-term memory avoid the vanishing gradient problem^{[27]} and can handle signals that have a mix of low and high frequency components aiding large-vocabulary speech recognition,^{[67]}^{[68]} text-to-speech synthesis,^{[69]}^{[11]}^{[70]} and photo-real talking heads;^{[71]} competitive networks such as generative adversarial networks in which multiple networks (of varying structure) compete with each other, on tasks such as winning a game^{[72]} or on deceiving the opponent about the authenticity of an input.^{[73]}

Network design

Neural architecture search (NAS) uses machine learning to automate ANN design.

Various approaches to NAS have designed networks that compare well with hand-designed systems.

The basic search algorithm is to propose a candidate model, evaluate it against a dataset and use the results as feedback to teach the NAS network.^{[26]} Available systems include AutoML and AutoKeras.^{[75]}

Design issues include deciding the number, type and connectedness of network layers, as well as the size of each and the connection type (full, pooling,...).

Hyperparameters must also be defined as part of the design (they are not learned), governing matters such as how many neurons are in each layer, learning rate, step, stride, depth, receptive field and padding (for CNNs), etc.^{[76]}

Use

Using Artificial neural networks requires an understanding of their characteristics.

Choice of model: This depends on the data representation and the application.

Overly complex models slow learning.

Learning algorithm: Numerous trade-offs exist between learning algorithms.

Almost any algorithm will work well with the correct hyperparameters for training on a particular data set. However, selecting and tuning an algorithm for training on unseen data requires significant experimentation.

Robustness: If the model, cost function and learning algorithm are selected appropriately, the resulting ANN can become robust.

ANN capabilities fall within the following broad categories:

Function approximation, or regression analysis, including time series prediction, fitness approximation and modeling.

Classification, including pattern and sequence recognition, novelty detection and sequential decision making.

Data processing, including filtering, clustering, blind source separation and compression.

Robotics, including directing manipulators and prostheses.

Control, including computer numerical control.

Applications

Because of their ability to reproduce and model nonlinear processes, Artificial neural networks have found applications in many disciplines.

Application areas include system identification and control (vehicle control, trajectory prediction,^{[77]} process control, natural resource management), quantum chemistry,^{[78]} general game playing,^{[79]} pattern recognition (radar systems, face identification, signal classification,^{[80]} 3D reconstruction,^{[81]} object recognition and more), sequence recognition (gesture, speech, handwritten and printed text recognition), medical diagnosis, finance^{[82]} (e.g. automated trading systems), data mining, visualization, machine translation, social network filtering^{[83]} and e-mail spam filtering. ANNs have been used to diagnose cancers, including lung cancer,^{[84]} prostate cancer, colorectal cancer^{[85]} and to distinguish highly invasive cancer cell lines from less invasive lines using only cell shape information.^{[86]}^{[87]}

ANNs have been used to accelerate reliability analysis of infrastructures subject to natural disasters^{[88]}^{[89]} and to predict foundation settlements.^{[90]} ANNs also been used for building black-box models in geoscience: hydrology,^{[91]}^{[92]} ocean modelling and coastal engineering,^{[93]}^{[94]} and geomorphology.^{[95]} ANns have been employed in cybersecurity, with the objective to discriminate between legitimate activities and malicious ones. For example, machine learning has been used for classifying Android malware,^{[96]} for identifying domains belonging to threat actors^{[97]} and for detecting URLs posing a security risk.^{[98]} Research is underway on ANN systems designed for penetration testing,^{[99]} for detecting botnets,^{[100]} credit cards frauds^{[101]} and network intrusions.

ANNs have been proposed as a tool to simulate the properties of many-body open quantum systems.^{[102]}^{[103]}^{[104]}^{[105]} In brain research ANNs have studied short-term behavior of individual neurons,^{[106]} the dynamics of neural circuitry arise from interactions between individual neurons and how behavior can arise from abstract neural modules that represent complete subsystems. Studies considered long-and short-term plasticity of neural systems and their relation to learning and memory from the individual neuron to the system level.

Theoretical properties

Computational power

The multilayer perceptron is a universal function approximator, as proven by the universal approximation theorem. However, the proof is not constructive regarding the number of neurons required, the network topology, the weights and the learning parameters.

A specific recurrent architecture with rational-valued weights (as opposed to full precision real number-valued weights) has the power of a universal Turing machine,^{[107]} using a finite number of neurons and standard linear connections. Further, the use of irrational values for weights results in a machine with super-Turing power.^{[108]}

Capacity

A model's "capacity" property roughly corresponds to its ability to model any given function.

It is related to the amount of information that can be stored in the network and to the notion of complexity.

Convergence

Models may not consistently converge on a single solution, firstly because local minima may exist, depending on the cost function and the model.

Secondly, the optimization method used might not guarantee to converge when it begins far from any local minimum.

Thirdly, for sufficiently large data or parameters, some methods become impractical.

Generalization and statistics

Applications whose goal is to create a system that generalizes well to unseen examples, face the possibility of over-training.

This arises in convoluted or over-specified systems when the network capacity significantly exceeds the needed free parameters.

Two approaches address over-training.

The first is to use cross-validation and similar techniques to check for the presence of over-training and to select hyperparameters to minimize the generalization error.

The second is to use some form of regularization

Supervised neural networks that use a mean squared error (MSE) cost function can use formal statistical methods to determine the confidence of the trained model. The MSE on a validation set can be used as an estimate for variance. This value can then be used to calculate the confidence interval of network output, assuming a normal distribution. A confidence analysis made this way is statistically valid as long as the output probability distribution stays the same and the network is not modified.

By assigning a softmax activation function, a generalization of the logistic function, on the output layer of the neural network (or a softmax component in a component-based network) for categorical target variables, the outputs can be interpreted as posterior probabilities. This is useful in classification as it gives a certainty measure on classifications.

The softmax activation function is:

Criticism

Training

A common criticism of neural networks, particularly in robotics, is that they require too much training for real-world operation.

Potential solutions include randomly shuffling training examples, by using a numerical optimization algorithm that does not take too large steps when changing the network connections following an example, grouping examples in so-called mini-batches and/or introducing a recursive least squares algorithm for CMAC.^{[62]}

Theory

A fundamental objection is that ANNs do not sufficiently reflect neuronal function.

Backpropagation is a critical step, although no such mechanism exists in biological neural networks.^{[109]} How information is coded by real neurons is not known.

Sensor neurons fire action potentials more frequently with sensor activation and muscle cells pull more strongly when their associated motor neurons receive action potentials more frequently.^{[110]} Other than the case of relaying information from a sensor neuron to a motor neuron, almost nothing of the principles of how information is handled by biological neural networks is known.

A central claim of ANNs is that they embody new and powerful general principles for processing information.

Unfortunately, these principles are ill-defined.

It is often claimed that they are emergent from the network itself. This allows simple statistical association (the basic function of artificial neural networks) to be described as learning or recognition. Alexander Dewdney commented that, as a result, artificial neural networks have a "something-for-nothing quality, one that imparts a peculiar aura of laziness and a distinct lack of curiosity about just how good these computing systems are. No human hand (or mind) intervenes; solutions are found as if by magic; and no one, it seems, has learned anything".^{[111]} One response to Dewdney is that neural networks handle many complex and diverse tasks, ranging from autonomously flying aircraft^{[112]} to detecting credit card fraud to mastering the game of Go.

Technology writer Roger Bridgman commented:

Neural networks, for instance, are in the dock not only because they have been hyped to high heaven, (what hasn't?) but also because you could create a successful net without understanding how it worked: the bunch of numbers that captures its behaviour would in all probability be "an opaque, unreadable table...valueless as a scientific resource".

In spite of his emphatic declaration that science is not technology, Dewdney seems here to pillory neural nets as bad science when most of those devising them are just trying to be good engineers.

An unreadable table that a useful machine could read would still be well worth having.

^{[113]}

Biological brains use both shallow and deep circuits as reported by brain anatomy,^{[114]} displaying a wide variety of invariance.

Weng^{[115]} argued that the brain self-wires largely according to signal statistics and therefore, a serial cascade cannot catch all major statistical dependencies.

Hardware

Large and effective neural networks require considerable computing resources.^{[116]} While the brain has hardware tailored to the task of processing signals through a graph of neurons, simulating even a simplified neuron on von Neumann architecture may consume vast amounts of memory and storage. Furthermore, the designer often needs to transmit signals through many of these connections and their associated neurons – which require enormous CPU power and time.

Schmidhuber noted that the resurgence of neural networks in the twenty-first century is largely attributable to advances in hardware: from 1991 to 2015, computing power, especially as delivered by GPGPUs (on GPUs), has increased around a million-fold, making the standard backpropagation algorithm feasible for training networks that are several layers deeper than before.^{[8]} The use of accelerators such as FPGAs and GPUs can reduce training times from months to days.^{[118]}^{[116]}

Neuromorphic engineering addresses the hardware difficulty directly, by constructing non-von-Neumann chips to directly implement neural networks in circuitry. Another type of chip optimized for neural network processing is called a Tensor Processing Unit, or TPU.^{[119]}

Practical counterexamples

Analyzing what has been learned by an ANN, is much easier than to analyze what has been learned by a biological neural network.

Furthermore, researchers involved in exploring learning algorithms for neural networks are gradually uncovering general principles that allow a learning machine to be successful.

For example, local vs non-local learning and shallow vs deep architecture.^{[120]}

Hybrid approaches

Advocates of hybrid models (combining neural networks and symbolic approaches), claim that such a mixture can better capture the mechanisms of the human mind.^{[121]}^{[122]}

## References

*Bulletin of Mathematical Biophysics*.

**5**(4): 115–133. doi:10.1007/BF02478259.

*Annals of Mathematics Studies*(34). Princeton University Press. pp. 3–41. Retrieved 17 June 2017.

*The Organization of Behavior*. New York: Wiley. ISBN 978-1-135-63190-1.

*IRE Transactions on Information Theory*.

**4**(4): 76–84. doi:10.1109/TIT.1954.1057468.

*Psychological Review*.

**65**(6): 386–408. CiteSeerX 10.1.1.588.3775. doi:10.1037/h0042519. PMID 13602029.

*Beyond Regression: New Tools for Prediction and Analysis in the Behavioral Sciences*.

*Neural Networks*.

**61**: 85–117. arXiv:1404.7828. doi:10.1016/j.neunet.2014.09.003. PMID 25462637.

*Cybernetic Predicting Devices*. CCM Information Corporation.

*Cybernetics and forecasting techniques*. American Elsevier Pub. Co.

*Scholarpedia*.

**10**(11): 32832. Bibcode:2015SchpJ..1032832S. doi:10.4249/scholarpedia.32832.

*Journal of Guidance, Control, and Dynamics*.

**13**(5): 926–928. Bibcode:1990JGCD...13..926D. doi:10.2514/3.25422. ISSN 0731-5090.

*Proceedings of the IEEE-INNS-ENNS International Joint Conference on Neural Networks. IJCNN 2000. Neural Computing: New Challenges and Perspectives for the New Millennium*. IEEE. doi:10.1109/ijcnn.2000.857892. ISBN 0769506194.|authorlink2=Stuart Dreyfus]]

*ARS Journal*.

**30**(10): 947–954. doi:10.2514/8.5282.

*Proceedings of the Harvard Univ. Symposium on digital computers and their applications*. April 1961.

*BIT Numerical Mathematics*.

**16**(2): 146–160. doi:10.1007/bf01931367.

*IEEE Transactions on Automatic Control*.

**18**(4): 383–385. doi:10.1109/tac.1973.1100330.

*System modeling and optimization*. Springer. pp. 762–770.

*Perceptrons: An Introduction to Computational Geometry*. MIT Press. ISBN 978-0-262-63022-1.