A SHAPE-GAIN APPROACH FOR VECTOR QUANTIZATION BASED ON FLAT TORI

. In this paper we present a vector quantization framework for Gaussian sources which combines a spherical code on layers of ﬂat tori and the shape and gain technique. The basic concepts of spherical codes in tori layers are reviewed and two constructions are presented for the shape by exploiting the k/ 2-dimensional lattices D k/ 2 and A ∗ k/ 2 as its pre-image. A scalar quantizer is optimized for the gain by using the Lloyd-Max algorithm for a given rate. The computational complexity of the quantization process is dominated by the lattice decoding process, which is linear for the D k/ 2 lattice and quadratic for the A ∗ k/ 2 lattice. The proposed quantizer is described in details and some numerical results are presented in terms of the SNR as a function of the quantization rate, in bits per dimension. The results show that the quantizer designed from the D 4 lattice outperform previous records when the rate is equal to 1 bit per dimension. These quantizer also outperform the quantizers designed from the dual lattice A ∗ for all rates tested. In general the two proposed frameworks perform within 2 dB of the rate distortion function, which may be a good trade-oﬀ considering their low computational complexity.


Introduction
The digital representation of a large multidimensional data set by a finite (or enumerable) set of k-dimensional vectors is called vector quantization. More specifically, given an input vector x ∈ R k , the vector quantization is a mapping Q : R k → C that associates x to the closest vectorx ∈ C, where C is a predefined set, usually designed according to some specific criteria.
There are three main underlying issues in projecting a source quantization: (i) design the quantization scheme; (ii) measure the average distortion between all possible inputs and their quantized version; (iii) deal with the computational cost (memory and processing time) to encode and decode each input. In general, issues (ii) and (iii) are conflicting, since it is possible to reduce the distortion by increasing the cardinality of C, i.e., increasing the quantization rate, or by designing sophisticated schemes in high dimensional spaces, which usually costs in processing time.
Several quantization schemes are proposed in the literature. A comprehensive reference can be found in [4]. In this paper we focus on the quantization of a memoryless Gaussian source, which naturally arises in numerous applications. For this case, it was proposed, in [7], a fixed-rate shape and gain quantizer, which exploits wrapped Leech lattice spherical code [5]. The authors demonstrated a signal-to-quantization-noise ratio within 1 dB of the distortion-rate function for rates above 1 bit per sample.
In this paper we start from the same shape and gain quantization framework as in [7], but we propose the use of a different spherical code, built on layers of flat tori [12], constructed from the lattices D n and A * n . Two main reasons were considered to choose these two lattices: (i) both have a low complexity decoding algorithm, it means that it is computationally feasible to find the closest lattice point, which is an important requirement for the quantization process. (ii) These lattices have the best records for sphere packing (D n , n = {3, 4, 5}) and for sphere covering (A * n , n = {2, 3, · · · , 8, 12, 16}), for dimensions . Thus, one secondary goal of this paper is to investigate which one of these two lattice has a better performance for the vector quantization approach proposed.
The rest of the paper is organized as follows: in Section 2 we have gathered the main background results used in the article. Section 3 is dedicated to present the shape and gain quantization framework based on spherical codes in layers of flat tori. The computational results are presented and discussed in Section 4, as well as some comparisons with other vector quantization benchmark. Finally, in Section 5 we summarize the conclusions.

