Skip to main content
Distributed Machine Learning

Vertical and Horizontal Federated Learning

Published: 2026-09-11
Level: postgraduate
Audience: Postgraduate students in Distributed Machine Learning

Prerequisite Knowledge

This lecture builds on the following concepts from earlier lectures. If any feel unfamiliar, review the linked notes before proceeding.

Previously Covered in This Subject

  • Client drift, SCAFFOLD, and FedProx — covered in Lecture 11
  • Horizontal and vertical partitioning (rows versus columns) — covered in Lecture 1
  • Non-IID data and staying close to a shared model — covered in Lecture 3
  • Federated learning architectures — covered in Lecture 5

This session splits federated learning by how the data table is cut: by rows (horizontal) or by columns (vertical). The new pain is limited overlapping samples — people who do not sit on every client — and the methods that still train a joint model without shipping raw records.

12.1 Client Drift Recap: SCAFFOLD and FedProx

Last time the class asked a blunt question: if every device trains on its own slice of data, why does the shared model get worse instead of better? The short name for that failure is client drift. Today's vertical and horizontal split still uses local training, so those two named fixes stay in the toolkit.

If each hospital or phone walks a few steps on its own data, why does the average of those steps point the wrong way?

A client is one device or organization that holds its own data and trains a local copy of a model. Client drift is the failure mode where those local copies walk away from a shared global model. After a few local steps, each client points in a different direction, so the average of their updates is a messy compromise.

12.1.1 Two Fixes for Clients That Wander

Picture a hiking group that agreed to meet at one peak. Each hiker looks at the slope under their own boots. If the hills differ, they fan out. The group average of their footsteps is then a path that nobody wanted.

SCAFFOLD is a compass correction. The client still walks on its own data, but a control signal pulls the step back toward the path the federation agreed on.

FedProx is a leash. The client may move, but an extra penalty punishes large wander and keeps the local model close to the current global model.

The spoken cause of the wander in the recap was "IID data". In the usual federated-learning story, drift is worse when data are not independent and identically distributed across clients, often written non-IID. IID means each client's rows look like draws from the same joint distribution. Non-IID means each client sees a different mix of people, labels, or features. The recap used the letters IID; the standard client-drift story (and the textbook treatment of FedAvg on skewed clients) is the non-IID case. Keep both: the recap wording, and the fact that mismatched local distributions are what make the average step lie.

SCAFFOLD tries to correct the direction of each local update. Let be the current global weights that the server sent down. Client computes a local gradient on its own batch. Left alone, that gradient points toward this client's minimum, not the federation's. SCAFFOLD stores two extra vectors, called control variates:

  • is client 's running estimate of its own local gradient.
  • is the server's average of those estimates across clients.

The corrected step on the client is

where (eta) is the local step size. The term is the compass: it subtracts the client's habitual bias and adds back the group's average direction. If every client had the same data, then and the correction vanishes. If client is skewed, the correction shrinks the extra pull of that skew.

FedProx attacks the same wander with a penalty rather than a direction correction. Let be client 's local loss. Instead of minimizing alone, the client minimizes

where is the global model received at round , is the Euclidean (straight-line) length of the weight vector, and (mu) is the leash strength. The extra term is zero when and grows as the local copy walks away. Large keeps the dog close. Small lets it roam. A companion textbook also notes a second FedProx idea: stop local training when the gradient has shrunk by a factor (gamma-inexact solution), so slow devices can still contribute without a hand-tuned step count. The recap's teaching picture is the leash term.

SCAFFOLD FedProx
What it corrects Direction of the local step Distance from the global weights
Extra object Control variates , Proximal penalty
Everyday picture Compass Leash
When it helps Local gradients are biased relative to the global gradient Local training would otherwise walk far in many steps

When to pick which: use SCAFFOLD when you can store and send a control vector and you care about which way clients walk. Use FedProx when you want a simple extra loss term that limits how far they walk. They are not rivals of today's vertical methods; they are last session's answer to drift.

Scope: Both fixes assume clients share the same model shape and mostly the same feature columns. That is the horizontal federated-learning setting. They do not fill a missing column for a person who exists on only one client. If the assumption "every client has the same input layout" fails, a compass or a leash cannot invent the missing view.

A common beginner trap is to treat "IID" as the cause of drift. Identical local data make local steps agree. Drift shows up when local data disagree. Another trap is to think FedProx deletes local learning. It does not. It only taxes large moves. A third trap is to mix the two pictures: SCAFFOLD does not add to the loss; FedProx does not maintain .

12.1.2 Why This Recap Matters for Today

Today's topic is a different split of data: vertical and horizontal federated learning, with extra stress on limited overlapping samples. The drift methods above still matter as background. Clients still train locally. Data still stay local. The new pain is not only "my labels look different from yours". The new pain is "we do not even share the same people, and we do not share the same columns".

Q: What did we study last time to stop client drift?

A: SCAFFOLD and FedProx. SCAFFOLD corrects the update direction when clients wander. FedProx adds a penalty so the local model cannot drift too far from the global model. The wander was tied to how data are split across clients.

Banks, clinics, and phone keyboards still train on-device. The recap's compass and leash remain the right tools when the schema is shared and the rows differ. The rest of this note asks what to do when the schema itself is split.

SCAFFOLD corrects direction. FedProx penalizes distance. Both fight client drift under mismatched local data. Today the harder hole is missing people and missing columns, not only mismatched labels.

12.2 Horizontal Federated Learning

How do you cut a spreadsheet so that many phones can train one keyboard model without sending the typed words to a central disk? Cut across the rows. Keep every column. That cut is horizontal federated learning.

If every client already stores the same measurements, do you still need the same people on every client?

The answer is no. Horizontal federated learning shares a feature schema, not a user ID.

12.2.1 Same Columns, Different Rows

Horizontal federated learning (HFL) splits data by samples, which are the rows. Every client stores the same feature columns. Client 1 may hold persons 1, 2, and 3. Client 2 may hold other persons. Client 3 may hold still other persons. Feature 1 through feature 6 are the same names on every client: the same measurements, in the same order.

Draw one table. Columns are features. Rows are people. A horizontal cut is a cut across the table, like slicing a loaf so each diner gets a few full slices. Each client gets a block of rows and the full set of columns.

Let the shared feature vector live in . For a running six-column demo, and the named columns are . Client holds a row set . Its local table is

Every other client uses the same six names in the same order. The row index sets can be disjoint. A missing person on client 2 is a missing row, not a missing slice of columns.

If a row is present on a client in this setting, that row usually has the full column set. If a person is missing on one client, you train on the rows you have. You do not have to invent another hospital's lab tests for that person.

Companion textbooks also call this sample-based or homogeneous federated learning. A phone keyboard (Gboard-style next-word prediction) is the stock example: every handset stores the same kinds of typing features for a different user.

Visualize a grid. The horizontal axis lists to . The vertical axis lists people . Client A owns the top block of rows, all six columns filled. Client B owns the next block, all six columns filled. The cut is a horizontal line through the people axis. Takeaway: the width of the table is shared; the height is partitioned.

Assumption: Horizontal federated learning assumes a shared column layout. If client B never stores , you have left this setting. Scope: Missing rows are a smaller headache here. Missing columns for a shared person is the vertical problem in the next section.

12.2.2 Many Users, Little Forced Overlap

A bank, a retail store, and a third firm can still appear in a horizontal picture if each stores the same feature list for different users. There is no need for the same person to sit in every client. Overlap of people is optional. The shared object is the feature schema, not the user ID.

A phone keyboard app on many devices is the classic horizontal split. Each phone stores the same kinds of typing features for a different user. The federation averages models (or model updates), not raw keystrokes. That is why horizontal federated learning scales to millions of devices: you do not wait for the same person to type on two phones.

Three handsets each log six typing features (time between keys, last character class, and so on). Handset A has user rows . Handset B has rows . Handset C has rows . All nine rows have the same six columns. The server never needs user to also exist on handset B. After local training, the server averages the three model updates. Final picture: same features, different samples, overlap of people not required.

A pitfall is to demand overlapping user IDs in a horizontal design. You can average models without matching people. Another pitfall is to call any multi-company project "horizontal". If the bank stores income and the shop stores spend, the columns differ, and that is vertical. A third pitfall is to treat a missing row as a missing feature: in HFL you simply skip that person on that client.

Banks still show up in both pictures. The test is the schema. Same columns, different customers: horizontal. Different columns, some shared customers: vertical.

Exam note: Be ready to say in one sentence that horizontal means same features, different samples. Overlap of people is optional. The shared object is the feature schema.

12.3 Vertical Federated Learning

