CHAPTER 2

Edge AI Architecture

System Design Principles

Designing edge AI systems requires balancing competing constraints: computational power, memory, energy consumption, latency, and model accuracy. Unlike cloud-based systems with virtually unlimited resources, edge architectures must operate within strict hardware boundaries while delivering responsive, reliable AI capabilities.

The Resource Triangle

Every edge AI system navigates three fundamental constraints:

Optimizing for one dimension often requires trade-offs in others. A highly accurate model may demand more computation and memory, increasing power draw. The art of edge AI architecture lies in finding the optimal balance for your specific use case.

Layered Architecture

Application Layer

The application layer provides the user-facing interface and orchestrates AI functionality. On mobile devices, this might be a native iOS/Android app. On embedded systems, it could be custom firmware. This layer:

// TypeScript example: Application layer inference workflow
import { EdgeAIClient } from '@wia/edge-ai';

const client = new EdgeAIClient({
  model: 'object_detector_v2',
  backend: 'gpu',
  optimizations: ['fp16', 'pruning']
});

async function processFrame(imageData: ImageData): Promise {
  // Preprocess
  const tensor = await preprocessImage(imageData, {
    resize: [300, 300],
    normalize: true,
    colorSpace: 'RGB'
  });

  // Inference
  const outputs = await client.infer(tensor);

  // Postprocess
  const detections = await postprocessDetections(outputs, {
    confidenceThreshold: 0.6,
    nmsThreshold: 0.4,
    maxDetections: 10
  });

  return detections;
}

Inference Engine Layer

The inference engine executes neural network computations. Popular frameworks include:

The inference engine handles:

Hardware Abstraction Layer (HAL)

The HAL provides a uniform interface to diverse hardware accelerators. This allows the same model to run efficiently on different devices without application code changes. The HAL manages:

Hardware Components

Central Processing Unit (CPU)

General-purpose processors handle non-parallelizable tasks and coordinate system operations. While not optimized for neural network math, modern CPUs include:

CPU inference is suitable for small models or when specialized accelerators aren't available. Performance typically ranges from 1-10 GFLOPS.

Graphics Processing Unit (GPU)

Originally designed for graphics rendering, GPUs excel at parallel matrix operations—the core of neural network inference. Mobile GPUs like Adreno (Qualcomm), Mali (ARM), and Apple GPU provide:

GPU inference works well for medium-to-large convolutional and transformer models where parallelism can be fully exploited.

Neural Processing Unit (NPU)

Also called AI accelerators or neural engines, NPUs are purpose-built for neural network inference. Examples include:

NPUs offer:

Digital Signal Processor (DSP)

DSPs specialize in signal processing—audio, video, and sensor data. Qualcomm's Hexagon DSP can run AI workloads efficiently, particularly for:

Software Stack

Operating System Integration

Edge AI frameworks integrate deeply with mobile and embedded operating systems:

Platform Framework Hardware Support
iOS / macOS Core ML CPU, GPU, Neural Engine
Android TensorFlow Lite, NNAPI CPU, GPU, NPU, DSP
Linux Embedded TensorFlow Lite, ONNX Runtime CPU, GPU (OpenCL/Vulkan)
RTOS TensorFlow Lite Micro CPU (Cortex-M)

Model Deployment Pipeline

Getting a trained model from the training environment to edge devices involves several steps:

1. Train Model (PyTorch/TensorFlow)
   ↓
2. Export to Intermediate Format (ONNX, SavedModel)
   ↓
3. Convert to Edge Format (TFLite, CoreML, ONNX)
   ↓
4. Optimize (Quantization, Pruning, Layer Fusion)
   ↓
5. Benchmark on Target Hardware
   ↓
6. Package for Deployment
   ↓
7. Deploy via OTA Update or App Bundle
   ↓
8. Runtime Inference on Device

Deployment Patterns

Fully On-Device Deployment

The entire AI pipeline runs locally with zero cloud dependency. Ideal for:

Pros: Maximum privacy, lowest latency, no bandwidth costs, works offline

Cons: Limited to what device hardware can run, no centralized learning

Edge-Cloud Hybrid

Simple tasks run on-device, complex processing falls back to cloud. For example:

Pros: Balance of performance and privacy, graceful degradation

Cons: Still requires connectivity for advanced features

Federated Edge Architecture

Models train collaboratively across edge devices. Each device:

  1. Downloads the current global model
  2. Trains on local data
  3. Uploads only model updates (gradients) to server
  4. Server aggregates updates from many devices
  5. Broadcasts improved global model

