Inferensys

Glossary

Ghost Module

A ghost module is a lightweight convolutional block that generates more feature maps from cheap linear operations on intrinsic features, reducing redundant computations for embedded deployment.
Data engineer managing feature store on laptop, feature definitions visible, casual data engineering session.
EMBEDDED NEURAL NETWORK ARCHITECTURES

What is a Ghost Module?

A ghost module is a lightweight convolutional block designed to generate more feature maps from cheap linear operations, reducing redundant computations for efficient embedded deployment.

A ghost module is a convolutional building block that generates additional feature maps through efficient, linear transformations of a smaller set of intrinsic feature maps, rather than through costly, redundant standard convolutions. This approach, introduced to address feature map redundancy in trained models, significantly reduces the number of parameters and FLOPs (floating-point operations) required, making it ideal for building networks for microcontrollers and other resource-constrained devices.

The module first performs a standard convolution to produce a small number of intrinsic feature maps. It then applies a series of cheap, linear operations—such as depthwise convolutions—to each intrinsic map, creating a set of 'ghost' feature maps. These are concatenated with the intrinsic maps to produce the final output, mimicking the representational capacity of a full convolution but with far lower computational and memory cost, a key optimization for TinyML.

ARCHITECTURAL PRINCIPLES

Key Features of Ghost Modules

Ghost modules are designed to generate more feature maps from cheap linear operations, reducing redundant computations inherent in standard convolutions. This makes them a cornerstone for building efficient networks for microcontrollers.

01

Intrinsic vs. Ghost Feature Maps

A Ghost module splits the convolution process into two efficient parts. First, a regular convolution generates a small set of intrinsic feature maps. Second, a series of cheap linear operations (like depthwise convolutions) applies transformations to each intrinsic map to generate additional ghost feature maps. The final output is the concatenation of both sets, creating more feature channels with far fewer parameters and FLOPs than a standard convolution.

02

Cheap Linear Transformation

The core efficiency mechanism is the use of linear operations to generate ghost features. Common transformations include:

  • Depthwise Convolutions: Applying a single filter per channel.
  • Fixed-size Kernels: Using small, efficient kernels (e.g., 3x3 or 5x5).
  • Identity Mapping: Simply reusing the intrinsic feature map itself.

These operations are computationally trivial compared to the standard convolutions they replace, as they require no channel mixing and far fewer multiplications.

03

Parameter & FLOP Reduction

The primary benefit is a dramatic reduction in resource consumption. For a standard convolution producing n feature maps, a Ghost module might generate m intrinsic maps and use cheap operations to create s ghost maps per intrinsic map, such that n = m * s. The theoretical speedup ratio r_s for parameters and FLOPs is approximately (n * c * k * k) / (m * c * k * k + (s-1) * m * d * d), where c is input channels, k is kernel size, and d is the cheap kernel size. In practice, this achieves 2x to 4x reductions in parameters and FLOPs with minimal accuracy loss.

04

Architectural Integration (Ghost Bottleneck)

Ghost modules are stacked into Ghost Bottlenecks, which form the building blocks of GhostNet. A Ghost Bottleneck has two stacked Ghost modules, structured similarly to MobileNetV2's inverted residual block:

  1. Expansion Layer: First Ghost module expands the channel count.
  2. Depthwise Convolution: An optional depthwise convolution for spatial filtering.
  3. Projection Layer: Second Ghost module reduces channels back down.

Stride=2 bottlenecks include depthwise convolution for downsampling. This modular design allows GhostNet to be a drop-in replacement for networks like MobileNetV3.

05

Comparison to Depthwise Separable Convolution

Both techniques decompose standard convolutions for efficiency, but their approaches differ fundamentally.

AspectDepthwise Separable ConvGhost Module
DecompositionSpatial (depthwise) + Channel (pointwise)Feature Map (intrinsic) + Transformation (ghost)
Core IdeaSeparate filtering & combining.Generate redundant features cheaply.
Primary SavingReduces computations from k*k factor.Reduces redundancy in generated features.
Theoretical BasisFactorization of kernel matrix.Redundancy in feature maps.

Ghost modules can be seen as a feature-level redundancy reduction, while depthwise separable convolution is a kernel-level factorization.

06

Application in GhostNet

GhostNet is the flagship architecture built entirely with Ghost Bottlenecks. On the ImageNet dataset, GhostNet achieves competitive accuracy with significant efficiency gains:

  • GhostNet 1.0x: ~750M FLOPs, 5.2M parameters, 73.9% Top-1 accuracy.
  • Outperforms MobileNetV3 at similar FLOP budgets.
  • Demonstrates superior latency vs. accuracy trade-off on mobile CPUs (e.g., Huawei Kirin 990).

This proves the Ghost module's effectiveness as a foundational block for constructing state-of-the-art, hardware-efficient networks for embedded deployment.

ARCHITECTURAL COMPARISON

Ghost Module vs. Standard Convolution

A direct comparison of the lightweight Ghost Module with a standard convolutional layer, highlighting the trade-offs in parameters, FLOPs, and hardware suitability for embedded deployment.

Feature / MetricGhost ModuleStandard ConvolutionPrimary Impact

Core Operation

Generates intrinsic features via cheap convolution, then expands with linear transformations (e.g., depthwise convolution).

Applies a full set of learned filters directly to all input channels.

Computational paradigm

Parameter Count

Dramatically lower. Redundant feature maps are generated linearly, not learned.

High. Every output feature map requires a full set of learned filter parameters.

Model size & memory footprint

Computational Cost (FLOPs)

Significantly reduced, often by ~50% for comparable output channels.

High. Scales linearly with the number of input channels, output channels, and kernel size.

Inference latency & energy

Representational Power

Approximates the full feature space of a standard convolution using a mixture of learned and generated features.

Maximally expressive, as all feature interactions are learned directly from data.

Model accuracy & capacity

Hardware Suitability

Optimized for microcontrollers (MCUs) and edge devices with severe memory and power constraints.

Suitable for servers and high-power devices (GPUs/TPUs) with abundant resources.

Deployment target

Typical Use Case

Building blocks in efficient networks like GhostNet for on-device computer vision.

Foundational layer in large-scale models (e.g., ResNet, VGG) for cloud inference.

Application domain

Design Philosophy

Exploits feature redundancy; 'cheaply' generates ghost features from intrinsic ones.

Assumes all feature maps must be uniquely and expensively generated through learning.

Architectural efficiency

GHOST MODULE

Frequently Asked Questions

A ghost module is a lightweight convolutional block designed to generate more feature maps from cheap linear operations, reducing redundant computations for efficient embedded deployment. Below are key questions about its mechanism and applications.

A ghost module is a lightweight convolutional block that generates additional feature maps through efficient, linear transformations of a smaller set of intrinsic feature maps, reducing the computational redundancy found in standard convolutions. Instead of applying a full convolution to produce all output channels directly, the module first generates a base set of intrinsic maps using a regular but cheaper convolution (e.g., with fewer filters). It then applies simple, low-cost linear operations—like depthwise convolutions or fixed transformations—to each intrinsic map to 'ghost' or create multiple derived feature maps. These intrinsic and ghosted maps are concatenated to form the full output, mimicking the representational capacity of a standard convolution but with significantly fewer parameters and FLOPs. This design is particularly effective for building efficient networks like GhostNet for deployment on microcontrollers and mobile devices.

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.