Now cut the same spreadsheet down the columns. One clinic keeps heart measurements. Another keeps eye measurements. A third keeps skin measurements. Some patients visit more than one clinic. Many do not. That cut is vertical federated learning.

Can you score one person's health index if each specialist only sees one organ system, and you are not allowed to email the raw scans?

Vertical federated learning is built for that refusal.

12.3.1 Same People, Different Columns

Vertical federated learning (VFL) splits data by features, which are the columns. Clients may share some of the same people, but each client stores a different view of those people.

Look column-wise. Client A might store heart measurements. Client B might store eye measurements. Client C might store skin measurements. The people can overlap. The columns do not have to.

A bank, a retail store, and another firm fit this picture well. The same person can have a bank account and also buy from the store. A few rows overlap. Many rows do not. Each firm keeps its own feature family. Companion textbooks call this feature-based or heterogeneous federated learning, and they use the same bank-plus-shop story: credit patterns on one side, shopping behavior on the other. Finding the shared people can use a private set-intersection step so IDs match without dumping the full customer lists. The methods in later sections assume that alignment is already known.

A hospital group in one city and a head office in another country may refuse to ship raw images across the border. Vertical federated learning is built for that refusal. One site holds one view. The other site holds another view and often the label.

Compare the two cuts on the dimensions that actually differ:

Horizontal (HFL) Vertical (VFL)
What is shared Feature columns (schema) Some sample IDs (people)
What is split Rows (different people) Columns (different views)
Overlap of people Optional Needed for the joint labeled rows
Typical pain Non-IID labels / client drift Limited overlapping samples and missing views
Classic picture Phone keyboard Bank + retailer, or heart + eye + skin

When to pick which: if every party already stores the same measurements for different users, pick horizontal. If parties store different measurements of partly the same users, pick vertical.

Scope: VFL needs a way to know which rows are the same person. If IDs cannot be matched, you cannot form overlapping samples. Assumption: labels for the joint task often live on a server or active party, not on every client. Heart-only data without a label is not enough to train the health index.

12.3.2 Heart, Eye, and Skin Views of One Health Index

A running health example makes the split concrete.

  • One client is a heart doctor and stores heart features. Speech-to-text sometimes rendered this as "hot features". The rest of the example is heart, eye, and skin, so heart is the reading that fits.
  • One client is an eye doctor and stores eye features.
  • One client is a skin doctor and stores skin features.

The health index is a score or class that needs all three views as input. Feed heart, eye, and skin together, and a model can output the health index. Feed only one view, and the model is starved.

Six people walk through three clinics. Mark a check if that clinic has a row for that person.

Person Heart clinic Eye clinic Skin clinic Status
yes yes yes overlapping (aligned)
yes yes yes overlapping (aligned)
no yes no unaligned (eye only)
yes no no unaligned (heart only)
no no yes unaligned (skin only)
no no yes unaligned (skin only)

Persons and exist in all three clinics. Those two rows are overlapping samples. You can feed heart plus eye plus skin and, if a label exists, train the health index on them.

Person exists only in the heart clinic. Person exists only in the eye clinic. Persons and exist only in the skin clinic. Those four rows are unaligned or non-overlapping. You cannot feed into a model that expects heart plus eye plus skin, because eye and skin are missing.

Final count: 2 usable full-view rows, 4 wasted partial rows, unless a later method completes the missing views.

Sense-check: the health index is a function of three views. A row with one view is like asking a committee to vote when two members never entered the room.

Imagine three strips of film of the same street. Overlapping samples are frames where all three cameras clicked at once. Unaligned samples are frames where only one camera was rolling. The film is real. It still cannot make a three-camera movie until you fill or carefully use those single-camera frames.

12.3.3 Student Questions and Answers

If you train only on and , those two people dominate the fit. That is both a fact and a trap.

Q: In vertical federated learning, will overlapping samples have more influence overall?

A: Yes, overlapping rows pull harder if you train only on them. They are the only rows that currently have a full view plus a label. That is also the trap. If you use only those few rows, the model sees a tiny data set and accuracy stays weak. If you throw away the unaligned rows, you waste data that still carry a useful view of real people.

A beginner trap is to treat "vertical" as "more private horizontal". Privacy rules can apply to both. The geometry is what changed: columns, not rows. Another trap is to assume every patient appears in every clinic. Real overlap is often small. Two hospitals in different countries are not expected to share a large patient list. That limited overlap is the bottleneck the rest of this note attacks.

Vertical means split columns, same people where IDs match. The health-index model needs heart, eye, and skin together. Overlapping samples currently carry the full view; unaligned samples are real data waiting to be used, not trash.

12.4 Overlapping Samples Versus Unaligned Samples

The health-index table had two kinds of people. Some IDs show up in more than one clinic. Some IDs show up in only one. Mixing those two kinds under the word "overlap" is how the rest of the method gets confused.

When someone says "overlap", are they talking about people (rows) or about measurements (columns)?

This session's hard problem is overlapping samples. Feature overlap is a milder, separate cleanup.

12.4.1 Shared IDs and One-Client IDs

An overlapping sample, also called a shared sample or an aligned sample, is a person or entity whose ID is present in more than one client. In notation used in the walkthrough, or marks overlap. Samples were the shared rows in the bank-retailer demo later.

An unaligned sample is a person present in only one client. marks unaligned. Samples and lived on one side only. They have no counterpart on the other client, and the server stores no label for them.

Write the two index sets as

In the clinic table, and the unaligned people are . In the bank-retailer demo, and one side also holds .

Overlap is about rows, not about whether two clinics happen to measure a similar quantity. Say "overlapping samples". Do not say "overlapping features" as if that were the same problem. Feature overlap is a different, milder issue, treated next.

Think of two clubs that share a few members. The overlapping samples are people with two membership cards. Unaligned samples are people with one card. The clubs might both ask "age". That repeated question is a shared column name, not a shared member.

12.4.2 Feature Overlap Is Not the Main Bug

Two clients might both store a quantity that is almost the same, for example a factor that appears in both skin notes and eye notes. You can merge those two columns, average them, drop one, or keep both. That cleanup is an internal project choice. You can talk to a manager and agree which column to keep.

Even if the same named feature has different values on two clients, that is still not the core research problem here. You can reconcile values later, once you are inside the project.

The work under study addresses a harder hole: and have matching rows across clients, but has only one view, has only another view, and have only the third view. Those people cannot enter a model that needs every view. Their information sits on disk and is unused. Non-overlapping rows lose information.

Q: There could be some features that overlap, for example between skin and eye. Is overlapping features the problem?

A: Feature overlap is not the issue. If eye and skin share a common factor, you can treat it as one feature. The painful case is non-overlapping rows. When a row has no partner on the other clients, you lose that person's information, and that is what you do not want. Prefer the term overlapping samples, not overlapping features, for this hole.

Values can still disagree after you name the column the same way.

Q: If a feature overlaps, could the values still differ across clients?

A: Yes, values can differ. That still is not the main hole. The main hole is a feature such as that has no values at all for this person on the other clients. Filling those missing entries is the problem the method is built to attack.

Scope: Feature-name clashes are a data-engineering choice. Sample non-overlap is the research target. If you "solve overlap" by dropping every unaligned person, you have not filled . You have shrunk the table.

12.4.3 Why Non-Overlap Wastes Data

If you ignore unaligned people and train only on and , you have a limited training set. Limited data give weaker accuracy. At the same time you cannot just "leave" the non-overlapping rows. They are real measurements. They cost money and clinical time. The aim is to stop wasting them.

Unaligned does not mean "trash". It means "this row is incomplete across clients". Completing it, or using it in a careful semi-supervised way, is the whole game.

A two-hospital picture from the communication-efficient VFL paper makes the scale concrete: two hospitals in different countries are not expected to share a large patient list. The overlapping set can be hundreds while each side holds thousands of unaligned rows. Training only on leaves most of the film on the cutting-room floor.

12.4.4 Student Questions and Answers

A natural first idea is: fill the blanks with an average, then train. That idea is the wrong tool when the blank is an image.

Q: Is the aim filling missed data by generating synthetic data from the mean or average, then training?

A: The aim is to come up with the missing parts of people such as so the data set becomes bigger. Mean or mode fill-in is not the tool here. Those old imputation tricks are for simple numbers. The features can be medical images. You cannot replace a missing scan with an average pixel value and call it done.

Pitfalls to keep separate:

  • Saying "overlapping features" when you mean overlapping people.
  • Treating value mismatches (age 34 vs 35) as the VFL research problem.
  • Calling unaligned rows outliers to delete. Some of them are outliers later, but first they are unused measurements.

