Skip to content
London, United Kingdom · Est. 1994
English

Unit 5: Neural Networks, Deployment and Responsible Practice

How neural networks and deep learning work at a conceptual level, how models are deployed, monitored and maintained in real systems, and how organisations govern machine learning responsibly.

Unit 5 of 5 · about 54 minutes

5.1 Neural networks and deep learning

Neural networks are a family of machine-learning models loosely inspired by the way neurons in the brain pass signals to one another. The comparison should not be taken too literally: artificial neural networks are mathematical functions, not models of biological brains. Networks with many layers are called deep neural networks, and the field built around them is known as deep learning. Deep learning underpins modern image recognition, speech recognition, machine translation and the large language models used in chat assistants.

Neurons, weights and layers

An artificial neuron takes several numbers as input, multiplies each by a weight, adds them up together with a constant called a bias, and passes the result through an activation function. The activation function introduces non-linearity, allowing networks to model complex relationships; a widely used example simply replaces negative values with zero.

Neurons are arranged in layers:

  • The input layer receives the features, such as the pixel values of an image.
  • One or more hidden layers transform the data step by step.
  • The output layer produces the prediction, such as a number for regression or a probability for each class.

A network may contain millions or even billions of weights. Early layers in an image network tend to detect simple patterns such as edges; later layers combine them into more complex shapes and objects. This ability to learn useful features automatically from raw data, rather than relying on hand-engineered ones, is the main strength of deep learning.

How neural networks learn

Training follows the same principle as other supervised models: minimise a loss function. For each batch of training examples, the network makes predictions, the loss is calculated, and an algorithm called backpropagation works out how much each weight contributed to the error. Gradient descent then adjusts every weight slightly to reduce the loss. Passing through the full training set once is called an epoch; training may take many epochs. Settings such as the learning rate, which controls the size of each adjustment, strongly affect results.

Because networks are so flexible, they overfit easily. Common protections include large training datasets, early stopping, regularisation and dropout, which randomly switches off some neurons during training so the network cannot rely too heavily on any one of them.

Specialised architectures

ArchitectureMain ideaTypical uses
Feed-forward networksData flows straight through fully connected layersTabular data, simple tasks
Convolutional neural networksSmall filters scan across inputs to detect local patternsImages, video, some audio
Recurrent neural networksProcess sequences step by step with a form of memoryEarlier approaches to text, speech and time series
TransformersAn attention mechanism weighs the relevance of every part of the input to every other partLanguage models, translation, increasingly images and audio

Transfer learning and foundation models

Training large networks from scratch needs vast data and computing power. Transfer learning avoids this by starting from a model already trained on a large general dataset and adapting it, or fine-tuning it, to a specific task with much less data. Very large models trained on broad data, often called foundation models, can be adapted to many tasks. Organisations increasingly build on such models, whether through fine-tuning, through prompting or by using their embeddings, rather than training their own from scratch.

Remember: Deep learning excels with large amounts of unstructured data such as images, audio and text. For typical business tables of numbers and categories, tree-based ensembles are often as good or better, and simpler to run and explain.

Limitations

Neural networks need substantial data and computing resources, can be difficult to interpret, may fail unpredictably on inputs unlike their training data and can be fooled by carefully crafted inputs. Large generative models can produce fluent but incorrect content. Their energy use and environmental impact are also increasingly considered.

In practice

If your problem involves images, audio or free text, deep learning, usually through a pre-trained model, is likely to be the right tool. Ask whether an existing model can be adapted before considering training one from scratch, and ensure evaluation uses data representative of your own situation, since pre-trained models may reflect the strengths and gaps of the data they were originally trained on.

5.2 Deploying and monitoring models

A model delivers value only when it is used in real decisions and processes. Yet many machine-learning projects never reach this stage, and many that do perform worse over time without anyone noticing. Deployment is the process of making a model available to the systems and people who need it, and monitoring is the ongoing work of checking that it still performs as intended. The discipline that brings these together is often called MLOps, applying ideas from software operations to machine learning.

Ways of serving predictions

  • Batch prediction: the model runs on a schedule, for example nightly, scoring many records at once and writing results to a database or report. This suits weekly churn lists or monthly risk rankings.
  • Real-time prediction: the model is available as a service, often through an API, returning predictions within a fraction of a second, for example to check a payment as it happens or personalise a web page.
  • On-device prediction: the model runs on a phone, camera or machine, which reduces delay and can keep data local, but limits model size.

