error correction in fast matrix multiplication and inverse
play

Error Correction in Fast Matrix Multiplication and Inverse Daniel - PowerPoint PPT Presentation

Introduction Matrix Multiplication Matrix Inverse Perspective Error Correction in Fast Matrix Multiplication and Inverse Daniel S. Roche Computer Science Department United States Naval Academy Annapolis, Maryland, U.S.A. ISSAC 2018 19


  1. Introduction Matrix Multiplication Matrix Inverse Perspective Error Correction in Fast Matrix Multiplication and Inverse Daniel S. Roche Computer Science Department United States Naval Academy Annapolis, Maryland, U.S.A. ISSAC 2018 19 July 2018 New York City Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 1 / 27

  2. Introduction Matrix Multiplication Matrix Inverse Perspective Correcting Errors General Framework Some problem is slow to solve locally. So we outsource the computation and get back the result. If the result is wrong, we should detect that. If the result is “close”, we should correct it. Sources of error Noisy communication channel Faults in computation Malicious servers? Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 2 / 27

  3. Introduction Matrix Multiplication Matrix Inverse Perspective Example: Sudoku Response Sent to server 7 8 2 9 7 6 8 1 2 4 5 3 7 2 5 3 9 6 4 8 1 7 1 4 8 3 5 1 4 5 3 8 7 9 2 6 5 8 3 7 9 8 6 2 5 3 4 1 6 9 4 6 1 5 7 3 2 8 9 3 7 3 8 2 1 4 9 7 6 5 5 1 7 5 3 9 2 9 6 1 7 4 4 9 6 2 4 7 9 1 5 3 8 7 4 2 8 1 7 4 3 8 6 9 2 Source: https://www.nytimes.com/crosswords/game/sudoku/hard Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 3 / 27

  4. Introduction Matrix Multiplication Matrix Inverse Perspective Example: Sudoku Response Sent to server 7 8 2 9 7 6 8 1 2 4 5 3 7 2 5 3 9 6 4 8 1 7 1 4 8 3 5 1 4 5 3 8 7 9 2 6 5 8 3 7 9 8 6 2 5 3 4 1 6 9 4 6 1 5 7 3 2 8 9 3 7 3 8 2 1 4 9 7 6 5 5 1 7 5 3 9 2 9 6 1 7 4 4 9 6 2 4 7 9 1 5 3 8 7 4 2 8 1 7 4 3 8 6 9 2 Source: https://www.nytimes.com/crosswords/game/sudoku/hard Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 3 / 27

  5. Introduction Matrix Multiplication Matrix Inverse Perspective First Problem: Matrix Multiplication Matrix Multiplication with Errors Input : A , B , C ∈ F n × n , where C ≈ AB Output : E ∈ F n × n s.t. AB = C − E Parameters : Dimension n Input size t = # A + # B + # C Error count k = # E Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 4 / 27

  6. Introduction Matrix Multiplication Matrix Inverse Perspective First Problem: Matrix Multiplication Matrix Multiplication with Errors Input : A , B , C ∈ F n × n , where C ≈ AB Output : E ∈ F n × n s.t. AB = C − E Parameters : Dimension n Input size t = # A + # B + # C Error count k = # E ıve recomputation: O ( n ω ) Na¨ Gasieniec, Levcopoulos, Lingas, Pagh, Tokuyama, Algorithmica 2017: � � n 2 + kn � O Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 4 / 27

  7. Introduction Matrix Multiplication Matrix Inverse Perspective First Problem: Matrix Multiplication Matrix Multiplication with Errors Input : A , B , C ∈ F n × n , where C ≈ AB Output : E ∈ F n × n s.t. AB = C − E Parameters : Dimension n Input size t = # A + # B + # C Error count k = # E ıve recomputation: O ( n ω ) Na¨ Gasieniec, Levcopoulos, Lingas, Pagh, Tokuyama, Algorithmica 2017: � � n 2 + kn � O � � � � t + k 0 . 686 n Ours: O ( t + kn ) worst-case; best case O Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 4 / 27

  8. Introduction Matrix Multiplication Matrix Inverse Perspective Related Work Monte Carlo verification in Linear Algebra Matrix multiplication: Freivalds ’79 Positive semidefiniteness: Kaltofen, Nehring, Saunders ’11 Rank, characteristic polynomial,. . . : Dumas & Kaltofen ’14 Rank profile, triangular forms: Dumas, Lucas, Pernet ’17 Error correction in symbolic computation Complexity of sparse matrix multiplication Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 5 / 27

  9. Introduction Matrix Multiplication Matrix Inverse Perspective Related Work Monte Carlo verification in Linear Algebra Error correction in symbolic computation Chinese remaindering: Goldreich, Ron, Sudan ’99 Rational reconstruction: Khonji, Pernet, Roch, Roche, Stalinski ’10 Sparse interpolation: Comer, Kaltofen, Pernet ’12 Complexity of sparse matrix multiplication Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 5 / 27

  10. Introduction Matrix Multiplication Matrix Inverse Perspective Related Work Monte Carlo verification in Linear Algebra Error correction in symbolic computation Complexity of sparse matrix multiplication k = number of nonzeros � n 2 + k 0 . 7 n 1 . 2 � � : Yuster & Zwick ’04 O � k 1 . 34 � � O output sensitive: Amossen & Pagh ’09 � k 0 . 188 n 2 � � O : Lingas ’10 � � n 2 + kn � O output sensitive: Pagh ’13 Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 5 / 27

  11. Introduction Matrix Multiplication Matrix Inverse Perspective Outline Introduction Matrix Multiplication with Errors Crucial tools: Nonzero row identification, Sparse interpolation Matrix Inverse with Errors Additional tools: Commutativity, Sparse low-rank linear algebra Preliminary implementation timings Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 6 / 27

  12. Introduction Matrix Multiplication Matrix Inverse Perspective Detecting errors R. Freivalds: Fast Probabilistic Algorithms (1979) Given A , B , C , does AB = C ? 1 Choose random vector v 2 Compute ( C − AB ) v 3 Check whether ( C − AB ) v = 0 ? = − 0 C A B Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 7 / 27

  13. Introduction Matrix Multiplication Matrix Inverse Perspective Detecting errors R. Freivalds: Fast Probabilistic Algorithms (1979) Given A , B , C , does AB = C ? 1 Choose random vector v 2 Compute ( C − AB ) v 3 Check whether ( C − AB ) v = 0 ? = − v v 0 C A B Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 7 / 27

  14. Introduction Matrix Multiplication Matrix Inverse Perspective Detecting errors R. Freivalds: Fast Probabilistic Algorithms (1979) Given A , B , C , does AB = C ? 1 Choose random vector v 2 Compute ( C − AB ) v 3 Check whether ( C − AB ) v = 0 ? = − v 0 C A Bv Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 7 / 27

  15. Introduction Matrix Multiplication Matrix Inverse Perspective Detecting errors R. Freivalds: Fast Probabilistic Algorithms (1979) Given A , B , C , does AB = C ? 1 Choose random vector v 2 Compute ( C − AB ) v 3 Check whether ( C − AB ) v = 0 ? = − v 0 C ABv Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 7 / 27

  16. Introduction Matrix Multiplication Matrix Inverse Perspective Detecting errors R. Freivalds: Fast Probabilistic Algorithms (1979) Given A , B , C , does AB = C ? 1 Choose random vector v 2 Compute ( C − AB ) v 3 Check whether ( C − AB ) v = 0 ? = − 0 Cv ABv Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 7 / 27

  17. Introduction Matrix Multiplication Matrix Inverse Perspective Row Polynomials Treat each row of M ∈ F n × n as a degree- ( n − 1) polynomial Example � x 5 + � x 7 f 1 ( x ) 1 x f 2 ( x ) 0 x 2 � x 9 f 3 ( x ) x 3 . . = = . . . . . . . Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 8 / 27

  18. Introduction Matrix Multiplication Matrix Inverse Perspective Row Polynomial Evaluation Need to evaluate each row polynomial f i ( x ) at 1 , θ, θ 2 , . . . This is equivalent to multiplying by a (truncated) DFT matrix. Example f 1 ( θ 2 ) f 1 (1) f 1 ( θ ) · · · f 2 ( θ 2 ) f 2 (1) f 2 ( θ ) · · · . . . . . . . . . . . . θ i + j = M V MV n × n n × s n × s Important : Takes � O ( sn + t ) field ops, where t = # M Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 9 / 27

  19. Introduction Matrix Multiplication Matrix Inverse Perspective Sparse polynomial interpolation Overview Given a way to evaluate an unknown polynomial f ∈ F [ x ] with at most s nonzero terms, how to recover the nonzero coefficients and exponents of f ? Polynomial black box f ( x ) f ( θ ) ∈ F θ ∈ F Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 10 / 27

  20. Introduction Matrix Multiplication Matrix Inverse Perspective Sparse polynomial interpolation Prony’s Method Prony’s (1795) method from exponential analysis can be used here. (Ben-Or & Tiwari ’88, Kaltofen Lakshman & Wiley ’91,. . . ) Algorithm Overview 1. Find a high-order element ω ∈ F Compute f ( ω i ) for i = 0 , 1 , . . . , 2 s − 1 2. 3. Berlekamp-Massey to find annihilator Λ ( z ) Find roots ω e i of Λ 4. 5. Compute discrete logs e i of Λ 6. Transp. Vandermonde solve to get coefficients c i Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 11 / 27

  21. Introduction Matrix Multiplication Matrix Inverse Perspective Sparse polynomial interpolation Prony’s Method Prony’s (1795) method from exponential analysis can be used here. (Ben-Or & Tiwari ’88, Kaltofen Lakshman & Wiley ’91,. . . ) Algorithm Overview 1. Find a high-order element ω ∈ F Compute f ( ω i ) for i = 0 , 1 , . . . , 2 s − 1 2. 3. Berlekamp-Massey to find annihilator Λ ( z ) Find roots ω e i of Λ 4. 5. Compute discrete logs e i of Λ 6. Transp. Vandermonde solve to get coefficients c i These steps depend on the field F Root finding and discrete logarithms are generally the bottleneck (especially over finite fields!) Dan Roche (USNA) Error Correction in Matrix Mul ISSAC 2018 11 / 27

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend