Skip to main content

EncryptedInferenceLatencyScenario

Reliability scenarios · Implementation: mlsysim/engine/scenario_definitions/reliability.py.

Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.

One inference at plaintext_latency, with symmetric encryption around it (encryption_overhead) and computed under homomorphic encryption (fhe_multiplier).

Notes

Equation: Add symmetric transport overhead to baseline latency; multiply baseline latency for the FHE scenario.

Assumptions: The encryption cost and homomorphic multiplier are supplied scenario inputs.

Excludes: Cipher-specific implementation, accuracy effects, and independently predicted cryptographic cost.

References

Derivation: Add symmetric transport overhead to baseline latency; multiply baseline latency for the FHE scenario. Individual property contracts identify the exact accounting expression or reusable calculation. Registry entries supply the scenario inputs; this class does not turn them into measured outcomes.

Examples

Evaluate a named scenario using its declared inputs.

>>> from mlsysim import Scenarios
>>> scenario = Scenarios.HealthMonitoringEncryptedInference
>>> round(float(scenario.encrypted_transport_latency.magnitude), 4)
20.5

Attributes

Name Description
encrypted_transport_latency Milliseconds for plaintext inference plus the supplied symmetric-encryption overhead.
encryption_overhead
fhe_latency Seconds for plaintext inference scaled by the assumed homomorphic-encryption multiplier.
fhe_multiplier
plaintext_latency

plaintext_latency

Type: Quantity.

Declared default: required.

encryption_overhead

Type: Quantity.

Declared default: required.

fhe_multiplier

Type: float.

Declared default: required.

encrypted_transport_latency

engine.scenario_types.EncryptedInferenceLatencyScenario.encrypted_transport_latency

Milliseconds for plaintext inference plus the supplied symmetric-encryption overhead.

Equation: (plaintext_latency + encryption_overhead).to('ms').

fhe_latency

engine.scenario_types.EncryptedInferenceLatencyScenario.fhe_latency

Seconds for plaintext inference scaled by the assumed homomorphic-encryption multiplier.

Equation: (plaintext_latency * fhe_multiplier).to('second').

Back to top