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
ニューラルネットの1bit化 / 1bit-neural-network
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
shun74
July 13, 2022
Programming
960
0
Share
ニューラルネットの1bit化 / 1bit-neural-network
Explanation of what is 1bit neural network .
shun74
July 13, 2022
More Decks by shun74
See All by shun74
深度推定モデルの自己教師あり学習/self-supervised-depth
shun74
0
500
GPUでステレオマッチング / Stereo-matching with GPU
shun74
0
1.1k
卒業研究の進め方 / How to preceed with the research
shun74
1
570
Barcode Recognition / pharmacode-decoder
shun74
0
1.1k
Vision Transformer講座 / Vision Transformer Presentation
shun74
1
740
Defocus Map Estimation From a Single Image Based on Two-Parameter Defocus Model / two-parameter-defocus-model
shun74
0
390
理解してほしいVision Transformer / plz-understand-ViT
shun74
0
790
Other Decks in Programming
See All in Programming
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
630
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
120
Claude Code × Gemini × Ebitengine ゲーム制作素人WebエンジニアがGoでゲームを作った話
webzawa
0
220
WebAssembly を読み込むベストプラクティス 2026年春版 / Best Practices for Loading WebAssembly (Spring 2026)
petamoriken
5
1k
AIと共に生きる技術選定 2026
sgash708
0
120
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
100
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
640
なぜあなたのコードには「コシ」がないのか?〜AI時代に問う、最後まで美味しい設計と戦略〜 #phpconkagawa / phpconkagawa2026
shogogg
0
120
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
190
ハーネスエンジニアリングとは?
kinopeee
13
6.7k
Explore CoroutineScope
tomoeng11
0
160
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
170
Featured
See All Featured
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
For a Future-Friendly Web
brad_frost
183
10k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
The Curious Case for Waylosing
cassininazir
0
340
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
130
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
320
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
180
KATA
mclloyd
PRO
35
15k
Faster Mobile Websites
deanohume
310
31k
Transcript
ニューラルネットの1bit化 B4 shun sato
本日のお話 • ニューラルネットとは • ニューラルネットの1bit化 • 1bit化のメリット • FPGAによる爆速化
ニューラルネットとは • 人間のシナプス結合を模倣 • 掛け算足し算をたくさんやる • 出力と答えの誤差を微分して学習 ニューラルネット内の数値表現 • 入力
:float32, int32, uint8… • 重み :float32 • バイアス :float32 • 出力・答え :float32, int32, uint8… シナプス結合 ニューラルネット(多層パーセプトロン)
ニューラルネットの1bit化 内部の表現をいろいろと1bit化する 式: ⇢⇢⇢ 1bit化 重み・活性化関数・正則化などが1bit化可能 ※ここでいう1bitとは{-1, 1}のことです
1bit化のメリット • メモリ大幅削減! float32 ⇢ 1bitでメモリ消費が1/32になる • 計算の単純化 ⇢ 高速化・省電力
• FPGAによる爆速化 (次のスライド) 1bitの掛け算はXNORと同じ ⇢ ALUを使わなくても計算可能 足し算もbit countで高速に処理
FPGAによる爆速化 FPGA = Field Programmable Gate Array (その場で書き換え可能な集積論理回路) ⇠こういうやつ 高位合成でプログラムするのが一般的
HDLでもプログラム可能 LUT(Look up table)を使った高速な計算が可能 浮動小数点演算 :速くて40クロックぐらい LUT+FFによる演算 :数クロック LUTで数値を取り出してFFに入力
FPGAの実験 ⇠ FPGAのみの実験結果 ネットワークの大きさはSFC<LFC<CNVの順番 手元でSFCをGPUで動かしたら9500FPSぐらいだった 1bit+FPGAにすれば約1000倍速(1200万FPS)になる? LUTは回路の面積も小さいので省電力
デメリットもあるよね? • 普通に1bit化すると大幅な精度低下 • ニューラルネットの1bit化について様々な研究が存在 • Binary Connect:BC (CVPR 2015)
https://arxiv.org/abs/1511.00363 NNの重みを1bit化した初のモデル • Binarized Neural Network:BNN (NIPS 2016) https://arxiv.org/abs/1602.02830 BCの活性化関数を1bit化 計算のボトルネックになるBatchNormalizationをシフト演算化 • XNOR-Net (CVPR 2016) https://arxiv.org/abs/1603.05279 BNNの演算に係数をつけて大規模データセットにも対応 畳み込みブロックの順序を変えて精度を向上
参考文献 • ニューラルネット https://sinhrks.hatenablog.com/entry/2014/11/30/192940 • 1bit化とハードウェア https://www.slideshare.net/kentotajiri/ss-77136469 • 演算のクロック数 http://rakasaka.fc2web.com/delphi/numop.html
• FPGAの大手企業 Xilinx https://xilinx.com/