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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
ペットのかわいい瞬間を撮影する オートシャッターAIアプリへの スマートラベリングの適用
mssmkmr
0
200
超高速データサイエンス
matsui_528
2
370
Earth AI: Unlocking Geospatial Insights with Foundation Models and Cross-Modal Reasoning
satai
3
440
視覚から身体性を持つAIへ: 巧緻な動作の3次元理解
tkhkaeio
0
180
AIスパコン「さくらONE」のLLM学習ベンチマークによる性能評価 / SAKURAONE LLM Training Benchmarking
yuukit
2
960
AWSの耐久性のあるRedis互換KVSのMemoryDBについての論文を読んでみた
bootjp
1
440
存立危機事態の再検討
jimboken
0
230
病院向け生成AIプロダクト開発の実践と課題
hagino3000
0
520
AI Agentの精度改善に見るML開発との共通点 / commonalities in accuracy improvements in agentic era
shimacos
2
1.1k
ブレグマン距離最小化に基づくリース表現量推定:バイアス除去学習の統一理論
masakat0
0
110
A History of Approximate Nearest Neighbor Search from an Applications Perspective
matsui_528
1
140
【NICOGRAPH2025】Photographic Conviviality: ボディペイント・ワークショップによる 同時的かつ共生的な写真体験
toremolo72
0
140
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
59
42k
Paper Plane
katiecoart
PRO
0
46k
Rails Girls Zürich Keynote
gr2m
96
14k
BBQ
matthewcrist
89
10k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Tell your own story through comics
letsgokoyo
1
800
First, design no harm
axbom
PRO
2
1.1k
Docker and Python
trallard
47
3.7k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
71
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
87
Odyssey Design
rkendrick25
PRO
1
480
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 •やれば動くし速くなる