Lattice Reduction and Preconditioning Xiao-Wen Chang Joint work - - PowerPoint PPT Presentation

lattice reduction and preconditioning
SMART_READER_LITE
LIVE PREVIEW

Lattice Reduction and Preconditioning Xiao-Wen Chang Joint work - - PowerPoint PPT Presentation

Lattice Reduction and Preconditioning Xiao-Wen Chang Joint work with M. Al Borne, W.-Y. Ku, Y. Xiao and X. Xie Computer Science, McGill University, Montreal, Canada Fields Institute Workshop on Hybrid Methodologies for Symbolic-Numeric


slide-1
SLIDE 1

Lattice Reduction and Preconditioning

Xiao-Wen Chang Joint work with M. Al Borne, W.-Y. Ku, Y. Xiao and X. Xie

Computer Science, McGill University, Montreal, Canada

Fields Institute Workshop on Hybrid Methodologies for Symbolic-Numeric Computation November 16-19, 2011

X.-W. Chang Lattice Reduction and Preconditioning 1/33

slide-2
SLIDE 2

Outline

Part 1: Lattice reduction

1

Introduction

2

A floating point partial LLL reduction algorithm

3

A floating point blocked LLL reduction algorithm

4

Numerical test results

Part 2: Lattice preconditioning

1

Motivations

2

Some lattice preconditioning techniques.

3

Numerical test results

Summary and future work

X.-W. Chang Lattice Reduction and Preconditioning 2/33

slide-3
SLIDE 3

Outline

Part 1: Lattice reduction

1

Introduction

2

A floating point partial LLL reduction algorithm

3

A floating point blocked LLL reduction algorithm

4

Numerical test results

Part 2: Lattice preconditioning

1

Motivations

2

Some lattice preconditioning techniques.

3

Numerical test results

Summary and future work

X.-W. Chang Lattice Reduction and Preconditioning 2/33

slide-4
SLIDE 4

Outline

Part 1: Lattice reduction

1

Introduction

2

A floating point partial LLL reduction algorithm

3

A floating point blocked LLL reduction algorithm

4

Numerical test results

Part 2: Lattice preconditioning

1

Motivations

2

Some lattice preconditioning techniques.

3

Numerical test results

Summary and future work

X.-W. Chang Lattice Reduction and Preconditioning 2/33

slide-5
SLIDE 5

Outline

Part 1: Lattice reduction

1

Introduction

2

A floating point partial LLL reduction algorithm

3

A floating point blocked LLL reduction algorithm

4

Numerical test results

Part 2: Lattice preconditioning

1

Motivations

2

Some lattice preconditioning techniques.

3

Numerical test results

Summary and future work

X.-W. Chang Lattice Reduction and Preconditioning 2/33

slide-6
SLIDE 6

Lattice reduction — introduction

Let B ∈ Rm×n be of full column rank. Lattice generated by B: L(B) = {Bx : x ∈ Zn}. Lattice reduction is to find a unimodular matrix Z (i.e., Z ∈ Zn×n, | det(Z)| = 1) such that

1 the columns of BZ are fairly orthogonal to each other; 2 the columns of BZ are short.

For simplicity, we assume B is a square matrix here. Applications: Cryptology, algorithmic number theory, communications, GPS etc

X.-W. Chang Lattice Reduction and Preconditioning 3/33

slide-7
SLIDE 7

Lattice reduction — introduction

Let B ∈ Rm×n be of full column rank. Lattice generated by B: L(B) = {Bx : x ∈ Zn}. Lattice reduction is to find a unimodular matrix Z (i.e., Z ∈ Zn×n, | det(Z)| = 1) such that

1 the columns of BZ are fairly orthogonal to each other; 2 the columns of BZ are short.

For simplicity, we assume B is a square matrix here. Applications: Cryptology, algorithmic number theory, communications, GPS etc

X.-W. Chang Lattice Reduction and Preconditioning 3/33

slide-8
SLIDE 8

Lattice reduction — introduction

Let B ∈ Rm×n be of full column rank. Lattice generated by B: L(B) = {Bx : x ∈ Zn}. Lattice reduction is to find a unimodular matrix Z (i.e., Z ∈ Zn×n, | det(Z)| = 1) such that

1 the columns of BZ are fairly orthogonal to each other; 2 the columns of BZ are short.

For simplicity, we assume B is a square matrix here. Applications: Cryptology, algorithmic number theory, communications, GPS etc

X.-W. Chang Lattice Reduction and Preconditioning 3/33

slide-9
SLIDE 9

Lattice reduction — introduction

Let B ∈ Rm×n be of full column rank. Lattice generated by B: L(B) = {Bx : x ∈ Zn}. Lattice reduction is to find a unimodular matrix Z (i.e., Z ∈ Zn×n, | det(Z)| = 1) such that

1 the columns of BZ are fairly orthogonal to each other; 2 the columns of BZ are short.

For simplicity, we assume B is a square matrix here. Applications: Cryptology, algorithmic number theory, communications, GPS etc

X.-W. Chang Lattice Reduction and Preconditioning 3/33

slide-10
SLIDE 10

Lattice reduction — introduction, cont’d

A reduction process can often be casted as a matrix factorization: QTBZ = R,

  • r B = QRZ−1

