Table of Contents

Class FederatedCompressionOptions

Namespace
AiDotNet.Models.Options
Assembly
AiDotNet.dll

Configuration options for federated update compression (quantization, sparsification, and error feedback).

public class FederatedCompressionOptions
Inheritance
FederatedCompressionOptions
Inherited Members

Remarks

For Beginners: Compression reduces the size of client updates sent to the server to save bandwidth. This can speed up training in distributed settings, especially on slow or expensive networks.

Properties

QuantizationBits

Gets or sets the number of bits used for quantization strategies.

public int QuantizationBits { get; set; }

Property Value

int

Ratio

Gets or sets the compression ratio (0.0 to 1.0) for sparsification strategies.

public double Ratio { get; set; }

Property Value

double

Remarks

For Beginners: A value of 0.1 means "keep about 10% of the update entries".

Strategy

Gets or sets the compression strategy name.

public string Strategy { get; set; }

Property Value

string

Remarks

Supported built-ins:

  • "None"
  • "TopK"
  • "RandomK"
  • "Threshold"
  • "UniformQuantization"
  • "StochasticQuantization"

Threshold

Gets or sets the absolute threshold for the "Threshold" strategy.

public double Threshold { get; set; }

Property Value

double

UseErrorFeedback

Gets or sets whether to use error feedback (residual accumulation) on the client.

public bool UseErrorFeedback { get; set; }

Property Value

bool

Remarks

For Beginners: Error feedback stores the information lost during compression and adds it into the next update, which often improves convergence.