Skip to main content

solvers.ErrorFeedbackModel

solvers.ErrorFeedbackModel()

A compressor that sends each value rounded to a whole unit, with error feedback.

Without a residual, every value below half a unit is lost. With error feedback the worker adds the carried residual e_t to the gradient, sends the rounded v_t, and keeps e_{t+1} = g_t + e_t - v_t; what is sent plus the last residual equals the true sum at every step.

Literature Source: Karimireddy et al. (2019), “Error Feedback Fixes SignSGD”.

Methods

Name Description
solve Track rounding residuals across gradient transmissions.

solve

solvers.ErrorFeedbackModel.solve(gradients)

Track rounding residuals across gradient transmissions.

Parameters

Name Type Description Default
gradients Sequence[float] Scalar gradient sequence in consistent arbitrary units. required

Returns

Name Type Description
ErrorFeedbackResult Modeled accounting components with unit-bearing sizes and times; ratios are dimensionless. These components do not certify deployment feasibility.

Notes

Equation: v_t = round(g_t + e_t); e_(t+1) = g_t + e_t - v_t.

Assumptions: Scalar whole-unit compressor with ties rounded away from zero.

Excludes: Optimizer convergence and vector compression costs.

References

Derivation: v_t = round(g_t + e_t); e_(t+1) = g_t + e_t - v_t. The class documentation describes the accounting sequence and its modeling context.

Examples

>>> from mlsysim.core.units import Q_
>>> r = ErrorFeedbackModel().solve([0.25, 0.25])
>>> r.total_sent + r.final_error == r.true_total
True
Back to top