Background
2.1. The shape and gain quantization. The shape and gain vector quantization consists of decomposing x ∈ R k into a scalar factor g = x , called gain, and a vector s = x/ x , called shape, so x = gs. The quantizer maps x into a vector x =ĝŝ ∈ R k , whereĝ is a quantization of the gain g andŝ is the closest point to s that belongs to a k-dimensional spherical code C(k, M ), of cardinality M .
x =ĝŝ x = gŝ s s Figure 1. Illustration of the quantization process in R 2 .
The Figure 1 illustrates a quantization of a vector x = gs ∈ R 2 using the shape and gain strategy. The source point x is mapped tox and the quantizer's performance is measured in terms of mean squared error (M SE) of the distortion per dimension, i.e., Two processes must be carried out to design a shape and gain quantizer, one for the gain and another for the shape. In this paper, the gain is quantized using a scalar quantization optimized by the Lloyd-Max algorithm and, for the shape, it is proposed a spherical code, constructed on layers of flat tori [12], based on the image of lattice points D k/2 and A * k/2 , which are described in the next section. 2.2. Lattices. A k-dimensional lattice is defined to be a subset of R n , n ≥ k, given by the integral linear combinations of a set of k linearly independent vectors where the matrix B = [b 1 ; b 2 ; · · · ; b k ] ∈ R k×n is called the generator matrix of lattice Λ. The dual lattice Λ * is the set of all vectors v ∈ R n such that v, λ ∈ Z, for all λ ∈ Λ.
The Voronoi region of a lattice point λ ∈ Λ is defined by Each lattice point belongs to only one Voronoi region and the union of those regions fills R k . The volume of Λ, which is equal to volume of the Voronoi region, is given by Lattices have been successfully used in many applications [13], including the classical spherical packing sphere covering problems. In the context of quantization, lattice points can be considered as a codebook for source quantization [4]. The lattice quantizer performance is measured in terms of the normalized second moment and V 0 is the Voronoi region around 0.
On the other hand, lattices can be used for designing spherical codes [12] that will be considered as the codebook for quantization in the shape and gain approach, which is the strategy of this paper. In what follows we describe the lattices D k and A * k that will be explored for the constructions presented in this study. The lattice D k , for k ≥ 3, is defined to be the set of all integer k-tuples, such that the sum of the their coordinates is even, i.e., The lattice A k is defined to be the set of points in R k+1 , for all k 1, such that the sum of the their coordinates is zero. The dual lattice A * k , can be written as The reason we chose lattices D k and A * k is because they have somehow complementary results in terms of packing and covering efficiency. While D k provides the densest packing for k = {3, 4, 5} and the best records for quantization in 4 th dimension, the A * k gives the thinnest covering for k = {2, 3, · · · , 8, 12, 16} [2]. As discussed in [13], quantization is closer to covering problem than packing, since the covering radius r cov can provide an upper bound for the distortion in the quantization process, since ||x x x −x x x|| ≤ r cov . The Figure 2 illustrates the relation between r cov , r pack and the efficiency radius r ef f , which is defined as the radius of a sphere which has the same volume of the Voronoi region. r cov r pack r σ 2 r ef f Figure 2. Equivalent radiuses of a rectangular cell. The figure shows r cov , r pack and r ef f as well as r σ 2 (the radius of a ball with the same second moment). We clearly have r pack < r ef f < r σ 2 < r cov [13].
Thus, an underling question behind this research is which lattice (D k or A * k ) will have the best performance when used as a pre-image of a spherical code for the shape and gain vector quantization approach. In order to answer this question we will use spherical codes build on layers of flat tori, that are review in the next section.
2.3. Spherical coding on layers of tori. Spherical codes are points on the (k-1)-dimensional surface of the unit sphere S k−1 ∈ R k and have been used in many applications in information theory, especially when involving Gaussian sources [10,12].
The construction of spherical codes is a challenge problem that has been addressed in many ways. The techniques used include permutation [1], optimization [11,3], and lattice-based designings [5,6]. Among these constructions, the spherical codes on layers of flat tori [12] have been proved to be a good option for the packing problem.
In what follows, we present a brief review, based in [12], on the construction of k-dimensional spherical codes on layers of flat tori based on the lattices A * k/2 .
Let c = (c 1 , c 2 , . . . , c k/2 ) ∈ S k/2−1 ⊂ R k/2 be a unit vector, with c i > 0, and y = (y 1 , y 2 , . . . , y k/2 ) ∈ R k/2 . Let Φ c : R k/2 → R k be a mapping defined by As the mapping Φ c is periodic, the torus T c is the image of the points constrained into the k/2-dimensional box P c . Since c i > 0, the set of vectors that lie on surface S k/2−1 that have only positive coordinates defines a spherical code, which is denoted by C(k/2, M T ) + , where M T is the number of tori in the code. The Figure 3 illustrates a spherical code C(3, 100) + generated by the LBG iterative vector quantizer [13]. This code has 100 points in R 3 and since all points have positive coordinate, and it defines 100 tori in R 6 . Each flattened torus T c results in a box P c , that will be filled with a set of points from the lattice A * k/2 , suitably rescaled to achieve a desirable minimum distance. Then, the mapping Φ c embed the points in P c on S k−1 , defining thus a spherical code C T (k, M ). The Figure 4 illustrates the process of construction of one of the layer of the spherical code C T (4, M ).

2.4.
Decoding on layers of flat tori. Let s = {s 1 , s 2 , · · · , s k } be a kdimensional unit vector s = x/||x||. The first step in the decoding of s in a spherical code on layers of tori consists in identifying the nearest torus. We can do that by where γ i = s 2 2i−1 + s 2 2i . Thus, the vector s belongs to a flat torus of radius γ = γ 1 , . . . , γ k/2 . In general, the vector γ does not belong to generating set C(k/2, M T ) + of the spherical code C T (k, M ), but we can search in C(k/2, M ) + the point c ξ such that γ − c ξ ≤ γ − c j , for all c j ∈ C(k/2, M T ) + . After the nearest torus c ξ is found, we project the vector s in the nearest torus, obtaining . The next step consists in finding the nearest point of the flat torus T c ξ of s ξ . As the torus T c ξ is obtained as the image of the box P c ξ ⊂ R k , we realize this process in the half of the dimension.
We must determine in T c ξ the pre-image of c inside of the lattice generated from c ξ by equation i.e., y = (y 1 , . . . , y k/2 ) is the projection of s ξ inside of the box k/2-dimensional P c ξ , that is, the flattening of the torus T c ξ . Let a = (a 1 , . . . , a k/2 ) be the nearest lattice point of y. We defineŝ = Φ(a).
In the next section we detail the process of designing a vector quantization on layers of flat tori and also present the respective decoding process.

