Optimal One-Bit Quantization

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Optimal One-Bit Quantization

Alessandro Magnani Arpita Ghosh Robert M. Gray


Information Systems Laboratory, Stanford University
Stanford, CA 94305-9510
alem, arpitag, [email protected]

Abstract
We consider the problem of finding the optimal one-bit quantizer for sym-
metric source distributions, with the Euclidean norm as the measure of distor-
tion. For fixed rate quantizers, we prove that for (symmetric) monotonically
decreasing source distributions with ellipsoidal level curves, the centroids of
the optimal 1-bit quantizer must lie on the major axis of the ellipsoids. Under
the same assumptions on the source distribution, the centroids of the optimal
one-bit variable-rate quantizer lie on one of the axes of the ellipsoid. If further,
the source distribution f (x) is log-concave in x, the optimal 1-bit fixed-rate
quantizer is unique and symmetric about the origin. (The Gaussian is an ex-
ample of a distribution that satisfies all these conditions.) Under a further set
of conditions on the source distributions, we show that there is a threshold
below which the optimal fixed rate and variable rate quantizer are the same.

1 Introduction
We consider the problem of describing the optimal one-bit quantizer for both the
fixed rate and variable rate case. By one-bit quantizer, we mean a quantizer with two
codewords. We restrict ourselves to the Euclidean distance as a measure of distortion.
Although the problem appears to be simple, it is in fact quite challenging, and
counter-intuitive. For example, it is not true that if the source distribution is sym-
metric, there is an optimal 1-bit quantizer with symmetric centroids. The following
source distribution (Figure 1) from [AW82] demonstrates this:

|x|/3 + 5/12
|x| < 1
f (x) = (7 |x|)/72 1 |x| < 7 (1)

0 7 |x|

For this distribution, the optimal centroids are located at 1 and 3, with a dis-
tortion of 2.61. In contrast, the optimal symmetric quantizer has a distortion of
2.74.

This work is supported in part by a Stanford Graduate Fellowship.

1
PSfrag replacements
C1 5
C2 12

1
12


7 1 1 7
Figure 1: Optimal centroids need not be symmetric for symmetric distribution.

For a source distribution on R, Kieffer [Kie83] showed that if the source density is
log-concave, then (for the Euclidean distance), there is only one locally optimal k bit
quantizer. This result applied for the specific case k = 1 guarantees the convergence
of the Lloyd algorithm to the globally optimal 1-bit quantizer for a source with a
log-concave density in R.
The rest of the paper is organized as follows. In Section 2, we present some
results for the one-bit quantization problem for symmetric distributions in higher
dimensions. In Section 3, we present some results which relate the optimal fixed rate
1-bit quantizer to the optimal variable-rate 1-bit quantizer. In this case, variable rate
merely means that the objective is a Lagrangian combining the distortion and the
entropy of the code.

2 Fixed rate optimal quantizer


In this section, we first prove a condition on the centroids of an optimal (1-bit)
quantizer for a symmetric source distribution. We then use this to prove a result for
a specific class of distributions, which include, for example, the Gaussian and uniform
distribution on an ellipsoid in Rn .

Theorem 1. For a source distribution f : Rn R such that f (x) = f (x), x Rn ,


a necessary condition for codewords C1 and C2 to be optimal is that C1 = C2 , R.

Proof. Consider a given pair of codewords C1 and C2 ; the Lloyd condition [GG92]
implies that the boundary between the two codecells must be a hyperplane. Let this
hyperplane be aT x = b. Denote the region aT x > b by R1 , and aT x b by R2 (Figure
2). For the codewords to be Lloyd optimal (for the Euclidean distance), C1 must be
the centroid of R1 , and C2 must be the centroid of R2 .
Construct the hyperplane aT x = b. Denote by R3 the region aT x b. By
symmetry of f , we have
Z Z
xf (x)dx = xf (x)dx,
aT xb aT x>b
PSfrag replacements aT x = b

C1
R4 R1
aT x = b
C4
C2
C3

R3

Figure 2: Line through the Lloyd optimal centroids passes through the origin.

i.e., the centroid of R3 , C3 = C1 . For the region R4 = {x : aT x b, aT x


b}, by symmetry again, the centroid C4 is 0. By construction C2 must be a linear
combination of C3 and C4 . Therefore C2 = C3 + C4 = C1 for some , R.

We will use this result to prove the following theorem.