Overlapping samples share an ID across clients. Unaligned samples do not. Feature overlap is a mild merge choice. The hole that wastes data is a row with no partner, and mean-fill is not how you complete a missing medical image.

12.5 Completing Missing Features Without Naive Imputation

The last section left unused people on disk. The goal is not a prettier spreadsheet. The goal is a bigger joint training set that still respects privacy: raw images stay in the clinic; only later representations and gradients move.

If mean and mode can fill a blank age, why can they not fill a blank MRI?

Because a missing scan is not a missing number. It is a missing view.

12.5.1 Goal: Turn Unaligned Rows into Usable Rows

The end goal is a bigger joint data set. Overlapped people already have every view. The method must also make usable, as if they were overlapped, so every sample can help train a model of the health index, or of bank-retail risk.

In the bank-retailer picture, the server holds a risk label only for shared people. Bank features alone are not enough for a good risk label. Retail features alone are not enough either. You need both views. Unaligned people have no server label. Completing their missing view, and later a careful pseudo-label, is how they join training.

Verbal goal: fill the holes so the table is complete enough to train. Not "drop the incomplete people". Not "pretend the hole is the column mean".

Write the wish in symbols. Let be client A's view of person and be client B's view. For both views exist. For an unaligned person on A, is missing. The later algorithms either

  • use locally to enrich representations (one-shot), or
  • estimate a stand-in in representation space (few-shot),

without shipping the raw row.

12.5.2 Images Break Mean and Mode Fill-In

A common first idea is: train on fully available rows, then predict the missing parts. That instinct is in the right family. The catch is the type of hole. These are not a few numeric blanks in a spreadsheet. They can be images. Mean, mode, and other textbook imputations do not handle an image. The methods below learn representations and relations across clients instead of pasting an average number into a blank cell.

Mean fill-in for a numeric age of would write into a blank. Mean fill-in for a scan would write one average gray value into every pixel. That gray square is not a heart. Mode fill-in is the same failure with a "most common pixel". The rejected analogy is exactly that spreadsheet trick applied to medical images.

Q: Can we train without the missing data, using only complete rows, and then predict the missing data with that trained model?

A: That is a fair starting instinct: use complete overlap to learn, then try to recover what is missing. Vertical federated learning still has extra constraints. Raw data cannot leave the client. Labels may live only on the server, and only for overlap. The algorithms below follow that instinct, but they move representations and gradients, not raw images, and they add checks before they trust a filled-in row.

Assumption: A "complete" overlap row has every needed view and a server label. Scope: Predicting the missing raw image on another client would break the privacy rule. Predicting a representation on the server, after overlap has taught an A-to-B map, is the allowed move in few-shot VFL.

12.5.3 Three Research Methods Chosen for Study

Three methods from strong papers were chosen as the study set for this session and the next:

  1. Communication-efficient vertical federated learning with limited overlapping samples, from Duke University authors together with people at NVIDIA. First author: Jingwei Sun. A spoken nickname in the room was the "SUN" algorithm; that name points at this Sun et al. method, not at a fourth paper. This is the method walked in detail today, including its one-shot and few-shot modes.
  2. Proto-EVFL (also spoken as Proto-EFL), a prototype-based vertical method. A first pass appears at the end of this note. A deeper pass is for the next session.
  3. FAT-CVT, a third algorithm named in the room. In the same literature the published cousin is FedCVT (federated cross-view training): it estimates missing representations and pseudo-labels to expand limited aligned samples, but it still uses many communication rounds. Today's Duke-NVIDIA method cites that line of work and then cuts communication to one or a few shots.

Exam note: you do not need every symbol in these papers. You do need the flow: what is missing, what is sent, what is clustered, what is checked, and what is gained.

Pitfalls: treating mean-imputation as "good enough for images"; thinking the Sun method shares raw scans; mixing FAT-CVT / FedCVT into the one-shot download story. FedCVT still chats every iteration. One-shot VFL downloads gradients once.

Grow the joint set without naive mean or mode fill-in. Complete overlap teaches the map. Representations and gradients travel. Raw images do not. Today's detailed method is Sun et al. (Duke and NVIDIA) one-shot / few-shot VFL.

12.6 Communication-Efficient VFL Architecture

Vanilla vertical federated learning chats with the server every local step. That is expensive, and it still only trains on the small overlap. Sun et al. (Duke University and NVIDIA) cut the chat to one download, and they put unaligned rows to work.

If labels live only on the server, and each client holds only part of a person, what is the smallest packet that still teaches the clients how to train?

The packet in this design is a gradient matrix plus the integer class count .

12.6.1 High-Level Pipeline

Purpose. Train a joint classifier when clients have different feature spaces, overlap is small, and you cannot afford thousands of representation-and-gradient round trips. One-shot VFL does two uploads and one download. Few-shot VFL adds one more upload/download so unaligned rows can earn a trusted pseudo-label.

The Duke-NVIDIA pipeline, taught with a bank-versus-retailer demo, has this shape.

Inputs and outputs.

  • In on client : overlapping rows , unaligned rows , a feature extractor .
  • In on the server: true overlap labels , a server classifier .
  • Up: overlap representations (and, in few-shot, unaligned representations ).
  • Down (once in one-shot): partial gradients and the class count .
  • Out: an updated extractor on each client and an updated classifier on the server.

Raw age, income, images, and labels never join those packets.

Most of the heavy supervised learning sits on the server. Clients still run clustering, local SSL, and extractor updates. It is a mix, with the server doing the labeled loss.

Steps of the one-shot path, matching the paper's Algorithm 1:

  1. Each client holds its own raw table. Hospital data was named as one possible client store. Bank features and retailer features were the running demo.
  2. Each client owns a feature extractor, which is a neural net (or the flatten stage of a net) that turns a raw row into a representation vector.
  3. For overlapping rows, each client pushes the row through its extractor and sends only the representation to the server.
  4. The server concatenates the views, runs the classifier, computes a cross-entropy loss against , and back-propagates to get one gradient vector per overlapping sample for each client's representation block.
  5. The server sends each client its gradient matrix for the overlap rows, plus a clue : how many classes exist among those overlap labels. This gradient packet is "the only download of the entire session" in the one-shot story.
  6. Each client runs k-means on its gradient rows with and gets pseudo-labels for overlap rows.
  7. Each client then runs local semi-supervised learning (local SSL) on overlap plus unaligned rows, which updates the extractor.
  8. Clients upload the new overlap representations. The server fine-tunes .
  9. If the mode flag is few-shot, extra server-side work estimates the missing client's representation for unaligned rows and applies a two-classifier trust check before a new pseudo-label is kept.

The mode flag in the paper is the string few_shot. If that flag is off, the extra block is skipped and the pipeline stays one-shot.

Tiny trace with two clients and four overlap people. Client A is a bank. Client B is a retailer. The server holds risk classes for those four people only.

  1. A sends a representation matrix. B sends its own matrix. Raw tables stay put.
  2. The server concatenates to , scores cross-entropy against the four labels, and ships each side a gradient matrix plus .
  3. Each client clusters those four gradient rows into three groups and treats cluster IDs as overlap pseudo-labels.
  4. Each client runs SSL using those four labeled-like rows plus its own unaligned people, then sends a fresh overlap matrix up.

End state: one download, richer extractors, still no raw data on the wire. Sense-check: four people taught the groups; unaligned people never needed a server label to help the extractor.

Communication cost is the point. Vanilla VFL and FedCVT may run thousands of rounds on CIFAR-10. One-shot VFL uses two uploads and one download for the training session. Reported numbers in the paper: more than accuracy gain and more than less communication versus prior VFL methods on that image split. You do not need those numbers on the exam. You do need the advantage (tiny chat, uses unaligned rows) and the drawback (one-shot still does not assign a trusted label to each unaligned person; unaligned outliers can still tug the extractor).

12.6.2 One-Shot Versus Few-Shot Modes

The same paper has two modes.

One-shot VFL uses unaligned rows only to enrich representations. It does not try to write an explicit label on each unaligned person. Semi-supervised learning pulls unaligned points toward nearby overlap structure.

Few-shot VFL does extra work after local SSL. The client sends unaligned representations to the server. The server estimates the missing view on the other client, combines views, and only then may assign a high-quality pseudo-label if two classifiers agree.

If a mode flag is few-shot, that extra block runs. If it is not few-shot, the rest of the pipeline stays as in one-shot. Standard form in the paper: if mode == "few_shot".

One-shot VFL Few-Shot VFL
Unaligned rows Enrich local representations Also candidates for a server-side pseudo-label
Extra communication None after the single download One more upload of and one more download of trust scores
Missing other-client view Not estimated Estimated by a transform
When it is the right tool Overlap is already enough to cluster well Overlap is tiny and you need more labeled-like rows

