Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
TFHEのための多項式乗算入門
Search
nindanaoto
February 08, 2020
Research
1.2k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TFHEのための多項式乗算入門
nindanaoto
February 08, 2020
More Decks by nindanaoto
See All by nindanaoto
準同型暗号による バーチャルセキュアプラットフォーム の開発/Development of Virtual Secure Platform
nindanaoto
3
2k
準同型暗号による バーチャルセキュアプラットフォーム の開発
nindanaoto
1
360
Other Decks in Research
See All in Research
世界モデルにおける分布外データ対応の方法論
koukyo1994
7
2.2k
[BlackHatAsia2026] Hidden Telemetry: Uncovering TraceLogging ETW Providers You're Not Using (Yet)
asuna_jp
1
540
Spatial Active Noise Control Based onSound Field Interpolation Incorporating Physical Constraints
skoyamalab
0
100
データセンター事業者を取り巻く近年の状況とその中での研究開発動向、テストベッドへの貢献の可能性
kikuzo
1
200
正規分布と最適化について
koide3
1
260
Claude Code × autoresearch 実践
mathbullet
0
170
第12回人と環境にやさしい交通をめざす全国大会/熊本都市圏「車1割削減、渋滞半減、公共交通2倍」をめざして
trafficbrain
0
120
重要だけど測れていないもの:高齢者ケアの見えない課題
theoriatec2024
0
360
老舗ものづくり企業でリサーチが変革を起こすまで - 三菱重工DXの実践
skydats
0
190
多様なデータを許容し学習し続ける模倣学習 / Advanced Imitation Learning for VLA
prinlab
0
220
NII S. Koyama's Lab Research Overview AY2026
skoyamalab
0
320
Research Engineerという仕事 / Research Engineering: Bridging Research and Business
chck
1
220
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
280
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
260
Exploring anti-patterns in Rails
aemeredith
3
420
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
200
The Art of Programming - Codeland 2020
erikaheidi
57
14k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
140
Context Engineering - Making Every Token Count
addyosmani
9
970
4 Signs Your Business is Dying
shpigford
187
22k
The SEO identity crisis: Don't let AI make you average
varn
0
490
Ruling the World: When Life Gets Gamed
codingconduct
0
260
Transcript
TFHEのための 多項式乗算入門 松岡 航太郎 @nimdanaoto
自己紹介 •京都大学工学部 電気電子工学科3回生 •理論担当
なぜ多項式乗算? •TFHEにおいて最も重い処理 •数学的に様々な最適化が可能 •アーキテクチャにも強く依存
多項式乗算 •今回は整数係数多項式に限る • 3 + 1 ∗ 2 + 3
= 62 + 11 + 3 •31 ∗ 23 = 713
筆算 •(2) 3 + 1 × 2 + 3 9
+ 3 62 + 2 62 + 11 + 3
フーリエ変換による高速化 •フーリエ変換の畳み込み定理 ∗ = ℱ−1(ℱ ⋅ ℱ ) •FFT(高速フーリエ変換) (
)
= =0 −1 () = =0 −1 −
2 −1 () = 1 =0 −1 ()() 2 = 0,1, … − 1
−1 ⋅ = 1 =0 −1 =0 −1
=0 −1 − 2 =0 −1 − 2 2 = =0 −1 =0 − + =+1 −1 −+ ∵ =0 −1 − 2 = ቊ ≡ 0 0 ℎ
もっと頭のいい解決法 •負巡回もあれば並列に •2N一つではなくN二つ •虚数部にもデータを詰めたい
None
TFHEが独自FFTを使う理由 (しかもアセンブラ) •FFTWは複素数の配列 •メモリアクセス局所性は有利 •実数と虚数部を別に •並び替えなくてよい
倍精度の限界 •log2 ( |∞ |∞ ) < 53 •収まるように設計する必要
GPUの場合は? •倍精度演算機は一般に貧弱 •単精度の32分の1とか •INT32は単精度と同等
NTT(数論変換) •ある法P(素数)の下で考える •原始N乗根が存在する •211−1 = 1024 ≡ 1 11 •これは円周群に同型
どんなPが良い? •cuFHEでは = 264 − 232 + 1 •剰余がとりやすい •7−1
≡ 1 •7 5 192 (−1) ≡ 2
最後に •(多項式)乗算は奥が深い • ≤数万ならToom-Cook •やれば動くし速くなる