Theorem 2. Consider a source with a distribution f (x) = g(xT x), where x
Rn , Rnn is a diagonal matrix with distinct non-negative entries, g : R R is
strictly decreasing, and Rn |x|f (x)dx < +.
R

The codewords for the optimal 1-bit quantizer for such a source lie on the axis
corresponding to the largest ii .
Proof. Consider a pair of given codewords C1 and C2 . From Theorem 1, the codewords
must be of the form C1 = a, C2 = a where , R and kak = 1. The boundary
between the regions is a separating hyperplane, given by aT x = b, where we may
assume without loss of generality that b 0.
Change coordinates x = Qx where Q is orthogonal and satisfies a = Qe1 (ei is the
vector with 1 in the ith position, and 0 everywhere else).
In addition we want to choose Q so that (QT Q)ij = 0 unless either i = 1, j = 1
or i = j. To do this lets call ki for i = 1, . . . , n1, a set of orthonormal vectors which
together with a form a basis for Rn . Define B = [k1 kn1 ] and let v1 , , vn1 be
a set of orthonormal eigenvectors of B T B. It is easy to check that if we set
Q = [a Bv1 Bvn1 ],
then Q1 = QT ; also (QT Q)ij = 0 unless either i = 1, j = 1 or i = j by construction.
For the pair of codewords to be Lloyd-optimal, the codewords must be centroids
of their codecells. Specifically, then C1 must be the centroid of the region aT x b.
Therefore in the new set of coordinates we should have that

xi g(xT QT Qx)dx
R
aT x>b
T T
=0 (2)
aT x>b g(x Q Qx)dx
R
for i = 2, . . . , n. Since Rn |x|f (x)dx < +, we can use Fubinis theorem to rewrite
R

(2) as
R + R T T

n1 xi g(x Q Qx)dx2 dxn dx1
b R R
T T
= 0, (3)
aT x>b g(x Q Qx)dx
for i = 2, . . . , n.
Fix i and for x = [x1 xi xn ] define x = [x1 xi xn ]. Given the choice
of Q we have that
xT QT Qx xT QT Qx = 4(QT Q)1i x1 xi .
Since over the range of integration x1 > 0 and g is monotonic, we have that
g(xT QT Qx) g(xT QT Qx)
is either strictly less or greater than 0 for every value of x1 > 0 and all xj for
j = 2, . . . , n unless (QT Q)1i = 0. Since
Z + Z 
n1
xi g(xT QT Qx)dx2 dxn dx1 =
b R
Z + Z + Z 
T T T T
xi (g(x Q Qx) g(x Q Qx))dx2 dxi1 dxi+1 dxn dxi dx1 ,
b 0 Rn2
if (QT Q)1i is not zero, the ith component of the centroid is not 0 and therefore the
Lloyd optimality condition is not satisfied. From this we conclude that the codewords
can be optimal only if (QT Q)1i = 0 for i = 2, . . . , n.
We will show, by contradiction, that such a Q can be found only if a = ei .
Since
(QT Q)1i = aT Bvi1 = 0, i = 2, . . . , n,
and the vi are a basis for Rn1 , we must have aT B = 0.
Suppose that a 6= ei . Then a must haveqat least two non-zero components, say
a1 and a2 . Choose k1 = [a1 a2 0 . . . 0]/ a21 + a22 . Then (aT B)1 = aT k1 =
a1 a2 (11 22 ) 6= 0. So we have a contradiction, i.e., a = ei necessarily. This shows
that the codewords must lie on one of the unit vectors.
We will now proceed to show that in fact, the codewords lie on the unit vector
corresponding to the largest ii .
Since the optimal codewords must be aligned with one of the axes, we find the
optimal quantizer by finding the optimal codewords for each axis i and choosing the
best of these n quantizers, i.e., the one with the smallest distortion, where D i is
Z
Di = min
c ,c
(min (xi cj )2 + x21 + . . . + x2i1 + x2i+1 + . . . x2n )g(xT x)dx1 . . . dxn .
1 2 j=1,2

Change variables so that 1/2 x = y, the distortion is

