Equation 1 · Edge AI Electronics and Sensor Systems in Practice: Quantization, Power Budgets, and Sensor Front Ends
What does this equation mean?
A neural network may work with values such as −0.75, 0, or 1.25. Small devices can store a nearby integer code instead. This equation tells you which model value that code represents.
Why “real-valued” matters
A real number is a position on the number line. In this article, r is one weight or activation of a neural network before it is reduced to a small integer code. The original model may need values between whole numbers, such as 0.9 or −0.35. An integer code can only choose from separate steps. Quantization trades some precision for smaller storage and integer arithmetic.
Read it piece by piece
Real-valued model value
One numerical weight or activation as the model uses it. “Real-valued” means it belongs on the continuous number line: it can be negative, zero, fractional, or positive. In a computer it is stored with finite precision, so the stored float is only an approximation to a mathematical real number.
Explore this idea →Stored integer code
The whole-number code kept in the compact representation. For example, q = 14 is a code; it is not itself the model value 14. The allowed code range depends on the chosen integer format.
Explore this idea →Zero-point
The integer code that stands for the real value zero. If Z = 10, then q = 10 decodes to r = 0 exactly. It shifts the integer code range left or right relative to real zero.
Explore this idea →Offset from zero
Count how many integer steps q lies above or below the zero-point. A positive result gives a positive model value; a negative result gives a negative one.
Explore this idea →Scale or step size
A positive number saying how much one integer step is worth in the model’s units. If S = 0.25, moving q by 1 changes the decoded value by 0.25. A larger S covers more range with coarser spacing.
Explore this idea →Decoded value
Subtract Z from the stored code, then multiply by S. For q = 14, Z = 10, and S = 0.25, the code represents r = 0.25 × (14 − 10) = 1.00.
Explore this idea →Try the mapping
Move the stored integer code or change the scale and zero-point. Watch which model value it represents.
With q = 14, Z = 10, and S = 0.25, the represented value is 1.00.
Illustrative values. The article does not specify these particular calibration settings.
What is being shifted and scaled?
Z picks the integer code that means real zero. Subtracting it recenters the code: q − Z = 0 at the origin. S converts a one-code move into a change in the model value. Together they form an affine mapping: first shift, then scale.
What this equation leaves out
The formula describes one scalar value. Real neural networks contain arrays of weights and activations. Different arrays, and sometimes different channels, can use different scales. The integer range also depends on the implementation. Values outside the chosen range may be clipped.
How to interpret it
This is the decoding direction: integer code → represented model value. The original value might have been 0.9, while the nearest code decodes to 1.0, so quantization can introduce error. Encoding goes the other way: round r/S + Z to a permitted integer code and clamp it if necessary. The equals sign defines the value represented by q; it does not promise that every original real value survives exactly.