The choice depends on how quickly predictions are needed, the volume of requests, cost and privacy requirements.

From notebook to production

Models are often developed in exploratory environments that are not suitable for live use. Moving to production typically involves packaging the full pipeline, including data preparation, so that live data is processed exactly as training data was; storing the model with a version number in a model registry; recording which data, code and settings produced each version so that results can be reproduced; testing the model and its integration like any other software; and controlling access and security.

Safe release strategies

New models can be introduced gradually to limit risk. In shadow mode, the model makes predictions alongside the existing process without affecting decisions, so its behaviour can be checked against reality. In a canary release, a small share of cases uses the new model first. A/B testing compares outcomes between groups using different models or processes, providing evidence of real business impact. A clear rollback plan allows a quick return to the previous version if problems appear.

Why models degrade

Models learn from the past, but the world changes. Two kinds of change are especially important:

  1. Data drift: the distribution of inputs changes. New customer groups appear, a product range changes or a form field is redefined.
  2. Concept drift: the relationship between inputs and outcomes changes. Fraudsters adopt new tactics, an economic shock alters customer behaviour or a policy change affects outcomes.

Problems in data pipelines are another frequent cause: a supplier changes a file format, a field starts arriving empty or units change from pounds to pence. Such issues can silently produce nonsense predictions.

Tip: Monitor the inputs as well as the outputs. Changes in input data are often visible days or weeks before a drop in accuracy can be measured, especially when true outcomes take time to become known.

What to monitor

  • Data quality: missing values, out-of-range values and unexpected categories.
  • Input distributions: comparing live data with training data to detect drift.
  • Prediction distributions: for example, a sudden rise in the share of cases flagged as high risk.
  • Performance: once true outcomes are known, the same metrics used in evaluation, overall and by group.
  • Operational health: response times, errors and costs.
  • Business outcomes: whether the model is still delivering the intended benefit.

Retraining

Models are refreshed by retraining on more recent data, either on a schedule or when monitoring detects drift. Retrained models should pass the same evaluation and approval steps as the original. Automating retraining can be efficient, but fully automatic updates without checks can let problems in new data flow straight into live decisions.

Feedback loops

Models can change the data they later learn from. If a fraud model blocks certain transactions, the organisation never learns whether they were genuinely fraudulent. If a recommendation system shows only popular items, other items never gain the clicks needed to be recommended. Recognising such feedback loops, and sometimes deliberately collecting data outside the model's choices, helps keep models accurate and fair.

In practice

Before deployment, agree who owns the model in production, what will be monitored, which thresholds trigger an alert, who responds and when the model will be reviewed. A model without a named owner and a monitoring plan should not be put into use.

5.3 Responsible machine learning and next steps

Machine-learning systems increasingly influence decisions about credit, employment, healthcare, insurance, policing, education and the information people see. With that influence comes responsibility. Responsible machine learning means designing, building, deploying and governing models so that they are effective, fair, safe, transparent and lawful, and so that people remain accountable for their use.

Core principles

Many governments, international organisations and professional bodies have published principles for trustworthy AI. The OECD AI Principles, adopted by many countries, are one widely cited example. Although wording varies, common themes include:

  • Fairness: avoiding unjustified discrimination and checking outcomes across groups.
  • Transparency and explainability: being open about when and how models are used and providing meaningful explanations.
  • Privacy and data protection: using personal data lawfully, minimally and securely.
  • Safety and robustness: ensuring systems work reliably and fail safely.
  • Accountability: making clear who is responsible for each system and its outcomes.
  • Human oversight: keeping meaningful human involvement in significant decisions.

The regulatory landscape

Regulation of AI and machine learning is developing and differs between countries. Some general patterns are clear. Existing laws, such as those on data protection, equality, consumer protection and product safety, already apply to machine-learning systems. The GDPR, for example, includes rules on transparency and on decisions based solely on automated processing that significantly affect individuals. The European Union's AI Act takes a risk-based approach, placing the strictest obligations on systems classed as high risk, such as certain uses in employment, education and access to essential services, with requirements phased in over several years. Other jurisdictions are adopting their own approaches, including sector-specific guidance. Organisations should seek appropriate advice on what applies to them.

Governance in practice

