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.3k
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
2.1k
準同型暗号による バーチャルセキュアプラットフォーム の開発
nindanaoto
1
360
Other Decks in Research
See All in Research
CVPR2026論文紹介_VLMにとって良いvision encoderとは何か?Rethinking Model Selection in VLM Through the Lens of Gromov-Wasserstein Distance
kobayashi31
1
200
東京大学工学部計数工学科、計数工学特別講義の説明資料
kikuzo
0
640
Ghost in the 7‑Zip: The Shadow of Residential Proxies Creeping into Your Life
nttcom
0
2k
PHTalks Bengaluru - SSRF When All Else Fails
dk999
0
1.1k
論文紹介:Doc-to-LoRA: Learning to Instantly Internalize Contexts
yukako_nakano
0
140
LLM の Attention 機構まとめ — 数式・計算量・メモリ
puwaer
8
2.6k
[SNLP2026] Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approach
wataruuuuu
0
270
【Zozo Research 技術共有会】三次元領域の現在と展望
mickey_0226
3
590
[IR Reading 2026春 論文紹介] LLM-based Listwise Reranking under the Effect of Positional Bias (ECIR 2026) /IR-Reading-2026-Spring
koheishinden
PRO
0
380
PGDM: Physically Guided Diffusion Model for L Downscaling
satai
3
450
論文紹介: Understanding Epistemic Language with a Language-augmented Bayesian Theory of Mind
hisaokatsumi
0
140
Data Visualization Tools in the Age of AI
flekschas
0
200
Featured
See All Featured
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
510
Game over? The fight for quality and originality in the time of robots
wayneb77
1
260
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
680
Marketing to machines
jonoalderson
1
5.7k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
The Language of Interfaces
destraynor
162
27k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
220
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
2
3.8k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
420
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
270
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 •やれば動くし速くなる