When to pick which: start with one-shot when chat is the bottleneck and you can live without unaligned labels. Switch on few-shot when overlap is so small that the extractor needs more supervised mass, and you can pay one extra round.

When to use / alternatives. Use this pipeline when overlap is limited and iteration-by-iteration VFL is too chatty. FedBCD reduces frequency but still iterates. FedCVT / FAT-CVT expands samples with estimated views but still pays heavy communication. Horizontal methods (SCAFFOLD, FedProx) do not fill a missing column.

12.6.3 Exam Notes

Exam note: Marked presentation pages for these algorithms are expected to be available in the exam setting. High-level understanding of what happens, and of advantages versus drawbacks, is what is scored. Do not memorize every variable name. Do not chain "after what comes next" as if that were the point. Know the flow: representations up, labeled loss on the server, gradients down, k-means, local SSL; few-shot then estimates the missing view.

12.7 Representation Extractors, Privacy, and the Server Classifier

The pipeline is abstract until you put numbers on a bank row. This section does that, then states the privacy rule that makes the numbers legal to send.

The server never sees age or spend. How can it still know whether a shared customer is risk or no-risk?

Because it already holds the overlap labels. Clients send representations, not labels, and not raw tables.

12.7.1 Bank and Retailer Feature Tables

Client A is a bank. It stores features such as age, income, and balance. Overlap rows are . Unaligned rows on this side include and .

Client B is a retailer. It stores features such as orders, returns, and spend. It has the same overlap IDs through , and its own unaligned people.

The server stores a risk label for overlap people only. Risk is something like no-risk versus risk, or a small set of classes . The server will not invent a label for at the start, because that person is not shared.

One spoken overlap row was fed as the numbers into the bank extractor. The session did not name which field is which. Treat them as one raw bank row, for example age , income (in thousands), and balance . Those three numbers are . They never leave the bank.

The extractor maps that length- row to a length- representation (the width is a demo size, not a required embedding width). Do the same for . Stack the four output rows. Client A now holds a matrix ready to upload.

Client B does the same from retail columns for the same four IDs. The server already has four risk labels for those IDs. The packet on the wire is two small matrices, not two customer databases.

Sense-check: four people, three bank numbers each, three retail numbers each, labels only on the server. Unaligned is not in this upload.

12.7.2 Extractors and the 4 by 3 Representation Matrix

A representation is the numeric vector that comes out of the extractor when you feed a raw row. In a deep net this is often the vector after a flatten layer, before the final class head. The property we want is: the representation is useful for classification, but it is not the raw record.

Each overlap row on client A is pushed through extractor with parameters . If there are four overlap rows and each representation has width 3, client A sends a matrix. The spoken form was "client A sends its 4 cross 3 representation matrix to the server".

where is the representation of overlap sample on client A. Client B sends its own overlap matrix of the same four people, from retail features, through extractor . The width matches the classroom "4 cross 3" demo. A real net may emit width or . The algebra does not change: rows by representation width.

Standard form in Sun et al.: and the server concatenates views with . Notation note: texts write ; here we keep for the bank side to match the demo.

Verbal description: pass every overlap row through the extractor, collect the outputs, and ship that small matrix. Do not ship the raw table.

On the server the four people become one joint matrix by concatenation along the feature axis:

That block is what the server classifier (same role as in the paper) will score against the four labels. Dimensional check: four rows in, four class-score vectors out.

12.7.3 Privacy Rule: Raw Data Stays Local

Federated learning's core privacy rule in this story: real data should not leave the client. Only representations travel up. Later, only gradients travel down. Labels never leave the server.

That rule is why a head office in one country and a client office in another city can cooperate. Neither side dumps its full database on the other. Images stay in the hospital. Risk labels stay with the party that owns them.

This vertical pattern won an internal award in industry practice, because two offices can train a joint model without a full data swap. A later student applied vertical federated learning inside a company and received an appreciation mail for it.

Scope: Sending a representation is still sending some information. The method does not claim cryptographic anonymity. It claims you do not ship the raw table or the true labels. Extra defenses (encryption, label noise) from the VFL literature can sit on top. Assumption: overlap IDs are already aligned. The extractor is not an identity map: if , you just shipped the bank row.

12.7.4 Student Questions and Answers

The first doubt is usually "if I only send a vector, where does ground truth come from?"

Q: Why are you only sending the representation? How does the server know the ground truth?

A: The starting assumption of this paper is that the server already has the true labels of overlapping samples. Before the algorithm runs, is a set of true overlap labels on the server. The clients never need to send those labels. They send representations. The server already knows risk versus no-risk, or class , for the shared people.

Those labels are ordinary class indices.

Q: Are those labels like risk or no risk?

A: Yes. Zero can mean no risk and one can mean risk, or there can be three classes . You do not need a deep meaning of the label to follow the algorithm. You only need to know the server holds a class index for each overlap row.

A third doubt is that the client looks idle.

Q: Does all the learning happen only on the servers?

A: It is a mix. The labeled classifier and the loss run on the server. Clients also run steps: they extract representations, they cluster gradients, they train local extractors with semi-supervised learning. Major labeled work is on the server, but the client is not idle.

Pitfalls: uploading raw ; assuming the server must be told the label; assuming the client only infers. Another pitfall is treating width as a law. It is a chalkboard size.

Bank and retailer keep raw columns. Overlap becomes a small representation matrix (demo: ). The server already holds risk labels for overlap. Learning is a mix: labeled loss on the server, extractors and clustering on the clients.

12.8 Gradient Clustering with K-Means and Pseudo-Labels

The server has labels. The clients do not. The trick is to send something that still carries class structure without naming the class.

If two shared customers are both "no-risk", why would the arrows the server sends back look alike?

Because the labeled loss pulls same-class representations in the same way. That is the crux: same-class gradients point the same way.

12.8.1 Cross-Entropy on Overlapping Labels

The server concatenates the overlap representations from the clients and feeds them to a server classifier . For each overlap sample , the classifier outputs a predicted class distribution . The server also holds the true label .

The spoken loss is cross-entropy between the server model output and the ground truth. The session called this "the representation" without writing a concat formula. Sun et al. settle it: the classifier sees the concatenation of all clients' representations.

where is the combined overlap representation, is the true server label, is concatenation, and is cross-entropy. Verbal description: compute the cross-entropy between the output of the model of the server and the ground truth.

For a -class problem the per-row term is

Hidden labels in the four-row demo were given as:

  • has true class
  • has true class
  • has true class
  • has true class

So classes among overlap rows. The server knows this. The clients do not receive .

12.8.2 One Gradient Vector Per Sample

After the loss, the server back-propagates to the representation of each overlap sample and gets one gradient vector per sample. Verbal description: the server runs the classifier on the representation, measures the loss against the true labels, and back-propagates to get one gradient vector per sample.

where is the gradient of the labeled loss with respect to client A's representation of sample . Stacking the four overlap rows gives a gradient matrix that the server can send back to the bank. Client B gets its own . Paper notation: .

Labels never leave the server. Gradients do. The hope is that still carries class structure: two people of the same risk class should produce similar gradient arrows, even if the client never saw the class name.

Why the arrows match: if and both have , both softmax vectors are pushed toward the same one-hot target. The residual has the same pattern, so the back-prop into has similar sign and similar size.

Warning: Labels never leave the server. The download is gradients plus the integer , not the vector . If a client could read directly, you would not need k-means.

12.8.3 The Single Download: Gradients Plus Class Count

The server sends each client:

  1. The gradient matrix for that client's overlap rows.
  2. The integer , the number of classes among overlap labels.

Verbal description: the server sends each client its gradient matrix, and it is telling that the number of classes. This is the only download of the entire session.

In the demo, : class , class , class . The client is told "these gradients live in three groups". The client is not told which group is "risk" versus "no risk".

The client then runs k-means with on the four gradient rows. K-means is the procedure that drops centre points into the space and assigns each row to the nearest centre, then moves the centres to the mean of their assigned rows, and repeats.

12.8.4 Same-Class Gradients Point the Same Way

This is the crux. Same-class gradients point the same way. If two overlap people share a hidden label, their gradient rows look nearby: similar signs, similar magnitudes. K-means with can recover groups that match the hidden classes, even though the client never received .

The client assigns pseudo-labels as cluster IDs . Those IDs may be a permutation of the server IDs in a messy world, but the teaching assumption is that the same structure is used on both sides. If the server calls cat images class "cat", the client also treats cat as cat. There is no mismatch of names.

