Confidential · Professional · Structured · Research & publication support worldwide
TinyML • Edge AI • Embedded Machine Learning

TinyML and Edge AI: Deploying Deep Learning on Microcontrollers, A Practical Thesis Guide

A practical guide to TinyML and Edge AI research: understanding microcontroller constraints, choosing tasks and datasets, model compression, fair baselines, on-device measurement and research questions.

Most deep learning research assumes a GPU or a cloud server. A growing area of research asks the opposite question: can a useful model run directly on a tiny, battery-powered device such as a microcontroller with a few hundred kilobytes of memory? This field is called TinyML, part of the wider area of Edge AI. It is a strong thesis area because it joins machine learning with embedded systems, and because results can be measured objectively on real hardware. This guide explains how to plan a TinyML thesis that is technically sound and defensible.

1. Understand the constraints first

A typical microcontroller target, for example an Arm Cortex-M4 or Cortex-M7 board, an ESP32-S3 or an STM32 development kit, offers roughly tens to a few hundred kilobytes of SRAM and up to a few megabytes of flash, with no operating system and a power budget measured in milliwatts. That changes how you design a study:

  • Flash must hold the model weights and the program code.
  • Peak RAM must hold the largest intermediate activations at inference time (in TensorFlow Lite for Microcontrollers this is the "tensor arena"). Peak RAM, not parameter count, is often the real bottleneck.
  • Latency and energy per inference decide whether the device can meet real-time and battery-life requirements.

Write down your target board and its exact memory limits in the methodology chapter. Every design decision should be justified against them.

2. Choose a well-defined task and dataset

Good TinyML theses use tasks where an always-on, low-power device makes sense. Common, well-documented choices include:

  • Keyword spotting with the Google Speech Commands dataset.
  • Visual wake words (person / no person) with the Visual Wake Words dataset derived from COCO.
  • Anomaly detection in machine sounds or vibration, for example with the ToyADMOS or MIMII datasets.
  • Human activity recognition from accelerometer and gyroscope data.

The MLPerf Tiny benchmark suite from MLCommons uses several of these tasks and provides reference models, which makes it a useful starting point for fair comparison. If you collect your own sensor data, document the sampling rate, the device used, the participants or machines and how labels were assigned, and split by subject or by machine rather than at random.

3. Learn the model compression toolbox

  1. Efficient architectures: depthwise separable convolutions (as in MobileNet-style networks), small 1D-CNNs for time series, and DS-CNN models for keyword spotting.
  2. Quantization: converting 32-bit floating-point weights and activations to 8-bit integers. Post-training quantization is quick; quantization-aware training usually recovers more accuracy.
  3. Pruning: removing weights or whole channels. Structured (channel) pruning is more likely to reduce real latency on a microcontroller than unstructured sparsity.
  4. Knowledge distillation: training a small student model to imitate a larger teacher.
  5. Hardware-aware neural architecture search: searching for architectures under memory and latency constraints, as explored in research such as MCUNet.

A practical toolchain is to train in TensorFlow with Keras, convert to an int8 TensorFlow Lite model, and deploy with TensorFlow Lite for Microcontrollers (now part of Google's LiteRT), which can use Arm's CMSIS-NN optimised kernels on Cortex-M devices. PyTorch users can look at ExecuTorch, and platforms such as Edge Impulse help with data collection and quick prototyping.

4. Build fair baselines

A tiny model is only interesting if you show what was traded away. Compare on the same data splits:

  • The full-precision model running on a PC or GPU (the accuracy "upper bound").
  • A classic lightweight pipeline, for example hand-crafted features such as MFCCs or statistical features with a small decision tree or SVM.
  • A published TinyML reference model, such as an MLPerf Tiny reference, retrained on your splits.
  • Your model after each compression step (float, post-training int8, quantization-aware int8, pruned), so the effect of every step is visible.

5. Measure on the device, not only in simulation

  • Report accuracy (or F1, AUC for anomaly detection) of the deployed int8 model, not only the float model.
  • Report flash usage, peak RAM, and latency per inference measured on the board, with clock frequency stated.
  • Measure energy per inference with a power monitor or a current-sense setup, and explain the method.
  • Repeat training with several random seeds and report mean and spread.
  • Present results as accuracy versus memory or energy trade-off curves, which examiners find much easier to judge than single numbers.

6. A concrete example

Suppose your target is a Cortex-M4 board with 256 KB of SRAM. You train a DS-CNN keyword spotting model on Speech Commands, then compare float, post-training int8 and quantization-aware int8 versions. You deploy each version, measure flash, peak RAM, latency and energy, and test robustness with background noise added at several levels. Finally, you apply structured pruning and check how far the model can shrink before accuracy drops beyond an acceptable threshold that you define in advance. This links each machine learning choice to a hardware cost, which makes the contribution clear.

7. Research questions you can build on

  • "Does quantization-aware training with structured pruning give a better accuracy-energy trade-off than post-training quantization alone for keyword spotting on a Cortex-M4?"
  • "Can on-device fine-tuning of only the last layer adapt an anomaly detection model to a new machine with very few labelled samples?"
  • "How robust are int8 TinyML models to sensor noise and domain shift compared with their float versions?"

Questions like these can lead to a novel contribution, but novelty must be demonstrated. Build a literature comparison table (task, dataset, board, memory, latency, energy, accuracy, compression method), identify a specific gap, and support your claims with implementation, on-device measurements and ablation studies. If your edge system also offloads work to a server, see our mobile edge computing task offloading guide.

Quick checklist

  • Target board and its flash, RAM and power limits stated clearly.
  • Well-documented dataset with splits by subject, machine or recording session.
  • Float, int8 and pruned versions compared with lightweight and published baselines.
  • Accuracy, flash, peak RAM, latency and energy measured on the device.
  • Multiple seeds, robustness tests and trade-off curves reported.

Planning an Edge AI or TinyML thesis?

If you are working on TinyML, Edge AI, embedded machine learning or IoT, the FHJCIS team works with you on the literature review and research gap analysis, dataset preparation, model design and compression, deployment and on-device measurement, baseline experiments, data analysis and writing, and helps you prepare the manuscript for submission with journal formatting and LaTeX/Overleaf support. Before you submit, our PaperAudit Pro review and the free Journal Finder and Reference Finder tools help you check the paper and choose a suitable journal. We guide you through every step, and every contributor is named as an author. We support researchers in Pakistan and abroad, including Islamabad, Taiwan and the USA. WhatsApp: +92 312 6243342 (main), +92 331 2663342.

Research SupportData AnalysisWhatsApp usContact

Related

Chat on WhatsApp