Q ∈ Rn×n is orthogonal, Z ∈ Zn×n is unimodular, R ∈ Rn×n is upper triangular. The most well-known lattice reduction: LLL reduction (Lenstra, Lenstra, Lov´ asz, ’82) |rij| ≤ 1 2 |rii|, j = i + 1 : n (size reduced condition) δ r2

i,i ≤ r2 i,i+1 + r2 i+1,i+1,

1/4 < δ ≤ 1 (Lov´ asz’s condition)

X.-W. Chang Lattice Reduction and Preconditioning 4/33

slide-11
SLIDE 11

Lattice reduction — introduction, cont’d

A reduction process can often be casted as a matrix factorization: QTBZ = R,

  • r B = QRZ−1

Q ∈ Rn×n is orthogonal, Z ∈ Zn×n is unimodular, R ∈ Rn×n is upper triangular. The most well-known lattice reduction: LLL reduction (Lenstra, Lenstra, Lov´ asz, ’82) |rij| ≤ 1 2 |rii|, j = i + 1 : n (size reduced condition) δ r2

i,i ≤ r2 i,i+1 + r2 i+1,i+1,

1/4 < δ ≤ 1 (Lov´ asz’s condition)

X.-W. Chang Lattice Reduction and Preconditioning 4/33

slide-12
SLIDE 12

Literature on algorithms for LLL reduction and variants

Nguyen and Vall´ ee (ed): The LLL Algorithm: Survey and Applications (09). Lenstra, Lenstra, Lov´ asz (82), Kaltofen (83), Schnorr (87, 88, 05), Sch¨

  • nhage (91), Yap (92), Cohen (93), Schnorr & Euchner (94),

Storjohann (96), Eisenbrand & Rote (01), Koy & Schnorr (01), Nguyen & Stehl´ e (05, 06, 09), Ling & Howgrave-Graham (07), Villard (07) Morel, Stehl´ e & Villard (09), Novocin, Stehl´ e & Villard (11) Most of these algorithms consider integer B to try to find a correct LLL reduced basis.

X.-W. Chang Lattice Reduction and Preconditioning 5/33

slide-13
SLIDE 13

Lattice reduction: our goal

To develop faster floating point LLL reduction algs for real B. We will present a floating point partial LLL reduction algorithm a floating point blocked LLL reduction algorithm Due to rounding errors, a correct LLL reduced basis is not guaranteed by the algorithms. Two uses of the floating point LLL reduction:

1 Used to compute a correct LLL reduced basis 2 Used as a preprocessing step in solving the integer least

squares (ILS) problem: min

x∈Zn y − Bx2.

Here the LLL reduction is to make an ILS solver faster.

X.-W. Chang Lattice Reduction and Preconditioning 6/33

slide-14
SLIDE 14

Lattice reduction: our goal

To develop faster floating point LLL reduction algs for real B. We will present a floating point partial LLL reduction algorithm a floating point blocked LLL reduction algorithm Due to rounding errors, a correct LLL reduced basis is not guaranteed by the algorithms. Two uses of the floating point LLL reduction:

1 Used to compute a correct LLL reduced basis 2 Used as a preprocessing step in solving the integer least

squares (ILS) problem: min

x∈Zn y − Bx2.

Here the LLL reduction is to make an ILS solver faster.

X.-W. Chang Lattice Reduction and Preconditioning 6/33

slide-15
SLIDE 15

Lattice reduction: our goal

To develop faster floating point LLL reduction algs for real B. We will present a floating point partial LLL reduction algorithm a floating point blocked LLL reduction algorithm Due to rounding errors, a correct LLL reduced basis is not guaranteed by the algorithms. Two uses of the floating point LLL reduction:

1 Used to compute a correct LLL reduced basis 2 Used as a preprocessing step in solving the integer least

squares (ILS) problem: min

x∈Zn y − Bx2.

Here the LLL reduction is to make an ILS solver faster.

X.-W. Chang Lattice Reduction and Preconditioning 6/33

slide-16
SLIDE 16

Lattice reduction: our goal

To develop faster floating point LLL reduction algs for real B. We will present a floating point partial LLL reduction algorithm a floating point blocked LLL reduction algorithm Due to rounding errors, a correct LLL reduced basis is not guaranteed by the algorithms. Two uses of the floating point LLL reduction:

1 Used to compute a correct LLL reduced basis 2 Used as a preprocessing step in solving the integer least

squares (ILS) problem: min

x∈Zn y − Bx2.

Here the LLL reduction is to make an ILS solver faster.

X.-W. Chang Lattice Reduction and Preconditioning 6/33

slide-17
SLIDE 17

LLL reduction

A typical LLL algorithm first computes the QR factorization: B = QR. Then it works on R. To meet the size reduced condition, one applies elementary unimodular transformations Zij = I − µeieT

j ,

ei = [0, . . . , 0, 1, 0, . . . , 0]T Apply Zij to R: ¯ R = RZij = R − µReieT

j

The entries of ¯ R are the same as the corresponding ones of R, except: ¯ rkj = rkj − µrki, k = 1, . . . , i If µ = ⌊rij/rii⌉, then |¯ rij| ≤ |¯ rii|/2

X.-W. Chang Lattice Reduction and Preconditioning 7/33

slide-18
SLIDE 18

LLL reduction

A typical LLL algorithm first computes the QR factorization: B = QR. Then it works on R. To meet the size reduced condition, one applies elementary unimodular transformations Zij = I − µeieT