Spoken nearby numbers used to show "very nearby" pairs included and , and , close to them, and a negative group . Those values were read off a demo of gradient entries. They are not a full official matrix. Treat them as a chalkboard of "same-class entries sit next to each other".

Four overlap people. Hidden server labels: , , , . So .

Toy gradient rows on client A (width 3, invented for arithmetic, in the same spirit as the spoken vs nearby pairs):

and are nearby in every coordinate. K-means with puts them in one cluster. is far in the third coordinate. is far in the first. The grouping that matched hidden truth in the talk:

  • and both land in cluster (same properties, both hidden class )
  • lands in cluster
  • lands in cluster

Clustering recovered the same partition as the hidden labels. Sense-check: two people with the same risk class produced similar arrows, so they shared a cluster without anyone sending the name "class 0".

Q: These labels might not match the server labels, because I can assign zero to one group while the server assigned zero to a different group, right?

A: In a raw clustering sense, cluster IDs could permute. For this method we assume the label structure is shared. When we say cat, cat images on the client are also labeled cat. There is no mismatch of class names. Preconditions of that kind are stated up front. The practical claim taught here is: same-class gradients point the same way, so groups recover the true grouping.

Unaligned people never took part in the labeled loss.

Q: For unaligned samples, do we cluster again? We do not have gradients for those.

A: Correct. Unaligned rows never went to the server, so they have no labeled loss and no . You cannot k-means them with this gradient trick. That is where local SSL and, in few-shot mode, the server-side transform begin.

Exam note: Know the crux phrase same-class gradients point the same way, and that k-means with builds overlap pseudo-labels. Labels never leave the server. The only download is the gradient matrix plus .

12.9 Local Semi-Supervised Learning and One-Shot VFL

The client now has cluster IDs for overlap people and raw rows for everyone else. One-shot VFL spends the unaligned people on a richer extractor, not on a published class name.

You have four pseudo-labeled bank customers and two customers the server never named. How do the unnamed two still help?

They sit near the overlap clusters and pull the representation map so those clusters become sharper.

12.9.1 From Pseudo-Labels to a Local Labeled Set

After k-means, the client still does not know the true server labels. It does know which overlap samples belong together. In the demo, and are together, and and are different from that pair and from each other.

The client now has, for each overlap row, the original features plus a pseudo-label . That pair resembles a labeled data set. Verbal description: the client now has something resembling a labeled data set, comma , but this is from the cluster predictions.

where is the client's raw overlap features and is the cluster ID from gradients.

The client also still has unaligned raw rows with no label.

12.9.2 Supervised Loss on Overlap Plus SSL on Unaligned Rows

Instead of waiting for another server update, the client trains its own extractor locally.

On overlap rows it uses a supervised loss: features plus pseudo-labels.

On unaligned rows it uses an unsupervised or semi-supervised loss: the extractor already knows the overlap clusters, so an unaligned point that sits near a cluster can sharpen that cluster's representation.

Verbal description: overlapping samples plus the pseudo-label from gradient k-means; unaligned rows also used; unsupervised loss; update the feature extractor.

The session described the unaligned term as "some logic", not a named equation. Sun et al. fill that gap. The local objective is

which in classroom notation is

where (same role as ) is supervised loss on pseudo-labeled overlap, (same role as ) is the semi-supervised term on unaligned rows, and balances the two. For images the paper uses FixMatch: a weakly changed copy and a strongly changed copy of the same unlabeled row should get the same class. For tables they mask features and add noise (FixMatch-tab). Any such recipe is allowed as a local implementation.

Semi-supervised learning (SSL) means a few points have labels and many do not. You feed both into the model. The model may emit pseudo-labels for unlabeled points, then train again on the union. The teaching picture is: train on overlap, then bring in an unaligned row, read which cluster it is near, and let that row slightly change the extractor so representations become richer.

The data that used to be wasted now helps. Accuracy comes from that extra mass, even before you dare to write a hard class name on each unaligned person.

12.9.3 What One-Shot Does and Does Not Predict

In one-shot VFL, you are not predicting an explicit label for each unaligned sample. You use unaligned rows only to improve the extractor. The assumption is that an unaligned sample is closer to one of the known overlap groups. Internally, SSL may learn a soft assignment. The method is not trying to publish that assignment as a trusted label.

After this local training, improved overlap representations can be sent back toward the server for another labeled pass. Unaligned rows in one-shot stay a local sharpening tool.

That is why the mode is called one-shot: two uploads (representations before and after SSL) and one download (gradients plus ). No extra round to name .

12.9.4 Risks: Outliers, Drift, and Clustering Limits

Because unaligned rows have no class attached, they may be outliers. They can pull representations the wrong way and bring drift. That drawback was accepted in the room as real. Remember the foggy-hill hiker from the recap: an unlabeled point far from every trail can yank the boots off the path. One-shot SSL has no leash on those points beyond whatever the SSL recipe already uses.

K-means also has limits. It may not fit every data shape. The pipeline is a generic template. When you code, you may swap in a clustering method that matches the data. You are free to change that piece. The idea "cluster same-class gradient arrows" stays.

Q: Unaligned unsupervised samples could include outliers and lead to drifts, yes?

A: Yes. There is no class aligned to those rows. A row may be a complete outlier and may bring drift. Those drawbacks are there in the one-shot SSL design.

Clustering is a plug-in, not a religion.

Q: K-means also has limits and may not suit some data sets. Can we change it?

A: Yes. While coding you are free to change it. This is a generic template. Depending on the data, pick the clustering algorithm that helps. In general this is how the method works.

Scope: One-shot assumes an unaligned row is near some overlap group. If the unaligned population is a new class the overlap never showed, SSL can smear the extractor. Assumption: pseudo-labels on overlap are good enough that points the right way. If k-means merged two true classes, SSL will polish the wrong clusters.

One-shot VFL: overlap plus pseudo-labels, unaligned rows for richer representations, no explicit unaligned label. The gain is extra mass. The cost is outlier drift, and k-means is replaceable.

12.10 Few-Shot VFL and Cross-Client Representation Transform

One-shot never asked the server to imagine client B's view of a person B never met. Few-shot does, because a client with only its own view cannot fill the missing view well enough to trust a label.

Client A has a bank-only customer. Client B has never seen that person. Who can guess what the retail representation would have been?

Only the server, which already holds overlap pairs from both A and B.

12.10.1 Why the Server Must Help

After local SSL, the client has an updated extractor. In few-shot mode it passes each unaligned row through that extractor and gets a new representation . It sends that vector to the server.

Why ask the server now, when one-shot handled unaligned rows locally? Because client A only has part of person . Client B has no row at all for that person, so B cannot send a matching representation. A client alone may not have enough information to generate a trustworthy pseudo-label. The paper's line, spoken in the room, is that a client with only its own view cannot fill the missing view.

The classroom picture is a split photograph: each client holds one half of each image. If the task is "are the two shapes the same?", neither half is enough to name the class. The server, which saw both halves on overlap people, can estimate the missing half.

The server does hold overlap representations from both A and B. It can study how A's overlap vectors relate to B's overlap vectors, then apply that relation to A's unaligned vector.

Q: In few-shot mode, why do we depend on the server, instead of handling unaligned samples locally as in one-shot?

A: One-shot does not predict labels of unaligned samples. It only uses them to enrich representations of nearby classes. Few-shot wants a missing other-client view. Client B never saw person , so only the server, which already holds overlap pairs from A and B, can estimate what B's representation would have been. A client alone does not have enough information for a trustworthy pseudo-label.

12.10.2 Transform T from Overlapping Pairs

Write for overlap representations from A and for overlap representations from B. Let be the unaligned representation from A. The server applies a transformation and estimates B's missing representation:

The hat on marks an estimate, not a real vector computed on client B. Verbal description: the server estimates client B's representation for this unaligned sample in A by a transformation that uses the unaligned sample from A and all overlapped samples present in A and B.

How should think: overlap pairs reveal a relation. If A-side values and B-side values move together, you can read that pattern and plug in a B-side value for a new A-side point. The classroom logic is nearest overlap pattern plus the A-to-B map.

