Inferensys

Glossary

On-Device Dataset

An on-device dataset is a collection of sensor readings, user interactions, or other locally generated data stored on an edge device, used for local model training or personalization without transmitting raw data to a central server.
Engineer deploying small language model to edge device, IoT sensor visible on desk, technical hardware setup in bright workspace.
FEDERATED LEARNING FOR TINYML

What is an On-Device Dataset?

An on-device dataset is the collection of sensor readings, user interactions, or other locally generated data stored on an edge device, which is used for local model training or personalization in federated and on-device learning paradigms without being transmitted to a central server.

An on-device dataset is the corpus of raw or preprocessed data—such as sensor data streams, user activity logs, or environmental readings—persistently stored in the local memory of a resource-constrained device like a microcontroller. This dataset is the foundational input for on-device training and inference, enabling Federated Edge Learning where models learn directly from decentralized data. Its creation involves on-device preprocessing to transform raw signals into features suitable for a TinyML model, all while adhering to strict memory footprint and energy budget constraints.

In Federated Learning for TinyML, the on-device dataset is never centralized; only model updates derived from it are shared. This architecture directly addresses the cold-start problem by allowing personalization and tackles the challenges of heterogeneous clients with non-IID data distributions. The dataset's size and statistical properties are primary factors in client selection strategies and dictate the feasibility of local training within an availability window, making its efficient management a core systems challenge for embedded engineers.

FEDERATED LEARNING FOR TINYML

Key Characteristics of On-Device Datasets

On-device datasets are the localized, private collections of data used for training and personalization in federated and edge learning systems. Their defining properties are shaped by the severe constraints and unique environment of the embedded devices that host them.

01

Data Sovereignty & Privacy

The most defining characteristic of an on-device dataset is that the raw data never leaves the physical device. This is the core privacy guarantee of federated learning. The data is generated, stored, and processed locally, with only encrypted mathematical updates (like gradients or weight deltas) being shared. This is critical for applications involving personal user interactions, proprietary industrial sensor readings, or regulated health data where centralization poses legal and ethical risks.

02

Statistical Heterogeneity (Non-IID)

On-device data is almost never Independent and Identically Distributed (IID). Each device's dataset reflects its unique environment and user. For example:

  • A fitness tracker in Sweden will have different temperature and activity data than one in Singapore.
  • A keyboard on a programmer's phone will have a different word distribution than one on a journalist's phone. This non-IID data distribution is the primary challenge in federated learning, as it can cause model divergence and slow convergence, requiring specialized optimization algorithms like Federated Averaging (FedAvg) with client weighting.
03

Extreme Resource Constraints

On TinyML devices, datasets are bounded by severe hardware limits:

  • Memory (RAM/Flash): The entire dataset must fit in the device's limited volatile and non-volatile memory, often measured in kilobytes to a few megabytes. This prohibits storing large historical archives.
  • Compute: Processing the dataset for local training is constrained by the MCU's clock speed and lack of a dedicated GPU, limiting model and batch sizes.
  • Energy: Reading from memory and performing computations directly drains the energy budget. Data collection and training must be scheduled to balance utility with battery life.
04

Dynamic & Streaming Nature