j ,

ei = [0, . . . , 0, 1, 0, . . . , 0]T Apply Zij to R: ¯ R = RZij = R − µReieT

j

The entries of ¯ R are the same as the corresponding ones of R, except: ¯ rkj = rkj − µrki, k = 1, . . . , i If µ = ⌊rij/rii⌉, then |¯ rij| ≤ |¯ rii|/2

X.-W. Chang Lattice Reduction and Preconditioning 7/33

slide-19
SLIDE 19

LLL reduction

To meet Lov´ asz’s condition, one interchanges columns of R. Suppose that we interchange columns k − 1 and k of R. Then R is no longer upper triangular. We bring R back to an upper triangular matrix by using QR factorization: ¯ R = Gk−1,kRPk−1,k where Gk−1,k is orthogonal, Pk−1,k is a permutation matrix.

X.-W. Chang Lattice Reduction and Preconditioning 8/33

slide-20
SLIDE 20

LLL reduction

To meet Lov´ asz’s condition, one interchanges columns of R. Suppose that we interchange columns k − 1 and k of R. Then R is no longer upper triangular. We bring R back to an upper triangular matrix by using QR factorization: ¯ R = Gk−1,kRPk−1,k where Gk−1,k is orthogonal, Pk−1,k is a permutation matrix.

X.-W. Chang Lattice Reduction and Preconditioning 8/33

slide-21
SLIDE 21

Original LLL reduction algorithm (1982)

1: Apply Gram-Schmidt orthogonalization to obtain B = QR 2: Set Z = In, k = 2 3: while k ≤ n do 4:

Reduce rk−1,k by Zk−1,k and update Z

5:

if δ r2

k−1,k−1 > r2 k−1,k + r2 k,k then

6:

Permute columns k − 1 and k of R and triangularize R: R=Gk−1,kRPk−1,k, Z = ZPk−1,k

7:

k = k − 1, when k > 2

8:

else

9:

Reduce rik by Zik for i = k − 2 : −1 : 1 and update Z

10:

k = k + 1

11:

end if

12: end while

X.-W. Chang Lattice Reduction and Preconditioning 9/33

slide-22
SLIDE 22

Partial LLL reduction

Motivation One typical approach to solving the ILS problem is enumeration search. We can show that the size reductions on any off-diagonal entries, except the super-diagonal entries, have no effect on a typical search process. Size reductions on the super-diagonal entries may be needed as they may affect the diagonal entries. Ling and Howgrave-Graham (’07) suggested removing the size reductions on off-diagonal entries, except the super-diagonal entries, i.e., removing step 9 in the original LLL algorithm. But removing step 9 may cause a numerical stability problem.

X.-W. Chang Lattice Reduction and Preconditioning 10/33

slide-23
SLIDE 23

Partial LLL reduction

Motivation One typical approach to solving the ILS problem is enumeration search. We can show that the size reductions on any off-diagonal entries, except the super-diagonal entries, have no effect on a typical search process. Size reductions on the super-diagonal entries may be needed as they may affect the diagonal entries. Ling and Howgrave-Graham (’07) suggested removing the size reductions on off-diagonal entries, except the super-diagonal entries, i.e., removing step 9 in the original LLL algorithm. But removing step 9 may cause a numerical stability problem.

X.-W. Chang Lattice Reduction and Preconditioning 10/33

slide-24
SLIDE 24

Partial LLL reduction

Motivation One typical approach to solving the ILS problem is enumeration search. We can show that the size reductions on any off-diagonal entries, except the super-diagonal entries, have no effect on a typical search process. Size reductions on the super-diagonal entries may be needed as they may affect the diagonal entries. Ling and Howgrave-Graham (’07) suggested removing the size reductions on off-diagonal entries, except the super-diagonal entries, i.e., removing step 9 in the original LLL algorithm. But removing step 9 may cause a numerical stability problem.

X.-W. Chang Lattice Reduction and Preconditioning 10/33

slide-25
SLIDE 25

Partial LLL reduction

Motivation One typical approach to solving the ILS problem is enumeration search. We can show that the size reductions on any off-diagonal entries, except the super-diagonal entries, have no effect on a typical search process. Size reductions on the super-diagonal entries may be needed as they may affect the diagonal entries. Ling and Howgrave-Graham (’07) suggested removing the size reductions on off-diagonal entries, except the super-diagonal entries, i.e., removing step 9 in the original LLL algorithm. But removing step 9 may cause a numerical stability problem.

X.-W. Chang Lattice Reduction and Preconditioning 10/33

slide-26
SLIDE 26

Partial LLL reduction

Motivation One typical approach to solving the ILS problem is enumeration search. We can show that the size reductions on any off-diagonal entries, except the super-diagonal entries, have no effect on a typical search process. Size reductions on the super-diagonal entries may be needed as they may affect the diagonal entries. Ling and Howgrave-Graham (’07) suggested removing the size reductions on off-diagonal entries, except the super-diagonal entries, i.e., removing step 9 in the original LLL algorithm. But removing step 9 may cause a numerical stability problem.

X.-W. Chang Lattice Reduction and Preconditioning 10/33

slide-27
SLIDE 27

Original LLL reduction algorithm (1982)

1: Apply Gram-Schmidt orthogonalization to obtain B = QR 2: Set Z = In, k = 2 3: while k ≤ n do 4:

