Split Learning#
What is Split Learning#
The core idea of split learning is to split the network structure. Each device (silo) retains only a part of the network structure, and the sub-network structure of all devices is combined together to form a complete network model. In the training process, different devices (silos) only perform forward or reverse calculation on the local network structure, and transfer the calculation results to the next device. Multiple devices complete the training through joint model until convergence.
A typical example of split learning:
Alice holds its own data and base model. Bob holds its own data, base model and fuse model.
Alice uses its data to get
hidden0through its base model and send it to Bob.Bob gets
hidden1with its data through its base model.hidden_0andhidden_1are input to theAgg Layerfor aggregation, and the aggregated hidden_merge is the output.Bob input hidden_merge to model_fuse, get the gradient with label and send it back.
The gradient is split into two parts g_0, g_1 through
AggLayer, which are sent to Alice and Bob respectively.Then Alice and Bob update their local base net with g_0 or g_1.
Split Learning Model#
SecretFlow provides SLModel to define a split learning model.
You can check the tutorial to have a try.