XenonStack Glossary: AI, Data and Cloud Terms Explained

Deep Neural Networks: Layers, Training and Uses

Written by Dr. Jagreet Kaur | 08 Feb 2023

A deep neural network is a machine learning model made of many stacked layers of simple neurons, where each hidden layer learns features that the next layer builds on. It learns weights from data by comparing its predictions with known answers and adjusting itself to reduce the error.

This page is for technical and business leaders who need a clear definition. It covers how deep networks work, how they differ from shallow ones, where they are used and how they relate to AI agents.

What is a deep neural network?

The IBM overview of neural networks describes a neural network as a machine learning model that stacks simple neurons in layers, learning weights and biases from data to map inputs to outputs. A deep network has several such layers between the input and the output. Those in-between layers are called hidden layers.

There is no agreed minimum number of hidden layers. The page above does not set a layer count for "deep", and the older rule of thumb of more than five hidden layers is a convention, not a standard. What matters is that depth lets the model build complex features out of simpler ones.

How do deep neural networks work?

The Deep Learning book chapter on deep feedforward networks explains that most such networks are built by composing many functions in a chain. Each function is a layer, and the length of the chain gives the depth of the model. In a feedforward network information flows one way, from input to output, with no feedback loop. The training data does not say what each hidden layer should do, so the learning algorithm decides how to use them.

Training repeats three steps: a forward pass produces a prediction, a loss measures the error, and a backward pass adjusts the weights to reduce that error. Our glossary entry on the back-propagation algorithm covers the backward pass in detail.

How is a deep neural network different from a shallow one?

FeatureShallow networkDeep neural network
Hidden layersNone or oneSeveral
FeaturesOften designed by handLearned layer by layer from data
Typical dataSmall, structured tablesImages, text, audio and large tabular sets
Training costLowHigher, needs more data and compute
ExplainabilityEasier to inspectHarder to explain, so testing and monitoring matter

The Deep Learning book chapter notes that deeper models can often generalise better with fewer units per layer, though they can be harder to optimise. Depth is a trade-off, not an automatic gain.

Where are deep neural networks used?

Deep neural networks are a form of machine learning used for tasks where patterns are too complex to write as rules. Common families include convolutional networks for images, recurrent networks and transformers for sequences and language, and plain feedforward networks for tabular prediction. Typical uses include credit risk scoring, vision systems, speech recognition and language models.

How do deep neural networks relate to AI agents?

Many AI agents use a deep neural network, usually a large language model, to read a request and choose an action. The network supplies the judgement, but the agent still needs tools, memory, permissions and a record of what it did. ElixirClaw is XenonStack's AI agents computing platform for building and running agents that call models of this kind.

What should you do first?

  1. Define the prediction or decision the network must support, and how you will measure it.
  2. Start with a simpler baseline model and keep it as the comparison.
  3. Add depth only when the baseline underperforms on held-out data.
  4. Track training and validation error together to spot overfitting early.
  5. Log inputs, outputs and versions so a decision can be reviewed later.

To map one decision your agents make using a deep neural network, and the data and policy it depends on, book a Context Workshop. See what happens in the workshop.

Frequently asked questions

How many layers make a neural network deep?

There is no fixed number. A common rule of thumb is more than a few hidden layers, but the defining idea is that the model stacks many layers so that later layers build on features learned by earlier ones.

What is the difference between deep learning and a deep neural network?

Deep learning is the field of training models with many layers. A deep neural network is the model itself.

Why do deep neural networks need so much data?

They have many parameters to learn, and the training data does not tell the hidden layers what to do. More examples help the model learn useful features and reduce overfitting.

How are deep neural networks trained?

A forward pass makes a prediction, a loss function measures the error, and back-propagation computes how each weight contributed so an optimiser such as gradient descent can update it.

Are deep neural networks the same as AI agents?

No. A deep neural network is a model. An AI agent wraps a model with tools, memory and rules so that it can take actions.