Reduce rk−1,k by Zk−1,k and update Z

5:

if δ r2

k−1,k−1 > r2 k−1,k + r2 k,k then

6:

Permute columns k − 1 and k of R and triangularize R: R=Gk−1,kRPk−1,k, Z = ZPk−1,k

7:

k = k − 1, when k > 2

8:

else

9:

Reduce rik by Zik for i = k − 2 : −1 : 1 and update Z

10:

k = k + 1

11:

end if

12: end while

X.-W. Chang Lattice Reduction and Preconditioning 11/33

slide-28
SLIDE 28

A partial LLL reduction algorithm

Our modifications on the original LLL algorithm: Use Householder transformations to compute the QR factorization of B instead of the Gram-Schmidt method. Benefit: more efficient, good for the orthogonality of Q. Gram-Schmidt QR: 2n3 flops; Householder QR: 4n3/3 flops. Q from Gram-Schmidt may significantly lose orthogonality . In computing Householder QR, use minimum column pivoting, i.e., in the k-th step, choose a column of B among columns k : n to be the k-th column such that |rkk| is minimal. Benefit: This can reduce the column swaps in the reduction process.

X.-W. Chang Lattice Reduction and Preconditioning 12/33

slide-29
SLIDE 29

A partial LLL reduction algorithm

Our modifications on the original LLL algorithm: Use Householder transformations to compute the QR factorization of B instead of the Gram-Schmidt method. Benefit: more efficient, good for the orthogonality of Q. Gram-Schmidt QR: 2n3 flops; Householder QR: 4n3/3 flops. Q from Gram-Schmidt may significantly lose orthogonality . In computing Householder QR, use minimum column pivoting, i.e., in the k-th step, choose a column of B among columns k : n to be the k-th column such that |rkk| is minimal. Benefit: This can reduce the column swaps in the reduction process.

X.-W. Chang Lattice Reduction and Preconditioning 12/33

slide-30
SLIDE 30

A partial LLL reduction algorithm

Our modifications on the original LLL algorithm: Use Householder transformations to compute the QR factorization of B instead of the Gram-Schmidt method. Benefit: more efficient, good for the orthogonality of Q. Gram-Schmidt QR: 2n3 flops; Householder QR: 4n3/3 flops. Q from Gram-Schmidt may significantly lose orthogonality . In computing Householder QR, use minimum column pivoting, i.e., in the k-th step, choose a column of B among columns k : n to be the k-th column such that |rkk| is minimal. Benefit: This can reduce the column swaps in the reduction process.

X.-W. Chang Lattice Reduction and Preconditioning 12/33

slide-31
SLIDE 31

A partial LLL reduction algorithm

Our modifications on the original LLL algorithm: Use Householder transformations to compute the QR factorization of B instead of the Gram-Schmidt method. Benefit: more efficient, good for the orthogonality of Q. Gram-Schmidt QR: 2n3 flops; Householder QR: 4n3/3 flops. Q from Gram-Schmidt may significantly lose orthogonality . In computing Householder QR, use minimum column pivoting, i.e., in the k-th step, choose a column of B among columns k : n to be the k-th column such that |rkk| is minimal. Benefit: This can reduce the column swaps in the reduction process.

X.-W. Chang Lattice Reduction and Preconditioning 12/33

slide-32
SLIDE 32

A partial LLL reduction algorithm, cont’d

Perform a size reduction on rk−1,k only when Lov´ asz’s condition is not satisfied after the reduction, i.e., columns k − 1 and k would be permuted. If and only the size reduction on rk−1,k occurs, also perform size reductions on ri,k for i = k − 2 : −1 : 1. Benefit: These reduce the number of size reductions and make the algorithm as stable as the original LLL. Using Givens rotations to triangularize a 2 × 2 matrix. Benefit: Good for the orthogonality of the Q-factor.

X.-W. Chang Lattice Reduction and Preconditioning 13/33

slide-33
SLIDE 33

A partial LLL reduction algorithm, cont’d

Perform a size reduction on rk−1,k only when Lov´ asz’s condition is not satisfied after the reduction, i.e., columns k − 1 and k would be permuted. If and only the size reduction on rk−1,k occurs, also perform size reductions on ri,k for i = k − 2 : −1 : 1. Benefit: These reduce the number of size reductions and make the algorithm as stable as the original LLL. Using Givens rotations to triangularize a 2 × 2 matrix. Benefit: Good for the orthogonality of the Q-factor.

X.-W. Chang Lattice Reduction and Preconditioning 13/33

slide-34
SLIDE 34

A partial LLL reduction algorithm, cont’d

Perform a size reduction on rk−1,k only when Lov´ asz’s condition is not satisfied after the reduction, i.e., columns k − 1 and k would be permuted. If and only the size reduction on rk−1,k occurs, also perform size reductions on ri,k for i = k − 2 : −1 : 1. Benefit: These reduce the number of size reductions and make the algorithm as stable as the original LLL. Using Givens rotations to triangularize a 2 × 2 matrix. Benefit: Good for the orthogonality of the Q-factor.

X.-W. Chang Lattice Reduction and Preconditioning 13/33

slide-35
SLIDE 35

A partial LLL reduction algorithm, cont’d

