Inferensys

Glossary

Vertical Gradient Computation

Vertical gradient computation is the secure, distributed process of calculating parameter updates for a model trained with Vertical Federated Learning, where gradients are computed across the split parts of the model held by different data owners.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
VERTICAL FEDERATED LEARNING

What is Vertical Gradient Computation?

Vertical gradient computation is the core, privacy-preserving process for calculating parameter updates in a model trained via Vertical Federated Learning (VFL).

Vertical gradient computation is the distributed, coordinated process of calculating the gradients (parameter updates) for a machine learning model whose architecture and data are split across multiple parties in a Vertical Federated Learning (VFL) system. Unlike standard backpropagation, this process involves secure exchanges of intermediate results and partial gradients between a label owner and multiple feature owners who hold different attributes about the same entities. The goal is to compute an accurate global gradient to update the model while preventing any participant from reconstructing another's raw private data from the exchanged mathematical values.

The computation follows a split neural network architecture, divided at a designated cut layer. During vertical backpropagation, the label owner calculates gradients for its portion of the model and sends encrypted gradient signals back to each feature owner. Each feature owner then uses these signals to compute gradients for its local model segment and features. This orchestrated flow, often secured with cryptographic protocols like homomorphic encryption or secure multi-party computation (MPC), defines the vertical training protocol and is fundamental to enabling collaborative learning on vertically partitioned data without centralization.

VERTICAL GRADIENT COMPUTATION

Key Components of the Process

Vertical gradient computation is the distributed, privacy-preserving process of calculating parameter updates for a model trained with Vertical Federated Learning. It involves secure and coordinated gradient calculation across the split parts of the model held by different data owners.

01

The Split Neural Network Architecture

The model is physically divided into segments, or sub-models, owned by different parties. A feature owner holds the bottom layers that process its local features. The label owner typically holds the top layers, culminating in the output and loss calculation. The cut layer is the designated boundary where intermediate outputs are exchanged. This architectural split is the foundation that enables distributed forward and backward passes without sharing raw data.

02

Distributed Forward Pass

Each feature owner performs a local forward propagation on its segment of the model using its private features. The output of this computation, known as the intermediate output or embeddings, is produced at the cut layer. This intermediate output is then securely transmitted (often in encrypted form) to the label owner. The label owner receives these embeddings from all feature owners, concatenates them, and completes the forward pass through its top model segment to compute the final prediction and loss.

03

Distributed Backward Pass (Gradient Flow)

This is the core of vertical gradient computation. The label owner calculates the initial gradients from the loss function. These gradients are then backpropagated through its top model segment. At the cut layer, the label owner computes the gradients with respect to the received intermediate outputs. These gradients are sent back to the corresponding feature owners. Each feature owner then uses these received gradients to perform local backpropagation through its own model segment, calculating the gradients for its private model parameters and features.

04

Secure Communication of Sensitive Tensors

The exchange of intermediate outputs and gradients constitutes the primary communication overhead and privacy risk. To prevent data reconstruction attacks, these values must be protected. Common techniques include:

  • Homomorphic Encryption (HE): Allows computations (like the label owner's forward pass) to be performed directly on encrypted intermediate outputs.
  • Secure Multi-Party Computation (MPC): Uses cryptographic protocols to jointly compute gradients without revealing private inputs.
  • Differential Privacy (DP): Adds carefully calibrated noise to the communicated tensors to provide a mathematical privacy guarantee.
05

Local Parameter Update

After completing the distributed backward pass, each party holds the gradients for its own segment of the model. Each party then performs a local optimization step (e.g., Stochastic Gradient Descent) to update its private model parameters. Critically, the raw model parameters themselves are never shared or aggregated across parties, unlike in Horizontal Federated Learning. The global model is defined implicitly by the collective state of all the local model segments, which are updated in a coordinated fashion through the gradient flow.

06

The Training Protocol & Orchestration

Vertical gradient computation is governed by a strict training protocol that sequences all steps. A central coordinator (often the label owner) orchestrates the rounds:

  1. Initiation: Broadcasts the start of a new training round.
  2. Forward Coordination: Collects encrypted intermediate outputs from feature owners.
  3. Gradient Distribution: Computes and sends back the relevant gradients.
  4. Synchronization: Ensures all parties update their models in lockstep. Frameworks like FATE and PyVertical implement these protocols, handling communication, encryption, and fault tolerance.
COMPARISON

Vertical vs. Horizontal Gradient Computation

A comparison of the core mechanisms for calculating parameter updates in the two primary federated learning paradigms, highlighting differences in data structure, communication patterns, and security requirements.

Computation FeatureVertical Gradient ComputationHorizontal Gradient Computation

Data Partition Structure

Features (columns) are split across parties; samples (rows) are aligned.

Samples (rows) are split across parties; features (columns) are identical.

Primary Communication

Intermediate outputs and gradients for aligned samples.

Complete model parameter updates (e.g., weights).

Cryptographic Focus

Secure transmission of sample-level intermediate data; Private Set Intersection for alignment.

Secure aggregation of client-level model updates.

Model Architecture

Split neural network with a cut layer.

Identical full model on each client.

Gradient Calculation Path

Distributed backpropagation across the split model parts.

Local backpropagation on the client's full model.

Label Ownership

Typically held by a single label-owning party.

Locally available to each participating client.

Primary Privacy Risk

Leakage from intermediate outputs/gradients (feature inversion).

Leakage from model updates (membership inference).

Typical Use Case

Cross-silo collaboration between organizations with different data attributes on the same entities (e.g., bank & retailer).

Cross-device training across a population of devices with similar data types (e.g., smartphones).

VERTICAL GRADIENT COMPUTATION

Frequently Asked Questions

Vertical gradient computation is the core, privacy-preserving process for calculating model updates in Vertical Federated Learning. These FAQs address how gradients are calculated across distributed model parts without exposing raw data.

Vertical gradient computation is the distributed process of calculating parameter updates (gradients) for a machine learning model trained using Vertical Federated Learning (VFL), where the model is split across parties holding different features for the same entities.

In this setup, the label owner (who holds the target values) and multiple feature owners (who hold subsets of input features) collaboratively compute gradients for their respective portions of a split neural network. The process involves a secure exchange of intermediate outputs and gradient signals during vertical backpropagation, ensuring no party gains access to another's raw feature data or the complete model. The primary goal is to enable collaborative model improvement while adhering to strict data privacy constraints common in finance, healthcare, and cross-organizational partnerships.

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.