Good machine-learning governance often includes:

  1. An inventory of models in use, with owners, purposes and risk ratings.
  2. Impact assessments before building high-risk systems, considering who could be affected and how.
  3. Review and approval proportionate to risk, involving technical, business, legal and ethical perspectives.
  4. Documentation such as model cards and data sheets describing datasets.
  5. Monitoring of performance and fairness after deployment.
  6. Routes for challenge, so that people affected by decisions can query them and obtain human review.
  7. Retirement of models that are no longer accurate, needed or appropriate.

Tip: Scale governance to risk. A model that suggests which internal documents to read needs far less scrutiny than one that influences whether someone receives a loan or a job interview.

Human oversight that works

Having a person "in the loop" helps only if that person has the time, information, training and authority to disagree with the model. People tend to accept automated recommendations too readily, a tendency known as automation bias. Effective oversight gives reviewers the key reasons behind each prediction, records overrides and their reasons, and treats frequent overrides as a signal that the model may need attention.

Security and misuse

Machine-learning systems face particular security risks, including manipulation of training data, known as data poisoning; inputs crafted to fool a model; and attempts to extract sensitive training data or copy the model itself. Systems built on large language models face additional risks, such as instructions hidden in content that the model processes. Security teams should be involved early, and models should receive only the access and permissions they need.

Continuing your learning

If you want to go further, a practical path might include:

  • Strengthening foundations in statistics, probability and basic linear algebra.
  • Learning Python and widely used open-source libraries for data analysis and machine learning.
  • Working through complete projects on public datasets, from problem definition to evaluation, and writing up what you learned.
  • Practising data preparation and evaluation as seriously as modelling.
  • Reading about responsible AI and the regulation relevant to your sector.

Machine learning also needs people who are not specialists: product owners who define problems well, domain experts who understand data, and managers who ask good questions about evidence and risk.

In practice

Whatever your role, you can apply this course immediately. When a model is proposed or in use, ask: What decision does it support? What data did it learn from? How was it evaluated, and against what baseline? How does it perform for different groups? Who owns it, how is it monitored and how can people challenge its outputs? These questions are the core of responsible practice.

Case study: Detecting drift in a demand forecast at a bakery chain

Golden Crust Bakeries, a fictional chain of forty high-street bakeries, used a gradient-boosted model to forecast daily demand for each product at each shop, helping staff decide how much to bake. The model ran in batch each evening and had reduced waste noticeably in its first year.

The data team monitored input data and weekly forecast error. One spring, monitoring showed that forecast errors had risen sharply at a group of city-centre shops, while input distributions had also shifted: a new office-worker lunch range accounted for a growing share of sales, and footfall patterns had changed as several nearby employers adopted hybrid working.

The team retrained the model on recent data, adding features for day of week by location and for the new product range. They tested it in shadow mode for two weeks alongside the existing model before switching over. Shop managers were given a simple way to override forecasts and record reasons, and these notes were reviewed monthly to identify further improvements.

Activity

Choose a machine-learning system you know of or could imagine in your organisation. Write a brief monitoring and governance plan that names the owner, lists three things to monitor and states what would trigger a review. Then explain how people affected by its outputs could raise concerns or obtain human review.

Compare with a model answer

A good answer chooses a specific system, such as a model that prioritises customer complaints for response. It names an accountable owner, for example the head of customer service, supported by a named data scientist.

It lists sensible monitoring items: the share of complaints marked high priority each week; data quality, such as missing product codes; and agreement between the model's priority and handlers' final judgements, broken down by customer group. Triggers might include a change of more than an agreed amount in the high-priority share, a rise in overrides or any complaint about unfair treatment. The plan explains that customers can ask for their case to be reviewed by a person through the normal complaints route, and that handlers can override priorities with a recorded reason, reviewed monthly.

Key takeaways

  • Neural networks learn by adjusting many weights through backpropagation and gradient descent; deep learning excels with images, audio and text.
  • Transfer learning and foundation models let organisations adapt existing models rather than training from scratch.
  • Deployment requires packaged pipelines, versioning, safe release strategies and a rollback plan.
  • Models degrade through data drift, concept drift and pipeline problems, so inputs, outputs, performance and business outcomes must be monitored.
  • Responsible machine learning combines fairness, transparency, privacy, robustness, accountability and meaningful human oversight, scaled to the level of risk.

Unit check

Create a free account to answer the check, save your progress and receive your free certificate.

Create a free account Log in
← Unit 4
WhatsApp