Perform a size reduction on rk−1,k only when Lov´ asz’s condition is not satisfied after the reduction, i.e., columns k − 1 and k would be permuted. If and only the size reduction on rk−1,k occurs, also perform size reductions on ri,k for i = k − 2 : −1 : 1. Benefit: These reduce the number of size reductions and make the algorithm as stable as the original LLL. Using Givens rotations to triangularize a 2 × 2 matrix. Benefit: Good for the orthogonality of the Q-factor.

X.-W. Chang Lattice Reduction and Preconditioning 13/33

slide-36
SLIDE 36

A partial LLL reduction algorithm, cont’d

Perform a size reduction on rk−1,k only when Lov´ asz’s condition is not satisfied after the reduction, i.e., columns k − 1 and k would be permuted. If and only the size reduction on rk−1,k occurs, also perform size reductions on ri,k for i = k − 2 : −1 : 1. Benefit: These reduce the number of size reductions and make the algorithm as stable as the original LLL. Using Givens rotations to triangularize a 2 × 2 matrix. Benefit: Good for the orthogonality of the Q-factor.

X.-W. Chang Lattice Reduction and Preconditioning 13/33

slide-37
SLIDE 37

A floating point partial LLL (PLLL) reduction algorithm

1: Compute QR with minimum pivoting: QTBZ = R 2: k = 2 3: while k ≤ n do 4:

µ = ⌊rk−1,k/rk−1,k−1⌉, ¯ rk−1,k = rk−1,k − µrk−1,k−1

5:

if δ r2

k−1,k−1 > ¯

r2

k−1,k + r2 k,k then

6:

if |µ| ≥ 1 then

7:

Reduce ri,k for i = k − 1 : −1 : 1 and update Z

8:

end if

9:

Permute columns k − 1 and k of R and triangularize R:

10:

R = Gk−1,kRPk−1,k, Z = ZPk−1,k

11:

k = k − 1, when k > 2

12:

else

13:

k = k + 1

14:

end if

15: end while

X.-W. Chang Lattice Reduction and Preconditioning 14/33

slide-38
SLIDE 38

A floating point partial LLL reduction algorithm, cont’d

Remark If we want to get a complete LLL reduction, we add one step to the PLLL algorithm to do size reduction for the entries in R which are not size reduced. The resulted algorithm is denoted by PLLL+.

X.-W. Chang Lattice Reduction and Preconditioning 15/33

slide-39
SLIDE 39

Outline

Part 1: Lattice reduction

1

Introduction

2

A floating point partial LLL reduction algorithm

3

A floating point blocked LLL reduction algorithm

4

Numerical test results

Part 2: Lattice preconditioning

1

Motivations

2

Some lattice preconditioning techniques.

3

Numerical test results

Summary and future work

X.-W. Chang Lattice Reduction and Preconditioning 16/33

slide-40
SLIDE 40

Floating point blocked LLL reduction

Motivation Computer memories are built in hierarchies. An ill-designed algorithm may spend most of its time moving data from one level to another level in memory hierarchies instead of doing useful floating point operations. Numerical linear algebra packages such as LAPACK use block matrix operations, e.g., matrix-matrix multiplications. These block operations, called BLAS (basic linear algebra subroutines), have been optimized for each architecture by hardware vendors to account for the memory hierarchy. FFLAS-FFPACK provides a suite of BLAS over finite fields. LinBox, IML etc use BLAS.

X.-W. Chang Lattice Reduction and Preconditioning 17/33

slide-41
SLIDE 41

Floating point blocked LLL reduction

Motivation Computer memories are built in hierarchies. An ill-designed algorithm may spend most of its time moving data from one level to another level in memory hierarchies instead of doing useful floating point operations. Numerical linear algebra packages such as LAPACK use block matrix operations, e.g., matrix-matrix multiplications. These block operations, called BLAS (basic linear algebra subroutines), have been optimized for each architecture by hardware vendors to account for the memory hierarchy. FFLAS-FFPACK provides a suite of BLAS over finite fields. LinBox, IML etc use BLAS.

X.-W. Chang Lattice Reduction and Preconditioning 17/33

slide-42
SLIDE 42

Floating point blocked LLL reduction

Motivation Computer memories are built in hierarchies. An ill-designed algorithm may spend most of its time moving data from one level to another level in memory hierarchies instead of doing useful floating point operations. Numerical linear algebra packages such as LAPACK use block matrix operations, e.g., matrix-matrix multiplications. These block operations, called BLAS (basic linear algebra subroutines), have been optimized for each architecture by hardware vendors to account for the memory hierarchy. FFLAS-FFPACK provides a suite of BLAS over finite fields. LinBox, IML etc use BLAS.

X.-W. Chang Lattice Reduction and Preconditioning 17/33

slide-43
SLIDE 43

Floating point blocked LLL reduction

Motivation Computer memories are built in hierarchies. An ill-designed algorithm may spend most of its time moving data from one level to another level in memory hierarchies instead of doing useful floating point operations. Numerical linear algebra packages such as LAPACK use block matrix operations, e.g., matrix-matrix multiplications. These block operations, called BLAS (basic linear algebra subroutines), have been optimized for each architecture by hardware vendors to account for the memory hierarchy. FFLAS-FFPACK provides a suite of BLAS over finite fields. LinBox, IML etc use BLAS.

X.-W. Chang Lattice Reduction and Preconditioning 17/33

slide-44
SLIDE 44

Floating point blocked LLL reduction, cont’d

