Inferensys

Glossary

Data Sharding

Data sharding is the practice of horizontally partitioning a training dataset into mutually exclusive subsets to isolate the impact of individual data points and simplify incremental unlearning.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
HORIZONTAL PARTITIONING

What is Data Sharding?

Data sharding is a database architecture pattern that horizontally partitions a training dataset into mutually exclusive subsets to isolate the impact of individual data points and simplify incremental unlearning.

Data sharding is the practice of horizontally partitioning a large dataset into smaller, independent, and mutually exclusive subsets called shards. In the context of machine unlearning, this architecture ensures that a specific data point's influence is confined to a single shard rather than being distributed across the entire model. This isolation is the foundational principle of the SISA (Sharded, Isolated, Sliced, and Aggregated) training framework, which drastically reduces the computational cost of data deletion by limiting the scope of required retraining.

By training an independent sub-model on each shard and aggregating their outputs, the system achieves exact unlearning for a deletion request by retraining only the single affected shard. This approach transforms the right to be forgotten from a computationally prohibitive full retraining problem into an incremental, cost-effective operation. The granularity of the sharding strategy directly dictates the trade-off between unlearning speed and model accuracy, making it a critical design parameter for privacy-compliant Large Language Model Operations.

ARCHITECTURAL FOUNDATIONS

Key Characteristics of Data Sharding for Unlearning

Data sharding horizontally partitions training datasets into mutually exclusive subsets, enabling targeted and efficient machine unlearning by isolating the impact of individual data points to specific model replicas.

01

Mutually Exclusive Partitioning

The dataset is divided into disjoint shards where no data point exists in more than one shard. This strict isolation ensures that a deletion request affects only a single subset. The partitioning strategy often uses a deterministic hash function on a primary key to guarantee consistent assignment and prevent data leakage between shards during incremental unlearning operations.

02

Independent Model Replicas

Each shard trains a completely separate model instance with its own weights and parameters. This architectural choice means that when a user requests data deletion, only the model associated with the contaminated shard requires retraining or unlearning. The other replicas remain untouched, preserving their learned knowledge and avoiding catastrophic forgetting across the entire system.

03

Incremental Retraining Scope

Sharding transforms the computational cost of unlearning from O(n) to O(1) relative to total dataset size. Instead of retraining a monolithic model on the entire remaining corpus, engineers retrain only the single affected shard model on its cleaned subset. This makes compliance with the Right to be Forgotten economically feasible for large-scale production systems.

04

SISA Training Framework

The Sharded, Isolated, Sliced, and Aggregated framework formalizes this approach:

  • Sharding: Partition data into disjoint subsets
  • Isolation: Train independent models per shard
  • Slicing: Further divide each shard into incremental slices for checkpointing
  • Aggregation: Combine outputs via ensembling at inference time This structure limits retraining to the smallest affected slice when a deletion request arrives.
05

Inference Aggregation Strategy

Since multiple independent models exist, a voting or averaging mechanism combines their outputs at inference time. Common strategies include:

  • Majority voting for classification tasks
  • Arithmetic mean for regression outputs
  • Confidence-weighted averaging based on each model's validation score The aggregation layer must be stateless and fast to avoid introducing latency penalties.
06

Storage and Provenance Overhead

Sharding requires robust data lineage tracking to map every training point to its exact shard and slice. This demands:

  • Immutable manifest files recording hash-to-shard mappings
  • Tombstone records to prevent accidental re-ingestion of deleted data
  • Versioned shard snapshots for audit compliance The provenance infrastructure is as critical as the model architecture itself for verifiable unlearning.
DATA SHARDING FOR UNLEARNING

Frequently Asked Questions

Explore the technical mechanics of horizontally partitioning training datasets to enable efficient, targeted model unlearning and compliance with data deletion requests.

Data sharding is the practice of horizontally partitioning a training dataset into mutually exclusive, non-overlapping subsets called shards. In the context of machine unlearning, this architecture isolates the impact of individual data points to a specific, bounded sub-model. When a deletion request arrives, only the shard containing the target data needs to be retrained, rather than the entire model. This transforms the computational complexity of unlearning from O(N)—retraining on the entire dataset—to O(N/S), where S is the number of shards. The SISA framework (Sharded, Isolated, Sliced, and Aggregated) is the canonical implementation of this approach, where each shard trains an independent constituent model, and their outputs are aggregated via a voting or averaging mechanism for final inference.

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.