n
yk2
!
1 Z X
2 1 Z
1/2 2 2
Di = ( g(kyk )dy + min min (2yi ii cj + ii cj )g(kyk )dy .
det(1/2 ) k=1 kk ii c1 ,c2 j=1,2
(4)
Observe that when we replace i by j, the first term remains the same. Also, observe
that
Z Z
1/2 1/2
min
c ,c
min (2yi ii cj +ii c2j )g(kyk2 )dy = min
c ,c
min (2yk kk cj +kk c2j )g(kyk2 )dy.
1 2 j=1,2 1 2 j=1,2
(5)
From this, we can see that Di is smallest for i such that ii is largest, i.e., the
codewords for the optimal quantizer lie along the axis corresponding to the largest
ii .
We now prove the following corollary:

Corollary 1. If, in addition, the density f is a log-concave function of x, the global


optimal one-bit quantizer is unique and symmetric about the origin.
Proof. By Theorem 2, the optimal quantizer lies along the axis corresponding to
the largest ii . The problem of finding the codewords is now a one-dimensional
quantization problem, since
Z
D = min
c ,c
(min (x1 ci )2 + x22 + . . . + x2n )f (x)dx
1 2 i=1,2
Z Z
= (x22 + . . . + x2n )f (x)dx + min
c ,c
(min (x1 ci )2 f1 (x1 )dx
1 2 i=1,2

where f1 (x1 ) is the marginal of f along x1 .R


Since the density f is log-concave, f1 (x1 ) = Rn1 f (x)dx2 . . . dxn is a log-concave
function of x1 (see, for example, [BV03]). Using the result of Kieffer [Kie83] we
conclude that the globally optimal 1-bit quantizer is unique. Moreover since we know
that along this axis there is local minimum symmetric about the origin we conclude
that this is the global minimum.
Remarks:

The matrix need not be diagonal; all we need is that it be positive semi-
definite and symmetric. In this case we can perform an eigenvalue decomposi-
tion of = QT Q, where Q is an orthogonal matrix, and change coordinates
by Q to obtain the form in Theorem 2.

Note also that the requirement that has distinct (diagonal) entries is for
convenience of proof. If has two entries, say ii and jj which are equal,
then it can be seen from the proof that the Lloyd condition can be satisfied also
by codewords that are a linear combination of ei and ej . However, the distortion
for these codewords will be the same, and in this case also, it is sufficient to
check along the n axes ei to find the globally optimal quantizer.
The globally optimal quantizer is still found along a combination of th ei asso-
ciated with the biggest ii .
The proof can be extended to decreasing functions. In fact the proof only
requires that there are two non-trivial intervals I1 and I2 such that g(I1 ) > g(I2 ).
Since f has to be integrable this property comes directly from the fact that the
function g is decreasing.
It should be clear that g can also be strictly increasing on a ellipsoidal set and
0 outside of it.

3 Variable-rate 1-bit quantizer


Here we consider the problem of the optimal 1-bit variable rate quantizer. Recall that
by variable rate, we mean that the objective function is now a linear combination of
the distortion and the entropy of the code. Specifically, suppose Q is a quantizer,
specified by (two) codewords and codecells. We will denote by Df (Q) the distortion
for this quantizer (note that this is the objective function when we consider the fixed
rate quantizer). The objective function for the variable rate quantizer is
D (Q) = Df (Q) + H(Q),
where 0, and H(Q) is the entropy corresponding to Q, i.e., the entropy of the
1-bit random variable with probabilities computed from the codecells. Note that
0 H(Q) 1.
Many of the results for fixed-rate quantizers can be extended to variable rate
quantizers as well. In particular, we first state the following lemma, proved by Linder
and Gyorgy in [GL03].

Lemma.The boundary between the codecells of an optimal 1-bit variable-rate quan-


tizer for an absolutely continuous source distribution is a hyperplane orthogonal to
the line joining the codewords.
In fact, it is enough for f to be absolutely continuous on its support, provided the
support is a compact set. For the rest of this report we will assume that f satisfies
this condition.
Note that for the variable-rate quantizer, the separating hyperplane need not pass
through the midpoint of the two codewords.
Using the fact that the boundary is a separating hyperplane, we can conclude
that the result of Theorem 1 holds also for variable rate quantizers and such source
distributions, since given a codecell, the codeword must still be the centroid of the
codecell for Lloyd optimality for the variable rate quantizer.
Since the result of Theorem 1 still holds, we can use the same arguments as in
Theorem 2 to prove the following, slightly weaker result:
Theorem 3. Consider a source with a distribution f (x) = g(xT x), where x
Rn , Rnn is a diagonal matrix with distinct non-negative entries, g : R R is
strictly decreasing, and Rn |x|f (x)dx < +.
R

The codewords for the optimal variable-rate 1-bit quantizer for such a source must
lie on one of the coordinate axes.
We do not repeat the proof of the theorem. Note that in this case, we cannot
conclude that the quantizer must lie on the axis corresponding to the largest ii ,
because of the additional entropy term in the objective function.
The optimal quantizers for the fixed-rate and the variable rate cases are related
by a threshold property: Under certain conditions on f , there exists a such that
for , the fixed rate quantizer is also optimal for the variable rate quantizer.
We make this precise in the following theorem.

Theorem 4. Let f be a generic source distribution satisfying the following properties:

There is exactly one globally optimal fixed-rate quantizer for f .

The Hessian of the distortion D exists at the optimal, and 2 D  0.

The gradient of the entropy is zero for the optimal fixed rate quantizer.

The distortion at the global optimum is strictly less than the infimum over all
locally (non-global) optimal quantizers.

Then there exists such that for all < , the globally optimal fixed rate
quantizer is also (globally) optimal for the variable-rate case.

Proof. A 1-bit variable-rate quantizer can be completely described by the position of


the centroids (C1 , C2 ) the normal a of the separating hyperplane and a point b on the
hyper plane.
Let x = [C1 , C2 ]T and y = [a, b]T . We call the distortion for the variable rate
D (x, y) = D(x, y) + H(y), where D(x, y) is the fixed rate distortion. Let [x , y ] be
the unique globally optimal fixed rate quantizer.
Since D(x, y)|[x ,y ] = 0, H(y)|y = 0, and 2 D(x, y)|[x ,y ] > 0, we can find
and such that for 0 < ky yk < , all x and < ,

D (x, y) > D (x , y ).

For ky yk > and all x, let D(x , y ) inf(D(x, y)) = , < 0. Let < .
For ky yk > , < and all x we have

D (x, y) D(x, y) > D(x , y ) + > D (x , y )

So by picking = min(, ) the result follows.


Remarks.

It appears that this proof can be extended to the optimal k-bit quantizer as
well (the quantizer is now described by a larger number of parameters; suitably
modify the vectors x and y).

Similar results can be proved even with relaxing the hypothesis of a unique
global minimum. For example
Theorem 5. Let f be a generic source distribution satisfying the following properties:
There is exactly one point b0 such that for every a with norm 1 there exists a
globally optimal quantizer with y of the form y = (ab0 ).

The Hessian of the distortion D with respect to b exists for at all the globally
optimal points, and is positive definite.

The gradient of the entropy is zero for the optimal fixed rate quantizer.

The distortion at a global optimum is strictly less than the infimum over all
locally (non-global) optimal quantizers.
Then there exists such that for all < , a globally optimal fixed rate quantizer
is also (globally) optimal for the variable-rate case.
Proof. We call the distortion for the variable rate D (x, y) = D(x, y) + H(y), where
D(x, y) is the fixed rate distortion.
Let [x , y ] be a generic globally optimal fixed rate quantizer.
Since D(x, y)|[x ,y ] = 0, H(y)|y = 0, the Hessian with respect to b is positive
definite, we can find and such that for all y with 0 < kb0 bk < , all x, and all
< ,
D (x, y) > D (x , y ).
For y such that kb0 bk > and all x, let D(x , y ) inf(D(x, y)) = , < 0. Let
< .
For all y with kb0 bk > , < and all x we have

D (x, y) D(x, y) > D(x , y ) + > D (x , y )

So by picking = min(, ) the result follows.


It appears from the proof that this result can be extended to a finite set of distinct
globally optimal quantizers. We omit the proof and the statement for brevity.

References
[AW82] E. Abaya and G. Wise. Some remarks on optimal quantization. Proc. Con-
ference on Information Sciences and Systems, March 1982.

[BV03] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University


Press, 2003. Available at www.stanford.edu/~boyd/cvxbook.html.

[GG92] R. Gray and A. Gersho. Vector Quantization and Signal Compression.


Kluwer, 1992.

[GL03] A. Gyorgy and T. Linder. Codecell convexity in optimal entropy-constrained


vector quantization. IEEE Transactions on Information Theory, 49(7):1821
1828, July 2003.
[Kie83] J. C. Kieffer. Uniqueness of locally optimal quantizer for log-concave density
and convex error weighting function. IEEE Transactions on Information
Theory, IT-29(1):4247, January 1983.

You might also like