Pros: Privacy-preserving learning, models improve from collective data

Cons: Communication overhead, requires coordination infrastructure

Edge Mesh Networks

Edge devices collaborate directly without central servers. Useful in:

Memory Management

Model Storage

Models are stored compressed on disk and loaded into RAM for execution. Techniques to reduce footprint:

Activation Memory

During inference, intermediate layer outputs (activations) require temporary memory. For a ResNet-50 processing a 224x224 image:

// Activation memory calculation
Input: 224 × 224 × 3 = 150,528 values
Conv layers: ~10 MB peak activation memory
Output: 1000-class probabilities

Total peak memory: ~15 MB (with FP32)
Optimized (FP16): ~7.5 MB
Further optimized (INT8): ~4 MB

Memory optimization strategies:

Power Management

Power Consumption Sources

Edge AI power draw comes from:

Energy-Efficient Design

Strategies to minimize power consumption:

// Adaptive inference example
async function adaptiveInference(image: Tensor): Promise {
  // Try lightweight model first (10ms, 50mW)
  const quickResult = await lightModel.infer(image);

  if (quickResult.confidence > 0.95) {
    return quickResult; // High confidence, use quick result
  }

  // Fall back to heavy model for uncertain cases (50ms, 200mW)
  return await heavyModel.infer(image);
}

Performance Optimization

Model Architecture Selection

Some architectures are inherently more edge-friendly:

Architecture Edge Suitability Use Case
MobileNet Excellent Image classification, detection
EfficientNet Excellent High-accuracy image tasks
SqueezeNet Good Ultra-low footprint imaging
BERT-Tiny Good Language understanding
ResNet-50 Moderate Requires optimization for edge
GPT-3 Poor Too large for edge deployment

Operator Optimization

Inference engines optimize neural network operations through:

Benchmarking and Profiling

Key Metrics

When evaluating edge AI systems, measure:

Profiling Tools

弘益人間 Architecture Principle:

Design edge AI systems that empower users while respecting their privacy, device resources, and autonomy. Optimize for efficiency not just performance—every milliwatt saved extends battery life, every megabyte saved makes models accessible to more devices.

Summary

Edge AI architecture balances computational constraints, memory limits, and power budgets to deliver responsive, efficient AI on resource-constrained devices. Key architectural components include:

  • Layered software stack (application, inference engine, HAL)
  • Specialized hardware accelerators (NPU, GPU, DSP)
  • Optimized inference frameworks (TensorFlow Lite, Core ML, ONNX Runtime)
  • Memory-efficient model deployment and activation management
  • Power-conscious design leveraging hardware acceleration and quantization

Deployment patterns range from fully on-device (maximum privacy, offline capability) to edge-cloud hybrid (balancing performance and resource constraints) to federated edge (collaborative learning while preserving privacy).

Success in edge AI requires holistic optimization—selecting appropriate model architectures, leveraging hardware accelerators, optimizing memory usage, and measuring performance across latency, throughput, power, and accuracy dimensions.

Review Questions

  1. What are the three fundamental constraints in the "resource triangle" of edge AI?
  2. Describe the responsibilities of each layer in the edge AI software stack.
  3. Compare and contrast CPU, GPU, and NPU for edge AI inference.
  4. What advantages do NPUs provide over GPUs for neural network inference?
  5. Explain the model deployment pipeline from training to edge device.
  6. What are the pros and cons of fully on-device deployment versus edge-cloud hybrid?
  7. How does federated edge architecture preserve privacy while enabling model improvement?
  8. What techniques reduce activation memory consumption during inference?
  9. Why do specialized accelerators (NPUs) achieve better energy efficiency than general-purpose processors?
  10. Name five key metrics for benchmarking edge AI systems.

Korea Digital Transformation Detailed Mapping