Idea: Our blocked LLL algorithm is a mimic of PLLL. First we need an algorithm to compute the blocked QR factorization with minimum column pivoting. We can easily modify the blocked QR factorization with maximum column pivoting algorithm by Quintana-Orti, Sun, Bischof (’98). So we have QTBZ = R where Q is orthogonal, Z is a permutation matrix, and R is upper triangular. Now we work on R.

X.-W. Chang Lattice Reduction and Preconditioning 18/33

slide-45
SLIDE 45

Floating point blocked LLL reduction, cont’d

Idea: Our blocked LLL algorithm is a mimic of PLLL. First we need an algorithm to compute the blocked QR factorization with minimum column pivoting. We can easily modify the blocked QR factorization with maximum column pivoting algorithm by Quintana-Orti, Sun, Bischof (’98). So we have QTBZ = R where Q is orthogonal, Z is a permutation matrix, and R is upper triangular. Now we work on R.

X.-W. Chang Lattice Reduction and Preconditioning 18/33

slide-46
SLIDE 46

Floating point blocked LLL reduction, cont’d

Idea: Our blocked LLL algorithm is a mimic of PLLL. First we need an algorithm to compute the blocked QR factorization with minimum column pivoting. We can easily modify the blocked QR factorization with maximum column pivoting algorithm by Quintana-Orti, Sun, Bischof (’98). So we have QTBZ = R where Q is orthogonal, Z is a permutation matrix, and R is upper triangular. Now we work on R.

X.-W. Chang Lattice Reduction and Preconditioning 18/33

slide-47
SLIDE 47

Floating point blocked LLL reduction, cont’d

Idea: Our blocked LLL algorithm is a mimic of PLLL. First we need an algorithm to compute the blocked QR factorization with minimum column pivoting. We can easily modify the blocked QR factorization with maximum column pivoting algorithm by Quintana-Orti, Sun, Bischof (’98). So we have QTBZ = R where Q is orthogonal, Z is a permutation matrix, and R is upper triangular. Now we work on R.

X.-W. Chang Lattice Reduction and Preconditioning 18/33

slide-48
SLIDE 48

Floating point blocked LLL reduction, cont’d

Partition n × n R as follows (here the block size s = n/3):

❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅

X.-W. Chang Lattice Reduction and Preconditioning 19/33

slide-49
SLIDE 49

Floating point blocked LLL reduction, cont’d

R = R11 R12 R22

  • ,

s × s R11 First deal with 1st block column of R: Apply PLLL to R11: R11 := ¯ QT

11R11¯

Z11 Update R12 by ¯ QT

11: R12 := ¯

QT

11R12

X.-W. Chang Lattice Reduction and Preconditioning 20/33

slide-50
SLIDE 50

Floating point blocked LLL reduction, cont’d

R = R11 R12 R22

  • ,

s × s R11 First deal with 1st block column of R: Apply PLLL to R11: R11 := ¯ QT

11R11¯

Z11 Update R12 by ¯ QT

11: R12 := ¯

QT

11R12

X.-W. Chang Lattice Reduction and Preconditioning 20/33

slide-51
SLIDE 51

Floating point blocked LLL reduction, cont’d

R = R11 R12 R22

  • ,

s × s R11 First deal with 1st block column of R: Apply PLLL to R11: R11 := ¯ QT

11R11¯

Z11 Update R12 by ¯ QT

11: R12 := ¯

QT

11R12

X.-W. Chang Lattice Reduction and Preconditioning 20/33

slide-52
SLIDE 52

Floating point blocked LLL reduction, cont’d

R = R11 R12 R22

  • ,

s × s R11 First deal with 1st block column of R: Apply PLLL to R11: R11 := ¯ QT

11R11¯

Z11 Update R12 by ¯ QT

11: R12 := ¯

QT

11R12

X.-W. Chang Lattice Reduction and Preconditioning 20/33

slide-53
SLIDE 53

Floating point blocked LLL reduction, cont’d

Move half block size to the right and re-partition.

❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅ ✲ ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅ ❅

R =   R11 R12 R13 R22 R23 R33   ,

1 2s × 1 2s R11

s × s R22

X.-W. Chang Lattice Reduction and Preconditioning 21/33

slide-54
SLIDE 54

Floating point blocked LLL reduction, cont’d

R =   R11 R12 R13 R22 R23 R33   , Deal with the 2nd block column of R: Apply PLLL to R22: R22 := ¯ QT

22R22¯

Z22 Update R12 by ¯ Z22: R12 := R12¯ Z22 Perform size reductions on the same columns of R12 as those

  • f R22: R12 := R11¯

Z12 + R12 Update R23 by ¯ QT

22: R23 := ¯

QT

22R23.

X.-W. Chang Lattice Reduction and Preconditioning 22/33

slide-55
SLIDE 55

Floating point blocked LLL reduction, cont’d

R =   R11 R12 R13 R22 R23 R33   , Deal with the 2nd block column of R: Apply PLLL to R22: R22 := ¯ QT

22R22¯

Z22 Update R12 by ¯ Z22: R12 := R12¯ Z22 Perform size reductions on the same columns of R12 as those

  • f R22: R12 := R11¯

Z12 + R12 Update R23 by ¯ QT

22: R23 := ¯

QT

22R23.

X.-W. Chang Lattice Reduction and Preconditioning 22/33

slide-56
SLIDE 56

Floating point blocked LLL reduction, cont’d