On-device datasets are not static; they are built from continuous sensor data streams or user interactions. This creates a temporal dimension where data distribution can drift over time (e.g., a sensor's environment changes with seasons). It enables online or continual learning paradigms where the model adapts to new patterns. However, it also introduces challenges like managing dataset size (e.g., FIFO buffers) and handling the cold-start problem where a new device has insufficient initial data for effective training.

05

Unlabeled & Weakly Labeled Data

A significant portion of on-device data is unlabeled. Manually labeling sensor streams (e.g., identifying specific sounds or motion patterns) is infeasible at scale. This drives the use of:

  • Self-supervised learning techniques that generate labels from the data's structure.
  • Weak supervision using heuristic rules or other sensor modalities as proxy labels.
  • Federated learning with scarce labels, where only a small subset of clients may have labeled data, requiring algorithms that can leverage both labeled and unlabeled datasets across the network.
06

Task-Specific & Multi-Modal Composition

The dataset's composition is dictated by the device's sensors and its specific inference task, often combining multiple data types:

  • A wake-word detection device collects audio time-series.
  • An industrial predictive maintenance sensor collects vibration, temperature, and current readings.
  • A smartphone may use typing patterns, accelerometer data, and app usage logs for personalization. This multi-modal nature requires on-device preprocessing pipelines to align and fuse different data streams into a format usable by the model, all within the device's resource envelope.
ROLE IN FEDERATED EDGE LEARNING

On-Device Dataset

The on-device dataset is the foundational, private data asset that enables decentralized machine learning on edge hardware.

An on-device dataset is the collection of sensor readings, user interactions, or other locally generated data stored on an edge device, which is used for local model training or personalization without the raw data being transmitted to a central server. In Federated Edge Learning, this dataset is the source for computing model updates (e.g., gradients), which are then aggregated to improve a global model while preserving data privacy and reducing bandwidth. Its characteristics—size, distribution, and quality—directly influence model performance and training efficiency.

For TinyML deployments on resource-constrained devices, managing the on-device dataset involves significant engineering trade-offs. Storage is limited, often requiring on-device preprocessing to extract features and discard raw streams. The data is typically non-IID (non-identically distributed) across devices, posing challenges for federated optimization. Furthermore, the dataset is dynamic, growing from continuous sensor data streams, which enables on-device training for continual learning but must operate within strict energy budget and compute constraints to avoid excessive battery drain.

ON-DEVICE DATASET

Common Examples & Data Types

An on-device dataset is the local, private collection of data used for training or personalization directly on an edge device. Its characteristics are defined by the device's sensors, user interactions, and operational constraints.

01

Sensor Telemetry Streams

The most common on-device dataset type, consisting of continuous, time-series readings from embedded sensors. These are raw, unlabeled, and generated in real-time.

Examples include:

  • Inertial Measurement Unit (IMU) Data: Accelerometer, gyroscope, and magnetometer readings for activity recognition (e.g., step counting, fall detection).
  • Environmental Sensors: Temperature, humidity, air quality (VOC), and barometric pressure logs.
  • Acoustic Data: Raw audio waveforms or Mel-frequency cepstral coefficients (MFCCs) for keyword spotting or anomaly detection.

Key Constraint: Data volume is bounded by the device's limited non-volatile storage (Flash memory), often requiring circular buffers or aggressive compression.

02

User Interaction Logs

Datasets composed of implicit and explicit feedback from a device's primary user, enabling highly personalized model adaptation.

Examples include:

  • Touchscreen Gestures & Typing Patterns: For adaptive keyboards or UI personalization.
  • App Usage Statistics & Feature Preferences: Sequences of actions within a mobile or embedded application.
  • Voice Command History: Successful and failed interactions with a local voice assistant.

Privacy Imperative: This data is highly sensitive and must never leave the device raw. Federated learning protocols like Secure Aggregation are designed to learn from these logs without central collection.

03

Operational & Diagnostic Logs

Data generated by the device's own systems, capturing its health, performance, and failure modes. This dataset is critical for predictive maintenance and self-healing applications.

Examples include:

  • Power State Transitions: Records of sleep/wake cycles and battery voltage levels.
  • Thermal Profiles: Processor temperature logs correlated with compute load.
  • Wireless Link Quality: Histograms of signal strength (RSSI) and packet loss rates.
  • System Exception Dumps: Context around crashes or faults.

This data is inherently non-IID (Non-Independently and Identically Distributed) across a device fleet, as each unit experiences unique environmental and usage stresses.

04

Synthetic & Augmented Data

Artificially generated or transformed data created on-device to overcome local data scarcity. This is a key technique for on-device continual learning.

Methods include:

  • Data Augmentation: Applying real-time transformations (e.g., time-warping, adding noise, scaling) to existing sensor samples to create new training examples.
  • Generative Model Inference: Using a tiny, pre-loaded generative adversarial network (GAN) or diffusion model to create plausible synthetic samples that respect the local data distribution.
  • Simulation via Digital Twin: If the device has a physics-based model of its environment, it can generate simulated sensor readings for rare edge cases.

This approach directly addresses the cold-start problem in federated edge learning.

05

Federated Learning Artifacts

The specialized data types exchanged during the federated learning process, which are derived from—but do not contain—the raw on-device dataset.

Core Artifacts:

  • Model Updates (ΔW): The difference between the model parameters before and after local training. This is a mathematical summary of learning from the local dataset.
  • Training Metadata: Scalars like the number of local training steps (E) and the size of the local dataset (n_k), used for weighted averaging in algorithms like Federated Averaging (FedAvg).
  • Sparse Gradients: For communication efficiency, clients may send only the top-k% of gradient values by magnitude, creating a sparse update.

These artifacts are the only information about the local dataset that is transmitted to the coordinating server.

06

Ephemeral vs. Persistent Storage

A fundamental distinction in how on-device datasets are managed, dictated by memory constraints and data relevance.

Ephemeral (In-Memory) Datasets:

  • Storage: Volatile RAM only.
  • Use Case: Streaming learning where the model trains on a continuous, real-time sensor feed. Data is processed in small batches and then discarded.
  • Challenge: Requires extremely efficient algorithms to learn from a data window before it vanishes.

Persistent (Flash) Datasets:

  • Storage: Non-volatile Flash memory.
  • Use Case: Learning from rare events (e.g., a machine fault) or user habits that develop over days/weeks. Data is stored in a managed buffer.
  • Challenge: Flash memory has limited write cycles (endurance), making frequent saves unsustainable. Techniques like wear leveling are essential.
ARCHITECTURAL COMPARISON

On-Device Dataset vs. Centralized Dataset

A comparison of data storage and processing paradigms for machine learning, highlighting the core distinctions between federated edge learning and traditional cloud-centric approaches.

Feature / MetricOn-Device DatasetCentralized Dataset

Data Location & Sovereignty

Resides on the edge device (MCU, sensor, phone).

Stored on remote cloud or enterprise servers.

Data Privacy Posture

Raw data never leaves the device; only model updates may be shared.

Raw data is transmitted and stored centrally, creating a single point of exposure.

Primary Use Case

Federated Learning, On-Device Training, TinyML, Personalization.

Traditional Centralized Training, Big Data Analytics.

Data Transmission Volume

Minimal (sparse model updates only). Typically < 1 MB per round.

Massive (entire raw datasets). Often GBs to TBs.

Latency for Model Updates

Low (computation is local). Bounded by device compute speed.

High (dominated by data upload bandwidth and cloud queueing).

Operational Resilience

High. Functions offline; model improves with local data without connectivity.

Low. Dependent on stable, high-bandwidth cloud connectivity.

Compliance Suitability

Inherently aligns with GDPR, HIPAA, and data localization laws.

Requires complex legal agreements, encryption, and access controls.

Scalability Challenge

Managing heterogeneity and partial participation across 1000s of devices.

Scaling storage and GPU clusters for exponentially growing data.

Primary Cost Driver

Edge device hardware & embedded software development.

Cloud storage fees, egress charges, and compute instance costs.

Data Preprocessing

On-device preprocessing (filtering, FFT) to reduce dimensionality.

Centralized ETL/ELT pipelines on powerful servers.

Data Distribution

Typically Non-IID (Non-Independent and Identically Distributed). Statistically heterogeneous across devices.

Assumed to be IID (or can be shuffled into such). Statistically homogeneous.

Security Attack Surface

Distributed. Requires defenses against adversarial clients & model poisoning.

Centralized. High-value target for database breaches and exfiltration.

ON-DEVICE DATASET

Frequently Asked Questions

An on-device dataset is the collection of sensor readings, user interactions, or other locally generated data stored on an edge device, which is used for local model training or personalization in federated and on-device learning paradigms without being transmitted to a central server.

An on-device dataset is the collection of raw sensor data, user interactions, or system logs that is generated, stored, and processed locally on a resource-constrained device like a microcontroller or smartphone. It is the fundamental fuel for on-device training and personalized federated learning, where the data never leaves the physical device, ensuring privacy and reducing bandwidth. Unlike centralized datasets, it is typically small, highly personalized, and reflects the unique statistical distribution of its local environment.

Key characteristics include:

  • Local Storage: Resides in the device's limited Flash memory or RAM.
  • Continuous Generation: Often built from a live sensor data stream.
  • Non-IID Nature: Data distribution is specific to the device's user and environment, a core challenge in federated learning.
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.