Shape and gain vector quantization based on flat tori
An efficient quantizer should be designed in order to minimize the distortion D, given by equation (1) with the lowest possible computational complexy. For Gaussian sources, the distortion D is lower bounded by the rate-distortion function given by Alternatively, the M SE can be expressed in terms of the signal-to-noise ratio, in decibels (dB), by (7) SNR = 10 log 10 In this case, the rate-distortion bound implies that SN R ≤ 6.02R [10]. As presented in Section 2.1, a shape and gain quantization scheme is based on two independent process: the quantization of the gain and quantization of the shape. The quantizer of the gain can be designed using some optimized scalar quantizer. In this paper, we used a scalar quantizer obtained by the Lloyd-Max algorithm. To quantize the shape, we will resort to the spherical codes on layers of tori constructed specifically to this purpose.
The codebook will be given by the Cartesian product of the gain codebook C g with the shape codebook C s and the number of codewords, C = C g × C s , will be N c = N g N s , where N g and N s are the number of codewords in the gain and shape codebook, respectively. The process of designing a spherical quantizer using layers of flat tori is summarized in the next section.
3.1. Designing a spherical quantizer in layers of flat tori. Given a rate R, we have to define an allocation of R between the shape rate R s and the gain rate R g , such that R = R s + R g . Therefore, there is a total of N = 2 kR points to be distributed between the codebooks C g and C s . The Lloyd-Max algorithm can be applied to design the gain codebook, containing N g = 2 kRg points. For the shape, select an appropriated spherical code, C(k/2, M T ) + , in dimension k/2, with positive coordinates to define the tori and distribute N s = 2 kR s lattice points proportionality to the volume of each torus, such that M T j=1 M j ≤ 2 kR s . Then, apply the mapping Φ c (4) to embed the tori in the surface of the unit sphere S k−1 ⊂ R k . The spherical code C T (k, M ) will be given by The quantization of a k-dimensional vector x ∈ R k is summarized in the following steps, which is exemplified by Figure 5: • Given a random vector x ∈ R k , compute g = x and s = x g . • Use the gain codebook to quantize g toĝ.
• Find the index ξ that identifies the closest torus T c ξ from s.
• Project the coordinate of s within of the box P c ξ and find the closest lattice point a. • Calculateŝ = Φ c ξ (a).
The decoding of x consists in computingx =ĝŝ and the distortion of the process is measured in terms of M SE (1) or SN R (7). In the next section we compare some computational results obtained with the approach proposed in this paper with some benchmarks.

Computational results
In order to assess the quantizer proposed in Section 3, we performed several computational simulations in terms of the signal-to-quantization-noise ratio as a function of the rate (in bits per dimension). We have implemented two different spherical codes on layers of flat tori: one constructed from the lattice D 4 and another from the lattice A * n , for n = {2, 3, 4}. The codebook of the vector quantizer was experimentally optimized and its performance was evaluated over with 500000 independent and identically distributed Gaussian random samples, divided into 125000 4-dimensional, 83333 6-dimensional and 62500 8-dimensional vectors and encoded as described in Subsection 3.1.
The rate allocation between gain R g and shape R s were numerically optimized in order to minimize the distortion of the proposed vector quantizer for a suitable code C(k/2, M T ) + ∈ S k/2−1 .
The main results are summarized in Table 1. The first row shows the ratedistortion bound (6) and the second row shows the results of the a similar vector quantization presented in [7], which is the principal benchmark for this paper. The 3 rd and 4 th rows present the results of the vector quantization proposed in this paper, based on lattices D 4 and A * n , respectively. The last two rows show the results of scalar quantizers.
It is possible to see that the proposed vector quantization based on D 4 has achieved the best record for rate equal to 1 bit per dimension, but has been overcome by W Λ24 for further dimensions. However the performance of the proposed VQ have outperformed all the scalar quantization (EQ) and most results are within 2 dB of the rate-distortion bound. We can conclude also that the construction based on the D 4 lattice outperformed the construction based on the A * n lattice. One important parameter to be settled in the construction of spherical codes in layers of flat tori is the number of tori M T . If M T is low we may have a poor foliation of the sphere and there will be regions too far from the closest torus. On the other hand, when M T is to large, there will be few points inside each torus (given that the rate is fixed) which may imply in a poor distribution of points in the surface in S k−1 . Aiming to improve the SN R, we have performed some computational simulations varying the parameter M T .
The results presented in Figure 6 suggest the optimal number of tori for R s = 3 in dimensions k = 4, 6, 8 for the lattice A * n and, as we should expect, the optimal number of tori increase with the dimension.

Conclusions
In this paper we presented a shape-gain quantizer using spherical codes in layers of flat tori, designed as image of the underlying lattices D 4 and A * k/2 , in dimensions k = {4, 6, 8}. The rate allocation and the number of tori were computationally optimized and simulation results show that the scheme based on the D 4 lattice achieved the best record for the signal-to-quantization-noise ratio for rate of 1 bit per dimension and also have outperformed the scheme based on the dual lattice A * n . In general the proposed quantizer performs within 2 dB of the rate distortion function which may be a good trade-off considering its computational complexity, that is of order O(4n) for schemes based on the D n lattice.