R =   R11 R12 R13 R22 R23 R33   , Deal with the 2nd block column of R: Apply PLLL to R22: R22 := ¯ QT

22R22¯

Z22 Update R12 by ¯ Z22: R12 := R12¯ Z22 Perform size reductions on the same columns of R12 as those

  • f R22: R12 := R11¯

Z12 + R12 Update R23 by ¯ QT

22: R23 := ¯

QT

22R23.

X.-W. Chang Lattice Reduction and Preconditioning 22/33

slide-57
SLIDE 57

Floating point blocked LLL reduction, cont’d

R =   R11 R12 R13 R22 R23 R33   , Deal with the 2nd block column of R: Apply PLLL to R22: R22 := ¯ QT

22R22¯

Z22 Update R12 by ¯ Z22: R12 := R12¯ Z22 Perform size reductions on the same columns of R12 as those

  • f R22: R12 := R11¯

Z12 + R12 Update R23 by ¯ QT

22: R23 := ¯

QT

22R23.

X.-W. Chang Lattice Reduction and Preconditioning 22/33

slide-58
SLIDE 58

Floating point blocked LLL reduction, cont’d

R =   R11 R12 R13 R22 R23 R33   , Deal with the 2nd block column of R: Apply PLLL to R22: R22 := ¯ QT

22R22¯

Z22 Update R12 by ¯ Z22: R12 := R12¯ Z22 Perform size reductions on the same columns of R12 as those

  • f R22: R12 := R11¯

Z12 + R12 Update R23 by ¯ QT

22: R23 := ¯

QT

22R23.

X.-W. Chang Lattice Reduction and Preconditioning 22/33

slide-59
SLIDE 59

Floating point blocked LLL reduction, cont’d

Now we need to decide whether we should move to the right or to the left. Specifically, check if Lov´ asz’s condition at the joint point of R11, R12 and R22 is satisfied, i.e., δ R(s/2, s/2)2 ≤ R(s/2, s/2 + 1)2 + R(s/2 + 1, s/2 + 1)2, where R(s/2, s/2 + 1) has been size reduced. If the inequality does not hold, we move half block size to the left,

  • therwise, i.e.,

R11 R12 R22

  • is partially LLL reduced, we move half

block size to the right. Continue the process until R is partially LLL reduced. Then perform size reductions for the entries which are not size reduced.

X.-W. Chang Lattice Reduction and Preconditioning 23/33

slide-60
SLIDE 60

Floating point blocked LLL reduction, cont’d

Now we need to decide whether we should move to the right or to the left. Specifically, check if Lov´ asz’s condition at the joint point of R11, R12 and R22 is satisfied, i.e., δ R(s/2, s/2)2 ≤ R(s/2, s/2 + 1)2 + R(s/2 + 1, s/2 + 1)2, where R(s/2, s/2 + 1) has been size reduced. If the inequality does not hold, we move half block size to the left,

  • therwise, i.e.,

R11 R12 R22

  • is partially LLL reduced, we move half

block size to the right. Continue the process until R is partially LLL reduced. Then perform size reductions for the entries which are not size reduced.

X.-W. Chang Lattice Reduction and Preconditioning 23/33

slide-61
SLIDE 61

Floating point blocked LLL reduction, cont’d

Now we need to decide whether we should move to the right or to the left. Specifically, check if Lov´ asz’s condition at the joint point of R11, R12 and R22 is satisfied, i.e., δ R(s/2, s/2)2 ≤ R(s/2, s/2 + 1)2 + R(s/2 + 1, s/2 + 1)2, where R(s/2, s/2 + 1) has been size reduced. If the inequality does not hold, we move half block size to the left,

  • therwise, i.e.,

R11 R12 R22

  • is partially LLL reduced, we move half

block size to the right. Continue the process until R is partially LLL reduced. Then perform size reductions for the entries which are not size reduced.

X.-W. Chang Lattice Reduction and Preconditioning 23/33

slide-62
SLIDE 62

Floating point blocked LLL reduction, cont’d

Now we need to decide whether we should move to the right or to the left. Specifically, check if Lov´ asz’s condition at the joint point of R11, R12 and R22 is satisfied, i.e., δ R(s/2, s/2)2 ≤ R(s/2, s/2 + 1)2 + R(s/2 + 1, s/2 + 1)2, where R(s/2, s/2 + 1) has been size reduced. If the inequality does not hold, we move half block size to the left,

  • therwise, i.e.,

R11 R12 R22

  • is partially LLL reduced, we move half

block size to the right. Continue the process until R is partially LLL reduced. Then perform size reductions for the entries which are not size reduced.

X.-W. Chang Lattice Reduction and Preconditioning 23/33

slide-63
SLIDE 63

Outline

Part 1: Lattice reduction

1

Introduction

2

A floating point partial LLL reduction algorithm

3

A floating point blocked LLL reduction algorithm

4

Numerical test results

Part 2: Lattice preconditioning

1

Motivations

2

Some lattice preconditioning techniques.

3

Numerical test results

Summary and future work

X.-W. Chang Lattice Reduction and Preconditioning 24/33

slide-64
SLIDE 64

Preliminary numerical test results

To compare LLL, PLLL+ and BLLL, we did some Matlab numerical tests. All the experiments were performed on a Mac running Linux with Intel Core i3 3.07 GHz processor. In BLLL, the block size is 32. Two examples: Example 1: B is randome and follows a normal distribution N(0, I). Example 2: B = UDVT, where U is the Q-factor of the QR factorization

  • f a random matrix following N(0, I) and V is generated in