Korea operates digital transformation through a comprehensive governance system. Digital Government: Digital Platform Government Committee (established September 2022, under the President)·Ministry of the Interior and Safety Digital Government Bureau·e-Government Support Center·Gov.kr·National Citizen Service·KDIS (Korea Digital Information Society)·NIA (National Information Society Agency)·MOIS (Ministry of the Interior and Safety). K-DNS Infrastructure: Korea Internet & Security Agency (KISA) Korea Internet Center·KISA DNS Root Server·KRNIC (Korea Network Information Center)·BGP Korea·National Cyber Security Center (NCSC)·KCC (Korea Communications Commission)·MSIT (Ministry of Science and ICT)·NIA·NIPA. Korean Cloud Infrastructure: KT Cloud·NAVER Cloud (NCloud)·Samsung SDS Cloud·LG U+ Cloud·NHN Cloud·Kakao Enterprise Cloud·SK Telecom Cloud·KISA Cloud Security Assurance Program (CSAP)·KCMVP-validated cloud·ISMS-P (Information Security & Personal Information Management System). Korean Security Certifications: KISA ISMS-P certification·KCMVP (Korean Cryptographic Module Validation Program)·NIS (National Intelligence Service) "National Cryptographic Technology Operation Standards"·NCSC "National Cyber Security Strategy 2024-2028"·CC (Common Criteria) Korean evaluation bodies·EAL4·EAL5·KS X ISO/IEC 15408·19790·24759 Korean Profile. Korean Data Standards: NIA AI Hub·National Data Standardization Committee·Statistics Korea (KOSTAT)·MyData 4 Designated Combination Specialists (Samsung SDS, KICI, KOSTAT, KFTC)·National Institute of Korean Language·National Law Information Center·National Spatial Information Platform·National Spatial Data Center·Korean Spatial Information Standards. Finance and Fintech Standards: FSC (Financial Services Commission)·FSS (Financial Supervisory Service)·FIU (Financial Intelligence Unit)·BOK (Bank of Korea)·FSEC (Financial Security Institute)·KFTC (Korea Financial Telecommunications)·KSD (Korea Securities Depository)·KRX (Korea Exchange) 8-agency cooperation. 5G/6G Communications Infrastructure: 5G subscribers 35 million (2024)·5G base stations 350,000·6G commercialization target 2028·5G dedicated networks 16 operators·6G Acceleration Council (MSIT, 2024). K-Content: KOCCA (Korea Creative Content Agency)·MCST (Ministry of Culture, Sports and Tourism)·KCA (Korea Communications Agency)·Korea Culture Information Service Agency·Korean Film Archive·Korea Publishing Industry Promotion Agency. Data 3 Acts (Personal Information Protection Act·Credit Information Act·Telecommunications Network Act, 2020 enforcement)·Data Industry Act (2021)·Public Data Act (2013)·AI Framework Act (2026)·Digital Platform Government Framework Act (2024 proposed) — Korea digital transformation core legislation.

Korea Industrial, Research, Education Infrastructure Mapping

Korea operates its industrial ecosystem and standardization system through the following core infrastructure. Korea Top 5 Groups: Samsung, Hyundai Motor, LG, SK, Lotte. Each group operates standardization committees and ISO/IEC TC Korean secretariats. Samsung Electronics (semiconductors, displays, home appliances, telecom)·Hyundai Motor (automobiles, mobility)·LG Electronics (home appliances, displays, OLED)·SK hynix (memory)·LG Energy Solution·Samsung SDI (batteries)·POSCO Future M (materials)·Hyundai Mobis (parts). Korean IT Big Tech: NAVER (search, cloud, AI HyperCLOVA)·Kakao (messenger, payment, mobility, banking)·Coupang (e-commerce, logistics)·Karrot Market·Toss·Woowa Brothers. Korea Telcos: SK Telecom·KT·LG U+. 5G·5G dedicated networks·B2B cloud·AI businesses operating. Korea Top 7 Research Universities: Seoul National University·KAIST·POSTECH·Yonsei University·Korea University·UNIST·DGIST·GIST. All serve as standardization R&D bases and ISO/IEC/IEEE Korean chairs. Korea Government-affiliated National Research Institutes (26): KIST, KAERI, KIMM, KIER, KFRI, KRICT, KRIBB, KARI, KASI, KIGAM, KICT, KISTI, KETI, ETRI, NIMS, KIMS, KISDI, KOTRA, STEPI, KOEN, KICCE, KIET, KIPF, KIHASA, KICJ, KLRI. Korea Industrial Complexes / Tech Valleys: Pangyo Techno Valley·Dongtan·Gwanggyo·Songdo IBD·Yeouido·Gangnam·Sihwa·Banwol·Gumi·Ulsan·Changwon·Geoje·Yeosu·Onsan·Cheongju·Iksan·Gwangyang·POSCO Gwangyang Steel Mill·Asan Bay·Seosan·Songdo·Incheon Airport·Sejong·Cheongna·Geomdan. Korea Trade and Finance Infrastructure: Korea International Trade Association (KITA)·Korea Trade-Investment Promotion Agency (KOTRA)·Export-Import Bank of Korea (KEXIM)·Bank of Korea·Kookmin Bank·Shinhan·Hana·Woori·NH Nonghyup·IBK Industrial Bank·SC First Bank·Citi Bank Korea·HSBC Korea·DBS Korea — 14 Korean major banks and foreign banks. Korea K-POP / K-Content: HYBE·SM·YG·JYP 4 major entertainment companies·CJ ENM·tvN·MBC·KBS·SBS·EBS·YTN·Yonhap News TV·JTBC Korean broadcasting·NETFLIX Korea·Disney Plus·TVING·Wavve·Watcha·Coupang Play. Korea Gaming Industry: Nexon·NCsoft·Krafton·Netmarble·Kakao Games·Pearl Abyss·Com2uS·Gamevil·NHN·Smilegate·Webzen. Korea Automotive / Battery: Hyundai Motor·Kia·Genesis·LG Energy Solution·Samsung SDI·SK On·POSCO Future M·EcoPro·L&F battery cathode material suppliers. Korea Semiconductor: Samsung Electronics (HBM3E·HBM4)·SK hynix (HBM3E 12-Hi)·DB HiTek·SK siltron·SK Enpulse·Dongjin Semichem·Seoul Semiconductor·Simmtech·Samsung Display·LG Display.

