Towards Algorithmically Grounded Embedded AI Models
Zhenyu Wang, Md Yusuf Sarwar Uddin, Shahriar Nirjon
University of North Carolina at Chapel Hill · University of Missouri–Kansas City
SenSys 2026

Abstract

Embedded systems were once built from clear, algorithmic components where each computation was interpretable and debuggable. Modern embedded AI increasingly relies on black-box neural networks: accurate, but hard to explain, debug, or control. We propose Algorithm-Informed Neural Networks (AINNs), where neural architectures are derived from classical algorithmic blueprints and decomposed into neural blocks that mirror logic blocks with explicit invariants. This structure improves data efficiency, interpretability, and enables program-like debugging at the block level.

AINN Framework

AINN Overview Diagram
Classical algorithms (e.g., knapsack, HMM, DTW+KNN) are decomposed into logic blocks and mapped to neural blocks with invariants and monitors.
  • Algorithmic blueprint → neural architecture: each algorithm step maps to a neural block.
  • Invariants as guardrails: blocks respect monotonicity, probabilistic constraints, and structural properties.
  • Block-level monitoring: encoders track activations and detect anomalous behavior for debugging.

Example 1 – Fall Detection (HMM Blueprint)

For wearable fall detection, AINN is constructed from a Hidden Markov Model (HMM) blueprint with separate fall and non-fall chains. Neural blocks learn the observation mapping and emissions, while the HMM forward recursion remains a structured, interpretable layer.

Fall Detection AINN (HMM)
AINN constructed from a two-chain HMM (fall vs. non-fall) with neural observation and emission blocks.
Fall Detection Accuracy vs Training Samples
Accuracy vs. number of training samples on UMAFall.
Fall Detection Anomaly Latent Space
Block-level encoders separate normal vs. anomalous executions in a 2D latent space.

On the UMAFall dataset, AINN achieves 12.6–21.78% higher accuracy than BRNN/MLP baselines while using only 6.58% of the training data and running in milliseconds on a Google Pixel 6a.

Example 2 – Keyword Spotting (DTW + KNN Blueprint)

For keyword spotting, AINN mirrors a DTW+KNN pipeline: a Cost Estimator approximates frame-wise distances, a Dynamic Programmer learns soft DTW recursion, and a Score Aggregator implements differentiable KNN-style voting over reference utterances.

Keyword Spotting AINN (DTW+KNN)
AINN blocks for DTW-based sequence alignment and KNN-based decision rules.
Keyword Spotting Accuracy vs Training Samples
Accuracy vs. training samples on Google Speech Commands.
DP Learned vs True Relations
Relationship between learned DP updates and ground-truth minima.
Keyword Spotting Anomaly Latent Space
Block-level anomaly clusters from Cost and Aggregation encoders.

On the Google Speech Commands dataset, AINN achieves up to 7.75% higher accuracy using half the training data and a 46× smaller model, while preserving explicit alignment structure and enabling anomaly detection inside the dynamic programming block.

BibTeX

@inproceedings{wang2025ainn, title = {Towards Algorithmically Grounded Embedded AI Models}, author = {Wang, Zhenyu and Uddin, Md Yusuf Sarwar and Nirjon, Shahriar}, booktitle = {Proceedings of the 24th ACM/IEEE International Conference on Embedded Artificial Intelligence and Sensing Systems}, year = {2026} }