FedDTCompressor<T>

Models & Types · AiDotNet.FederatedLearning.Compression

Implements FedDT — Decision-tree-based compression for heterogeneous federated architectures.

Inheritance: FederatedLearningComponentBase<T> → FedDTCompressor<T>

For Beginners

Most gradient compression methods assume all clients have the same model architecture. FedDT handles heterogeneous architectures by compressing model updates into decision-tree representations. Each client distills its local model changes into a lightweight decision tree, sends only the tree structure (much smaller than full gradients), and the server merges the trees. This enables FL across different model architectures with minimal communication.

How It Works

Algorithm:

Reference: FedDT: Decision-Tree Compression for Heterogeneous Federated Learning (2024).

Constructors

Constructor Summary
FedDTCompressor(int maxTreeDepth, int minLeafSize, double pruningThreshold) Creates a new FedDT compressor.

Properties

Property Summary
double PruningThreshold { get; } Gets the pruning threshold.
int MaxTreeDepth { get; } Gets the maximum tree depth.
int MinLeafSize { get; } Gets the minimum leaf size.

Methods

Method Summary
CompressedTree<T> Compress(Dictionary<string, T[]> parameterDelta) Compresses a parameter update into a decision-tree representation.
Dictionary<string, T[]> Decompress(CompressedTree<T> tree, Dictionary<string, T[]> templateDelta) Decompresses a tree representation back into parameter updates.
Dictionary<string, T[]> MergeTrees(Dictionary<int, CompressedTree<T>> clientTrees, Dictionary<int, double> clientWeights, Dictionary<string, T[]> templateDelta) Merges multiple compressed trees via weighted averaging of leaf values.
double EstimateCompressionRatio(int originalSize, CompressedTree<T> tree) Estimates the compression ratio achieved by the tree representation.