Korea Standardization Infrastructure Mapping

Korea operates a comprehensive standards governance system through inter-ministerial cooperation. National Standards Council (under Prime Minister's Office, per Framework Act on National Standards Article 5) coordinates KATS (Korean Agency for Technology and Standards), MFDS (Ministry of Food and Drug Safety), MOTIE (Ministry of Trade, Industry and Energy), MSIT (Ministry of Science and ICT), MOIS (Ministry of the Interior and Safety), MOE (Ministry of Environment), MOHW (Ministry of Health and Welfare), MND (Ministry of National Defense), MCST (Ministry of Culture, Sports and Tourism), MOFA (Ministry of Foreign Affairs), MOJ (Ministry of Justice), and FSC (Financial Services Commission). Accreditation and Testing: KOLAS (Korea Laboratory Accreditation Scheme) accredits 800+ testing laboratories. KAS (Korea Accreditation System) accredits 50+ certification bodies. KTC (Korea Testing Certification), KTR (Korea Testing & Research Institute), KTL (Korea Testing Laboratory), and KCL (Korea Conformity Laboratories) provide conformance testing. Telecom and Cyber: KCC (Korea Communications Commission), KCA (Korea Communications Agency), TTA (Telecommunications Technology Association), IITP (Institute for Information & Communications Technology Planning & Evaluation), NIPA (National IT Industry Promotion Agency), KISA (Korea Internet & Security Agency), KCMVP (Korea Cryptographic Module Validation Program), NIS (National Intelligence Service), NSR (National Security Research Institute), and NCSC (National Cyber Security Center). National R&D Centers: KIST, ETRI, KAIST, Seoul National University, Yonsei University, Korea University, POSTECH, UNIST, GIST, DGIST, KISTI, KIER, KIMM, KRICT, KFRI, KRIBB. International Standards Cooperation: ISO TC/SC Korean secretariats, IEC TC/SC Korean secretariats, ITU-T Study Group Korean chairs, 3GPP RAN/SA Korean chairs, IEEE 802 Korean chairs, W3C Korea office, OASIS Korea office, IETF Korea cooperation, OECD CSTP, UN ESCAP, APEC SCSC Korean cooperation. Korean Industrial Standards (KS) Catalog: KS X (Information) 25,000+, KS A (Basic) 15,000+, KS B (Machinery) 25,000+, KS C (Electrical) 18,000+, KS D (Metallurgy) 12,000+, KS E (Mining) 5,000+, KS F (Construction) 18,000+, KS H (Food) 8,000+, KS I (Environment) 5,000+, KS J (Biology) 3,000+, KS K (Textile) 15,000+, KS L (Ceramics) 7,000+, KS M (Chemistry) 12,000+, KS P (Medical) 5,000+, KS Q (Quality Mgmt) 4,000+, KS R (Transport) 12,000+, KS S (Service) 3,000+, KS T (Packaging) 4,000+, KS V (Shipbuilding) 5,000+, KS W (Aerospace) 3,000+ — totaling 220,000+ Korean Industrial Standards. Key Acts: Personal Information Protection Act (Act 19234, effective Sept 15, 2024), Electronic Government Act, Electronic Signature Act, Act on Promotion of Information and Communications Network Utilization and Information Protection, Information and Communications Infrastructure Protection Act, Data Industry Act, Public Data Act, AI Framework Act (Act 20212, effective July 2026), Industrial Technology Innovation Promotion Act, Framework Act on Science and Technology — 70+ Korean standardization-related laws.