the same way, and D = diag(104, . . . , 104, 1, . . . , 1).

X.-W. Chang Lattice Reduction and Preconditioning 25/33

slide-65
SLIDE 65

Preliminary numerical test results

To compare LLL, PLLL+ and BLLL, we did some Matlab numerical tests. All the experiments were performed on a Mac running Linux with Intel Core i3 3.07 GHz processor. In BLLL, the block size is 32. Two examples: Example 1: B is randome and follows a normal distribution N(0, I). Example 2: B = UDVT, where U is the Q-factor of the QR factorization

  • f a random matrix following N(0, I) and V is generated in

the same way, and D = diag(104, . . . , 104, 1, . . . , 1).

X.-W. Chang Lattice Reduction and Preconditioning 25/33

slide-66
SLIDE 66

Example 1: cost in flops

100 150 200 250 300 350 400 450 500 10

6

10

7

10

8

10

9

Dimension flops Cost in flops LLL PLLL+ BLLL

X.-W. Chang Lattice Reduction and Preconditioning 26/33

slide-67
SLIDE 67

Example 1: cost in CPU time

100 200 300 400 500 10

−2

10

−1

10

Dimension Second QR running time LLL PLLL+ BLLL

100 200 300 400 500 10

−3

10

−2

10

−1

10 10

1

10

2

10

3

Dimension Second Running time after QR LLL PLLL+ BLLL

X.-W. Chang Lattice Reduction and Preconditioning 27/33

slide-68
SLIDE 68

Example 1: B − QcRcZ−1

c 2/B2

100 150 200 250 300 350 400 450 500 10

−15

10

−14

10

−13

10

−12

Dimension Backward error Relative backward error LLL PLLL+ BLLL

X.-W. Chang Lattice Reduction and Preconditioning 28/33

slide-69
SLIDE 69

Example 2: cost in flops

100 150 200 250 300 350 400 450 500 10

7

10

8

10

9

10

10

10

11

Dimension flops Cost in flops LLL PLLL+ BLLL

X.-W. Chang Lattice Reduction and Preconditioning 29/33

slide-70
SLIDE 70

Example 2: cost in CPU time

100 200 300 400 500 10

−2

10

−1

10

Dimension Second QR running time LLL PLLL+ BLLL

100 200 300 400 500 10 10

1

10

2

10

3

Dimension Second Running time after QR LLL PLLL+ BLLL

X.-W. Chang Lattice Reduction and Preconditioning 30/33

slide-71
SLIDE 71

Example 2: B − QcRcZ−1

c 2/B2

100 150 200 250 300 350 400 450 500 10

−12

10

−11

10

−10

10

−9

10

−8

10

−7

10

−6

10

−5

Dimension Backward error Relative backward error LLL PLLL+ BLLL

X.-W. Chang Lattice Reduction and Preconditioning 31/33

slide-72
SLIDE 72

Outline

Part 1: Lattice reduction

1

Introduction

2

A floating point partial LLL reduction algorithm

3

A floating point blocked LLL reduction algorithm

4

Numerical test results

Part 2: Lattice preconditioning This part has been removed from this file. Summary and future work

X.-W. Chang Lattice Reduction and Preconditioning 32/33

slide-73
SLIDE 73

Summary and future work

Lattice reduction: proposed a partial LLL reduction algorithm and a blocked LLL reduction algorithm future work:

Study the numerical stability of PLLL. Modify BLLL to improve its efficiency and stability. Study the convergence of BLLL.

Lattice preconditioning: proposed some preconditioning techniques. future work:

Develop preconditioners for other condition numbers Develop preconditioners for the LLL reduction.

X.-W. Chang Lattice Reduction and Preconditioning 33/33

slide-74
SLIDE 74

Summary and future work

Lattice reduction: proposed a partial LLL reduction algorithm and a blocked LLL reduction algorithm future work:

Study the numerical stability of PLLL. Modify BLLL to improve its efficiency and stability. Study the convergence of BLLL.

Lattice preconditioning: proposed some preconditioning techniques. future work:

Develop preconditioners for other condition numbers Develop preconditioners for the LLL reduction.

X.-W. Chang Lattice Reduction and Preconditioning 33/33

slide-75
SLIDE 75

Summary and future work

Lattice reduction: proposed a partial LLL reduction algorithm and a blocked LLL reduction algorithm future work:

Study the numerical stability of PLLL. Modify BLLL to improve its efficiency and stability. Study the convergence of BLLL.

Lattice preconditioning: proposed some preconditioning techniques. future work:

Develop preconditioners for other condition numbers Develop preconditioners for the LLL reduction.

X.-W. Chang Lattice Reduction and Preconditioning 33/33

slide-76
SLIDE 76

Summary and future work

Lattice reduction: proposed a partial LLL reduction algorithm and a blocked LLL reduction algorithm future work:

Study the numerical stability of PLLL. Modify BLLL to improve its efficiency and stability. Study the convergence of BLLL.

Lattice preconditioning: proposed some preconditioning techniques. future work:

Develop preconditioners for other condition numbers Develop preconditioners for the LLL reduction.

X.-W. Chang Lattice Reduction and Preconditioning 33/33