# Linear Computation Coding: A Framework for Joint Quantization and Computing
## 5 Performance Analysis
### Total Error  
Since distance error and angle error are orthogonal to each other, the total squared error is simply given as  
\[\epsilon_{k}^{2}=a_{k}^{2}+d_{k}^{2}=\delta_{k}^{2}+a_{k}^{2}\left(1-\delta_{ k}^{2}\right). \tag{35}\]  
Conditioning on the normalized distance error, the total squared error is distributed as  
\[\mathrm{P}_{\epsilon^{2}|\delta}(r,\delta)=\mathrm{B}\left(\frac{N-1}{2}, \frac{1}{2},\frac{r-\delta^{2}}{1-\delta^{2}}\right). \tag{36}\]  
The unconditional distribution  
\[\mathrm{P}_{\epsilon^{2}}(r)=\int\mathrm{B}\left(\frac{N-1}{2},\frac{1}{2}, \frac{r-\delta^{2}}{1-\delta^{2}}\right)\mathrm{d}\mathrm{P}_{\delta}(\delta) \tag{37}\]  
is simply found by marginalization.  
As the columns of the codebook matrix are jointly independent, we conclude that for  
\[\epsilon^{2}=\min_{k}\epsilon_{k}^{2}, \tag{38}\]we have  
\[\mathrm{P}_{\delta^{2}}(r)=1-\left[1-\mathrm{P}_{\delta^{2}}(r)\right]^{K}. \tag{39}\]  
For \(\mathrm{P}_{\delta}(\delta)\) having support in the vicinity of \(\delta=0\), it is shown in Appendix C to converge to  
\[\lim_{K\to\infty}\lim_{N\to\frac{1}{k}\log_{2}K}\mathrm{P}_{\delta^{2}}(r)= \left\{\begin{array}{ll}0&r<4^{-R}\\ 1&r>4^{-R}\end{array}\right.. \tag{40}\]  
for exponential aspect ratios.  
The large matrix limit (40) does not depend on the statistics of the normalized distance error. It is indifferent to the accuracy of the quantization. This looks counterintuitive and requires some explanation. To understand that effect, consider a hypothetical equiprobable binary distribution of the normalized distance error with one of the point masses at zero. If we now discard all codewords that lead to a nonzero distance error, we force the distance error to zero. On the other side, we lose half of the codewords, so the rate is reduced by \(\frac{1}{N}\). However, in the limit \(N\to\infty\), that comes for free. If the distribution of the angle error has any nonzero probability accumulated in some vicinity of zero, a similar argument can be made. This above argument is not new. It is common in forward error correction coding and is known as the expurgation argument [50].  
The CDF is depicted in Figure 2 for a uniform distribution of the distance error. For increasing matrix size, it approaches the unit step function. The difference between the angle error and the total error is small.  
The median total squared error for a single approximation step is depicted in Figure 3 for various rates \(R\). Note that the computational cost per matrix entry scales linearly with \(R\) for fixed \(K\). In order to have a fair comparison, the average total squared error is exponentiated with \(1/R\). For large matrices, it converges to the asymptotic value of \(\frac{1}{4}\) found in (40), which is approached slowly from above. For small matrices, it strongly deviates from that. While for very small matrices low rates are preferred, medium-sized matrices favor moderately high rates between 1 and 2. Having the rate too large, e.g., \(R=\frac{5}{2}\), also leads to degradations.  
We prefer to show the median error over the average error that was used in the conference versions [4; 43] of this work. The average error is strongly influenced by rare events, i.e., codebook matrices with many close to collinear columns. However, such rare bad events can be easily avoided by means of cutting diversity, cf. Section 4.4.5. The median error reflects the case that is typical, in practice.  
Figure 2: CDF of the squared total error (solid lines) and squared angle error (dashed lines) for rate \(R=\frac{1}{2}\) and various numbers of columns \(K\).