The closed-form in Sun et al. is scaled dot-product attention (a weighted sum of B's overlap rows, with weights from how close is to each overlap ):

where is the representation width, stacks unaligned A-side vectors, and are the overlap matrices. Each missing B vector is a weighted average of real B overlap vectors. Nearby A-side overlap people get large softmax weights. That is the same "who am I close to?" logic as the chalkboard map, written for vectors instead of scalars.

They pick attention rather than a generative net because overlap may be too small to train a generator, and clients would need generators.

12.10.3 Worked Mapping Example: Two Maps to Four

A toy numeric story was used again and again. It is the scalar cartoon of .

Suppose on overlap, an A-side value is paired with a B-side value . Another overlap pair is mapped to . Another is mapped to . The shared pattern is "B is about twice A":

Now an unaligned A-side value is . Ask: is closer to the pair or the pair (or others)?

Distance to : . Distance to : . Distance to : . So sits between and . Those map to and . Linear interpolation along the same link:

Mapped value: .

Verbal description: the value 2 here is mapped to 4 here; 3 is mapped to 6; 4 is mapped to 8; 3.5 is mapped to 7. Check which overlapped one is closer, how these two are related, and bring back a plug-in predicted value.

Sense-check: twice is , which matches the "B is twice A" pattern. A very minor change from the nearest pair is allowed. That is the logic you write into .

Another phrasing: unaligned asks "which overlap am I close to?" Then copy that pair's relationship onto B, with a small adjustment.

Q: The server has overlapping samples of both A and B, and also unaligned samples of A. Is it correlating those to deduce unresolved samples of B?

A: Yes. Overlap tells how A-side representations relate to B-side representations. For an unaligned A-side point, find which overlap pattern it is close to, apply that same link, and fill the missing B-side representation.

12.10.4 Combining Actual A with Estimated B

Once exists, the server can combine the real A vector with the estimated B vector. That pair is now a full-fledged row in representation space, even though B never stored person .

The session said "combine these two". Concatenation is the natural reading, and it is the paper's :

Aligned overlap rows already have both real views, so they need no . Unaligned rows become usable because of . Those completed rows can then enter the server classifier, subject to the trust gate in the next section.

This is how a bank-only customer might still join a joint risk model. The retail view is estimated from how bank and retail overlap customers tend to move together, not by emailing the missing receipts.

Scope: can be wrong. A bank-only person who shops like nobody in the overlap will get a bad . That is why the next section refuses a pseudo-label unless two classifiers agree. Assumption: overlap pairs span the relationship you will need. If overlap never showed a "twice A" pattern, you cannot invent it for .

Few-shot asks the server to estimate the missing view with . Classroom is nearest overlap plus the A-to-B map (, ). Paper is attention over overlap. Then concatenate actual A with estimated B.

12.11 Dual-Classifier Agreement for Trusted Pseudo-Labels

Few-shot just invented a retail vector for a bank-only person. That invention can be wrong. Before the server writes a class name on , it asks two heads and keeps the row only if they meet.

If the bank-only head says "risk" and the combined head says "no-risk", should you still grow the data set?

No. Missing data is better than a confident wrong label that would drift the model.

12.11.1 A-Only Classifier Versus Global Classifier

Few-shot does not blindly trust . The estimate can be wrong and can cause drift. The server asks two questions.

Question 1 — A-only. Pass the unaligned representation from A into a classifier that learned only A-side features. Read the predicted class and its probability. In the demo, this A-only classifier said class with probability . Verbal description: if I pass the representation only from A, 85 percent is class one.

with the spoken numbers and . Paper names: and from an auxiliary head trained on overlap A-side representations.

Question 2 — global, A plus estimated B. Concatenate with and pass the pair into a global classifier that learned both views. In the demo this head said class with probability (also spoken as ). Use as the written figure; is the same classroom point: both heads are high and close.

with spoken values and . Paper names: and from .

The paper rule taught here: the prediction is the class with maximum probability on that head. Then you compare the two heads.

Standard form (Sun et al., Eq. 9) turns the comparison into a keep-probability:

where is a confidence floor and is when the statement is true, else . If the heads disagree, and the row is not sampled into the expanded labeled set. The classroom gate is the same idea in words: agree and both high, keep; disagree, reject.

12.11.2 Worked Confidence Example: 0.85 Versus 0.94

Start with four overlap samples. After a trusted unaligned fill-in, a fifth sample can join.

Walk the agree path for unaligned person :

  1. A-only head: class , probability .
  2. Global head on A plus estimated B: class , probability (or in the same telling).
  3. Both heads name the same class. Both are high. There is "no variation" in the class decision.
  4. Assign pseudo-label class to this unaligned person with more confidence. Store it on the server as a new labeled row, for example with the new label.

Verbal description: if I send only class A features it is telling 85 percent; the global classifier is telling class one with ; because these two are very close this prediction is correct; I can assign with more confidence the label is one.

Accepted pseudo-label: class for . Sense-check: adding the estimated retail view did not flip the bank-only decision; it only raised confidence from to about . That is the opposite of one-shot. One-shot never assigns this label. Few-shot assigns it only after this check.

12.11.3 Rejecting Disagreement

Now the disagree path.

A-only head says class . Global head, after adding estimated B, says class with highest probability. The two heads disagree. This sample is not trustworthy for pseudo-labeling. You do not add it to the overlap-style labeled set. You reject it.

Verbal description: if they disagree, this sample is not as trustworthy for pseudo labeling; you reject that sample; the work will compute only high quality pseudo labels for unaligned samples rather than blindly labeling them.

The gate in words:

  1. Run A-only and global heads.
  2. If the chosen classes match and both confidences are high, keep (which equals ) and add the row to the supervised set.
  3. If the chosen classes differ, drop the row. Missing data is better than a confident wrong label that would drift the model.

You are not labeling by local features alone, and not by the global head alone. You ask whether they meet.

Warning: Reject the sample when the heads disagree. That is how few-shot stays trustworthy. Blindly writing on every unaligned person is how drift comes back.

12.11.4 Student Questions and Answers

The first worry is that any predicted unaligned label can still poison training.

Q: Predicting unaligned samples this way may lead to drift. How do you stop a bad fill-in?

A: That is why the server checks both heads. If A-only says class 1 at 0.85 and the combined view also says class 1 at about 0.95, you accept. If one head says class 1 and the other says class 0, you refuse the pseudo-label so a bad estimate cannot enter training.

Growing the set is the aim. Quality is the filter.

Q: What is the ultimate aim, and what is the advantage of keeping only high-quality data?

A: The aim is to grow the data set. Missing views get computed, and missing labels get filled only when both classifiers agree. The advantage is that you keep trustworthy rows rather than every guessed row. You also compute features that were missing on client B, which is the more important win: almost all data can be used when the check passes.

A late recap question mixed the two table cuts.

Q: Is this horizontal or vertical? Horizontal has the same features, right?

A: This fill-in story is vertical. You look column-wise. Different clients hold different feature families. Horizontal is simpler in this course picture: the feature set is the same, and the issue is which rows are present. If a row is missing in horizontal, you can often live with it. If columns are missing for a shared person, that is vertical, and that is the harder case.

Exam note: Contrast one-shot VFL (unaligned rows enrich representations, no explicit unaligned label) with few-shot VFL (estimate missing view with , dual-classifier agreement, reject on disagreement). Score the gate, not every symbol.

12.12 Proto-EVFL: Prototypes, Mixed Priors, and Two-Way Losses

Sun et al. attacked limited overlap with gradients and SSL. Proto-EVFL attacks the same hole with class centres and extra care for class imbalance: one clinic may be 70% dog while the world is not.

If your clinic mostly sees dogs, why would every leftover unlabeled visit get labeled "dog"?

Because a local frequency belief, used alone, lets majority classes dominate. Proto-EVFL mixes that local belief with a global one so rare classes still get samples.

12.12.1 Class Prototypes as Average Cats and Dogs

Proto-EVFL starts a different attack on the same hole: unaligned samples and missing views, now with extra care for class imbalance.

A prototype is the representative centre of a class inside one client. For the cat class on this client, take the average of how cats look here. For dog, take the average dog. For elephant, take the average elephant. Do the same on the other client, which may see a different mix.

where indexes the client (party), indexes the class (cat, dog, elephant, ...), is the set of that class on that client, and is the feature vector of row . Verbal description: for this class, for this client, take the average cat — how a cat looks like on average. That is called a prototype: the representative center of a particular class.

To place an unaligned sample, ask: which class prototype is this sample closest to? Compare the unaligned vector to the cat centre, the dog centre, and the elephant centre, and pick the nearest. That is only a first match. Priors stop every leftover row from collapsing onto the biggest class.

Think of three club mascots. The cat mascot is the average of this club's cats, not a universal cat. A stray animal is compared to the mascots. The analogy breaks when the stray is a species the club never enrolled: nearest-mascot then lies, which is why priors and two-way losses appear next.

12.12.2 Local Prior, Global Prior, and Mixed Prior

A local prior is what this client believes about class frequencies. In the demo, one client was about dog, another class, and a third. Majority is dog inside that party. The session did not lock which animal is versus besides majority dog. Call them class and class . Verbal description: what does my client think the class distribution looks like?

A global prior is what the active party / server believes after combining all clients. Overall, cats, dogs, and elephants might be , , and . Your local dog looks less extreme once everyone is pooled. Matching the demo numbers to "leading class versus the rest":

A mixed prior is a controlled combination of local and global. You give some weight to the local view and some weight to the global view. The spoken mixed value for the leading class was , which matches the average of local and global :

Local dog rate . Global rate for that leading class . Mix with equal weight :

Mixed prior for the leading class: . Sense-check: sits between the local and the global , so the client is not allowed to call everything a dog, and the global view is not allowed to ignore that this clinic really does see many dogs.

The mix weight was not named in the room. Equal weights recover the spoken . Standard form in the Proto-EVFL paper blends global into local with a personalized (minority count over local count) so a clinic with almost no rare-class evidence does not get an inflated rare-class prior:

Classroom is the special case that produces from and . Keep the classroom mix for the exam story; the paper formula is the same blend with a data-dependent .

Why mix? We do not want majority classes to dominate. If you trust only the local dog prior, every unaligned row tries to become a dog. Rare classes never receive matches. The mix keeps a slot open for smaller classes. Local prior plus global prior, through the mixed prior, is how rare classes still get samples.

Do not freeze on the word "prior". It is just a class-frequency belief: inside one client, across all clients, or a blend.

12.12.3 Feature-to-Prototype and Prototype-to-Feature Losses

The local extractor must improve. Two losses are combined. One spoken name was PDTC loss (also heard as PTTC). Later notes call this two-way transport cost. The published name is probabilistic dual transport cost.

The two directions are:

  1. Feature to prototype: each feature vector should sit near the prototype of its class. "Which class fits this sample?"
  2. Prototype to feature: each prototype should sit near the features of its class. The centre must not float away from its people.

Verbal description: compute a loss called PDTC loss — feature to prototype loss, prototype to feature — these losses are combined, then update the parameters.

Why both ways? Nearest-prototype assignment alone is greedy. Rare prototypes can be skipped so that every unaligned point attaches to dog. The reverse term says each prototype must claim some nearby points. Together they learn better features with less bias and better support for rare classes. Parameters of the local extractor move to reduce this combined loss. A small weight-decay term on may sit beside it in the paper; the teaching picture is the two arrows.

Scope: Prototypes live in each party's own feature space. You cannot average a heart-clinic prototype with a skin-clinic prototype as if they were the same vector. Assumption: classes form clusters. If two classes overlap in feature space, nearest-centre matching lies.

12.12.4 Ensemble Classifiers and Rare Classes

Input: multiple parties, different features, few aligned labeled samples, and many unaligned samples.

Flow taught at high level:

  1. Extract features on each party.
  2. Map each unlabeled sample to the best prototype (nearest class centre).
  3. Balance class assignment using mixed priors so you cannot dump every unaligned row on one class.
  4. Train party classifiers , , and combine them as an ensemble. Give more weight to useful representations.
  5. The ensemble classifier outputs the class, including for rare classes.

Prototypes are not the final output. They are intermittent guidance to improve learning. The ultimate goal is the classifier that names the class of an unaligned sample. The paper adds an adaptive gate when combining parties so one party's features cannot drown another party's rare-class signal. The exam-level picture is: prototypes guide; the ensemble names.

12.12.5 What to Take Away Before the Next Session

Time ran out for a full Proto-EVFL derivation. The next session returns to it in more depth, including the unaligned versus aligned split and local priors.

What to keep now:

  • Horizontal = same features, split rows.
  • Vertical = split columns, limited overlapping people, missing views.
  • The Duke-NVIDIA method: representations up, labeled loss on the server, gradients down, k-means pseudo-labels, local SSL; one-shot enriches, few-shot estimates the missing view and keeps a label only if two heads agree.
  • Proto-EVFL: average class centres, mix local and global class rates, pull features and centres toward each other, then classify.

Q: Do we need to memorize and the exact next symbol in the algorithm?

A: No. Understand the flow. Be ready to say which design is efficient and which drawback it still has. You will not be asked "what is theta, and after theta what comes next".

Exam note: For Proto-EVFL, know prototype = class average, local prior versus global prior, mixed prior so majorities do not dominate, and two-way feature-prototype loss. Tough symbol-chasing on this unfinished pass is not the plan. Do not memorize theta sequences. Do analyze which method uses almost all data, and which checks keep pseudo-labels high quality.

Exam Guidance Summary

Marked presentation materials for these algorithms are expected to be available during the exam. You are not asked to reproduce every variable.

Score comes from high-level flow. What is overlapping versus unaligned? Why mean-fill fails on images? What travels (representations, gradients, class count ) and what never travels (raw data, true labels)?

Know the crux phrase same-class gradients point the same way, and that k-means with builds overlap pseudo-labels.

Contrast one-shot VFL (unaligned rows enrich representations, no explicit unaligned label) with few-shot VFL (estimate missing view with , dual-classifier agreement, reject on disagreement). High-level understanding of flow, advantages, and drawbacks is what is scored.

For Proto-EVFL, know prototype = class average, local prior versus global prior, mixed prior so majorities do not dominate, and two-way feature-prototype loss. Tough questions from the unfinished Proto-EVFL pass are not the plan for this sitting. Analysis of efficiency versus drawback is.

Do not memorize theta sequences. Do analyze which method uses almost all data, and which checks keep pseudo-labels high quality.

Key Industry Applications

Banks, retail stores, and other firms hold different columns on partly overlapping customers. Joint risk labels need both finance features and purchase features. That is the running vertical demo in this session.

Heart, eye, and skin clinics (or medical-image sites) each hold one view needed for a health index. Raw scans should not leave the clinic. Mean-fill cannot replace a missing scan.

A client office in one city (spoken example: Hyderabad) and a server in another country (spoken example: the US) may both refuse a full data share. Vertical federated learning is the pattern that still trains a joint model.

The communication-efficient limited-overlap VFL paper comes from Duke University authors with NVIDIA. NVIDIA appears here as an industry co-author, tying the classroom method to production-scale federated research (including an NVFlare one-shot VFL example).

Phone keyboards remain the stock horizontal industry picture: same typing features, different users, model averages rather than raw keystrokes.

Vertical federated learning has been applied in company settings well enough to earn internal awards and later an appreciation mail from a student who shipped it at work.

Companion textbooks also point to bank plus e-commerce credit models and to medical diagnosis settings where sites cannot centralize records. The same geometry applies: different attributes, shared people where IDs match, labels often on one active party.

DML Lecture 12 notes · Vertical and Horizontal Federated Learning

Distributed Machine Learning· postgraduate· 2026-09-11

Sections Breakdown

1Client Drift Recap: SCAFFOLD and FedProx

SCAFFOLD corrects local update direction with control variates; FedProx adds a proximal penalty so local weights cannot wander far from the global model. Drift is the non-IID (mismatched local data) problem, not a reason to drop local training.

2Horizontal Federated Learning

Horizontal federated learning splits the table by rows: every client stores the same feature columns for different samples. Overlap of people is optional; the shared object is the schema.

3Vertical Federated Learning

Vertical federated learning splits the table by columns: parties hold different feature views of partly the same people. The heart-eye-skin health-index example shows two overlapping people and four unaligned people who cannot yet enter a full-view model.

4Overlapping Samples Versus Unaligned Samples

Overlapping (aligned) samples share an ID across clients; unaligned samples exist on one client only. Feature overlap is a mild merge choice. The costly hole is non-overlapping rows, which waste information if dropped, and mean-fill is the wrong completion tool for images.

5Completing Missing Features Without Naive Imputation

The goal is a bigger joint set, not dropping unaligned people. Mean and mode fail on medical images. The study set is Sun et al. one-shot/few-shot VFL (Duke and NVIDIA), Proto-EVFL, and FAT-CVT / FedCVT as the many-round cousin.

6Communication-Efficient VFL Architecture

Sun et al. one-shot VFL uploads overlap representations, downloads gradients plus class count C once, clusters, then runs local SSL. Few-shot adds a mode flag and one extra round to estimate missing views. Exam scoring is flow, advantages, and drawbacks, not theta sequences.

7Representation Extractors, Privacy, and the Server Classifier

The bank-retailer demo sends a 4 by 3 overlap representation matrix, not raw age/income/spend. The server already holds risk labels for overlap. Learning is mixed: labeled loss on the server, extractors and later clustering/SSL on clients.

8Gradient Clustering with K-Means and Pseudo-Labels

The server scores concatenated overlap representations with cross-entropy, back-propagates one gradient vector per sample, and downloads that matrix plus class count C. Same-class gradients point the same way, so k-means recovers overlap pseudo-labels. Unaligned rows have no g_i.

9Local Semi-Supervised Learning and One-Shot VFL

Clients treat gradient clusters as overlap pseudo-labels and run local SSL: supervised loss on overlap plus an unsupervised term on unaligned rows. One-shot does not publish unaligned labels; outliers can bring drift; k-means is a swappable template.

10Few-Shot VFL and Cross-Client Representation Transform

A client alone cannot fill the other party's missing view. The server learns transform T from overlap pairs (classroom: nearest map 2 to 4 so 3.5 maps to 7; paper: scaled dot-product attention) and concatenates actual A with estimated B.

11Dual-Classifier Agreement for Trusted Pseudo-Labels

Few-shot keeps an unaligned pseudo-label only if the A-only head and the global (A plus estimated B) head name the same class at high confidence (demo 0.85 vs 0.94). Disagreement means reject, so a bad fill-in cannot drift training.

12Proto-EVFL: Prototypes, Mixed Priors, and Two-Way Losses

A prototype is a per-client class average. Mixed priors blend local 70% with global 40% to 55% so majority classes do not dominate. PDTC is two-way feature-prototype transport cost. Prototypes guide; the ensemble classifier is the output. Do not memorize theta.

Postgraduate students in Distributed Machine Learning

Exam Revision Notes

Below is the distilled, exam-ready core. Every entry comes from the full explanation above. Use this section for rapid review; return to the main notes when a point needs more context.

Client Drift Recap: SCAFFOLD and FedProx

Must-know: SCAFFOLD corrects direction of local steps; FedProx penalizes distance from the global model; client drift is worse when local data are non-IID.

Top pitfall: Saying IID data cause drift; the usual story is non-IID mismatch across clients.

Self-check: Name the two last-session fixes for client drift and say which one is a compass and which one is a leash.

Connects to: Horizontal Federated Learning, Local Semi-Supervised Learning and One-Shot VFL

Horizontal Federated Learning

Must-know: Horizontal = same features, different samples; people overlap is optional.

Top pitfall: Requiring the same user ID on every client, or mixing this up with a column split.

Self-check: A keyboard app on many phones: is that horizontal or vertical, and why?

Connects to: Vertical Federated Learning, Dual-Classifier Agreement for Trusted Pseudo-Labels

Vertical Federated Learning

Must-know: Vertical = different columns, overlapping sample IDs; overlapping rows currently dominate if you train only on complete views.

Top pitfall: Throwing away unaligned clinic visits, or reading ASR 'hot features' instead of heart features.

Self-check: For persons P1-P6 across heart, eye, and skin clinics, who can train a three-view health index today?

Connects to: Horizontal Federated Learning, Overlapping Samples Versus Unaligned Samples

Overlapping Samples Versus Unaligned Samples

Must-know: Say overlapping samples, not overlapping features. Unaligned rows waste information; mean/mode is not the fill-in tool for images.

Top pitfall: Treating a shared column name as the same problem as a missing partner row.

Self-check: Eye and skin both store a common factor. Is that the main VFL bug, and what is?

Connects to: Vertical Federated Learning, Completing Missing Features Without Naive Imputation

Completing Missing Features Without Naive Imputation

Must-know: Do not mean-fill images. Use overlap to learn, then move representations and gradients, not raw data.

Top pitfall: Training only on complete rows and calling mean imputation a medical-image solution.

Self-check: Why is pasting the column mean into a missing MRI the wrong tool?

Connects to: Overlapping Samples Versus Unaligned Samples, Communication-Efficient VFL Architecture

Communication-Efficient VFL Architecture

Must-know: High-level flow: representations up, loss on the server, gradients plus C down, k-means, local SSL. One-shot enriches; few-shot estimates the missing view. Score advantages vs drawbacks, not symbol order.

Top pitfall: Memorizing theta sequences instead of what travels and what stays local.

Self-check: In one-shot VFL, what is the only download of the session?

Connects to: Representation Extractors, Privacy, and the Server Classifier, Local Semi-Supervised Learning and One-Shot VFL, Few-Shot VFL and Cross-Client Representation Transform

Representation Extractors, Privacy, and the Server Classifier

Must-know: Send representations of overlap, not raw data. Server already has true overlap labels. Clients are not idle.

Top pitfall: Thinking the client must upload labels, or treating demo width 3 as required.

Self-check: Who holds the risk label for S0, and what does client A actually upload?

Connects to: Communication-Efficient VFL Architecture, Gradient Clustering with K-Means and Pseudo-Labels

Gradient Clustering with K-Means and Pseudo-Labels

Must-know: Same-class gradients point the same way. K-means with K=C yields overlap pseudo-labels. Labels never leave the server.

Top pitfall: Sending labels to clients, or trying to k-means unaligned rows that have no gradient.

Self-check: Hidden labels are 0,1,0,2. What is C, and which two samples should share a cluster?

Connects to: Representation Extractors, Privacy, and the Server Classifier, Local Semi-Supervised Learning and One-Shot VFL

Local Semi-Supervised Learning and One-Shot VFL

Must-know: One-shot uses unaligned rows to enrich representations, not to assign trusted labels. Outliers can cause drift. K-means can be swapped.

Top pitfall: Treating one-shot SSL as if it labeled every unaligned person.

Self-check: Does one-shot VFL output a class name for U0? What can go wrong if U0 is an outlier?

Connects to: Gradient Clustering with K-Means and Pseudo-Labels, Few-Shot VFL and Cross-Client Representation Transform

Few-Shot VFL and Cross-Client Representation Transform

Must-know: Few-shot estimates the missing other-client representation with T, then concatenates views. A client alone is not enough for a trustworthy pseudo-label.

Top pitfall: Treating the estimated B vector as if client B had really stored person u.

Self-check: If overlap maps 3 to 6 and 4 to 8, what does T give for unaligned 3.5, and why involve the server?

Connects to: Local Semi-Supervised Learning and One-Shot VFL, Dual-Classifier Agreement for Trusted Pseudo-Labels

Dual-Classifier Agreement for Trusted Pseudo-Labels

Must-know: One-shot enriches; few-shot labels only on dual-classifier agreement and rejects disagreement.

Top pitfall: Accepting a pseudo-label when the two heads disagree.

Self-check: A-only says class 1 at 0.85 and global says class 0. Do you keep U0?

Connects to: Few-Shot VFL and Cross-Client Representation Transform, Horizontal Federated Learning, Vertical Federated Learning

Proto-EVFL: Prototypes, Mixed Priors, and Two-Way Losses

Must-know: Prototype = class average. Mix local and global priors so majorities do not dominate. Two-way PDTC loss. Prototypes are guidance; the classifier is the goal. Do not memorize theta.

Top pitfall: Using only the local 70% dog prior so rare classes never receive unaligned samples.

Self-check: Local 70% and global 40% with equal mix: what mixed prior do you get, and why mix at all?

Connects to: Completing Missing Features Without Naive Imputation, Dual-Classifier Agreement for Trusted Pseudo-Labels

Exam Guidance Summary

Must-know: Flow and trade-offs, not symbol order. One-shot enriches; few-shot agrees or rejects.

Top pitfall: Memorizing theta after theta.

Self-check: Name four things that never travel in the Duke-NVIDIA pipeline.

Connects to: Communication-Efficient VFL Architecture, Gradient Clustering with K-Means and Pseudo-Labels, Dual-Classifier Agreement for Trusted Pseudo-Labels, Proto-EVFL: Prototypes, Mixed Priors, and Two-Way Losses

Key Industry Applications

Must-know: Name bank+retail risk, clinic views for a health index, and cross-border offices as vertical FL uses; Gboard-style keyboards as horizontal.

Top pitfall: Shipping raw scans or customer tables across sites when representations would do.

Self-check: Give one horizontal industry example and one vertical industry example from this session.

Connects to: Horizontal Federated Learning, Vertical Federated Learning, Representation Extractors, Privacy, and the Server Classifier

Was this lecture useful?

Loading comments…
🤖

BitsNotes AI Assistant

Subject Notes Assistant

Configure AI Chat

Choose how to access the chatbot
Have your own API key?

Switch to "Bring Your Own Key" tab above for unlimited access with any OpenAI-compatible provider.

🔑 Enter API key above to fetch live models from provider, or enter model name manually.
OpenAI-Compatible API Support

Choose any provider preset (Gemini, DeepSeek, Kimi, GLM, MiniMax, Qwen, OpenAI, Groq, Ollama, etc.) or enter a custom endpoint URL.

Security & Privacy First

Your API key is sent directly from your browser to your specified provider. BitsNotes servers never store or see your key.