Free tech learning for everyone, from basics to pro

Edge ComputingEmerging Technologies and SecurityIntermediate

AI at the edge: running models on local devices

In short: Edge AI means running trained models on devices or local servers close to where data is created. It gives fast answers, works when the link is down and keeps raw data on site. The price is limited compute, many devices to manage and models that can be stolen or tampered with if not protected.

What edge AI means

Most machine learning projects have two phases. Training builds the model from large datasets and needs a lot of compute, so it normally happens in a data centre or cloud. Inference uses the trained model to make a decision on new data, such as "is there a person in this frame?". Edge AI moves inference, and sometimes light retraining, onto devices close to the data: smart cameras, industrial gateways, phones, vehicles or small servers in a branch.

A warehouse camera that counts pallets is a simple example. Sending every video frame to the cloud uses a lot of bandwidth and adds delay. Running a small object-detection model on the camera means only the count and a few flagged images travel over the network.

Cloud AI versus edge AICloud inferenceLarge modelsEasy to updateNeeds connectivityData leaves siteEdge inferenceFast local answersWorks offlineLimited computeMany devices to patch
Figure 1. Running AI models at the edge trades raw compute for speed, privacy and independence from the network.

Making models fit small hardware

Edge devices have limited memory, power and cooling. Several techniques help a model fit:

  • Quantisation stores weights with fewer bits, for example 8-bit integers instead of 32-bit floating point. Models get smaller and faster with a small loss of accuracy.
  • Pruning removes connections that contribute little to the result.
  • Distillation trains a small "student" model to copy a larger "teacher" model.
  • Accelerators such as neural processing units (NPUs), graphics processing units (GPUs) and dedicated vision chips run inference efficiently. Many recent laptops and phones include an NPU.

At the very small end, TinyML runs simple models on microcontrollers using milliwatts of power, for jobs such as keyword spotting or vibration analysis on a motor.

Getting a model onto edge devicesTrainin cloud or DCOptimisequantise,pruneSignprotectintegrityDeploystaged rolloutMonitoraccuracy,drift
Figure 2. Models are usually trained centrally, shrunk for edge hardware, signed, rolled out gradually and then monitored.

Federated learning and privacy

Federated learning trains a shared model without collecting the raw data centrally. Each device improves the model on its own data and sends only the update. A server combines the updates into a new global model. This helps privacy, for example with keyboard prediction or hospital data, but it is not a complete guarantee. Updates can still leak information, and a malicious participant can send poisoned updates, so techniques such as secure aggregation and update validation are used alongside it.

Securing edge AI

RiskExampleControl
Model theftSomeone copies the model file from a stolen deviceEncrypted storage, secure enclaves where available, licence checks
Model tamperingA swapped model ignores certain objectsSigned models, verified at load time with secure boot
Adversarial inputA printed pattern confuses a camera modelRobust testing, multiple sensors, human review of key decisions
Data exposureStored frames contain facesProcess in memory, minimise retention, follow privacy law
Stale modelsAccuracy drops as conditions changeMonitoring, staged updates and rollback

Treat a model as software: version it, sign it, test it and patch it through the same pipeline as firmware. See adversarial machine learning for more on attacks against models.

Tip: a common mistake is assuming "on-device" means "private". Check what the device logs, what it uploads for retraining and who can access it remotely.

Practice

What is the difference between training and inference?
Training builds a model from large datasets; inference uses the trained model to make decisions on new data. Edge AI mostly runs inference.
Name two ways to make a model small enough for an edge device.
Any two of quantisation, pruning and distillation, often combined with a hardware accelerator such as an NPU.
Why does federated learning not fully guarantee privacy?
Model updates can still leak information about local data, and malicious participants can poison the shared model, so extra protections are needed.

Key takeaways

  • Edge AI runs inference close to the data for speed, offline operation and privacy.
  • Quantisation, pruning and distillation shrink models for small hardware.
  • Federated learning shares model updates instead of raw data, but still needs safeguards.
  • Sign, version and monitor edge models like any other firmware.
  • Protect stored data and models on devices that may be stolen or tampered with.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.