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
2
1.2k
TFHEのための多項式乗算入門
nindanaoto
February 08, 2020
Tweet
Share
More Decks by nindanaoto
See All by nindanaoto
準同型暗号による バーチャルセキュアプラットフォーム の開発/Development of Virtual Secure Platform
nindanaoto
3
2k
準同型暗号による バーチャルセキュアプラットフォーム の開発
nindanaoto
1
350
Other Decks in Research
See All in Research
ドメイン知識がない領域での自然言語処理の始め方
hargon24
1
220
競合や要望に流されない─B2B SaaSでミニマム要件を決めるリアルな取り組み / Don't be swayed by competitors or requests - A real effort to determine minimum requirements for B2B SaaS
kaminashi
0
410
snlp2025_prevent_llm_spikes
takase
0
420
"主観で終わらせない"定性データ活用 ― プロダクトディスカバリーを加速させるインサイトマネジメント / Utilizing qualitative data that "doesn't end with subjectivity" - Insight management that accelerates product discovery
kaminashi
15
18k
学習型データ構造:機械学習を内包する新しいデータ構造の設計と解析
matsui_528
5
2.3k
Nullspace MPC
mizuhoaoki
1
550
Thirty Years of Progress in Speech Synthesis: A Personal Perspective on the Past, Present, and Future
ktokuda
0
140
機械学習と数理最適化の融合 (MOAI) による革新
mickey_kubo
1
450
[RSJ25] Enhancing VLA Performance in Understanding and Executing Free-form Instructions via Visual Prompt-based Paraphrasing
keio_smilab
PRO
0
190
Open Gateway 5GC利用への期待と不安
stellarcraft
2
170
大規模言語モデルにおけるData-Centric AIと合成データの活用 / Data-Centric AI and Synthetic Data in Large Language Models
tsurubee
1
460
Unsupervised Domain Adaptation Architecture Search with Self-Training for Land Cover Mapping
satai
3
470
Featured
See All Featured
Building AI with AI
inesmontani
PRO
1
580
Designing Powerful Visuals for Engaging Learning
tmiket
0
190
Designing for Performance
lara
610
69k
Deep Space Network (abreviated)
tonyrice
0
22
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.2k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
GitHub's CSS Performance
jonrohan
1032
470k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Designing Experiences People Love
moore
143
24k
The SEO identity crisis: Don't let AI make you average
varn
0
39
Fireside Chat
paigeccino
41
3.8k
Applied NLP in the Age of Generative AI
inesmontani
PRO
3
2k
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 •やれば動くし速くなる