Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
20180110 AI&ロボット勉強会 Deeplearning4J と時系列データの異常検知...
Search
kmotohas
January 10, 2018
Technology
45
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
20180110 AI&ロボット勉強会 Deeplearning4J と時系列データの異常検知について
20180110 AI&ロボット勉強会 Deeplearning4J と時系列データの異常検知について 25+5 min
社会性フィルタ通過分のみ公開。
kmotohas
January 10, 2018
More Decks by kmotohas
See All by kmotohas
AWS の最新生成 AI 開発基盤サービスAmazon Bedrock AgentCore ご紹介
kmotohas
0
64
OpenAI gpt-oss ファインチューニング入門
kmotohas
3
3.5k
SageMaker Dive Deep Workshop 動かして理解する SageMaker Training Job の仕組み
kmotohas
0
130
AWS re:Invent直前!2021年のアップデートを振り返ろう AI/MLサービス編
kmotohas
0
1k
論文解説 150 Successful Machine Learning Models: 6 Lessons Learned at Booking.com
kmotohas
0
1.4k
konduit-servingとSpring Cloud Data Flowを用いたMLアプリケーション開発
kmotohas
0
710
Deep Learningによる画像認識の基礎・CNNの仕組み
kmotohas
0
1.2k
詳説Deep LearningとDL4JとMLOps入門
kmotohas
0
760
オートエンコーダーと異常検知入門
kmotohas
1
1.9k
Other Decks in Technology
See All in Technology
AIオーケストレーションを活用した 開発ワークフローの設計と実践
bqnq
0
120
Oracle Cloud Infrastructure IaaS 新機能アップデート 2026/6 - 2026/8
oracle4engineer
PRO
0
130
When Does a Local Qwen Start to Break
morshoto
0
190
Redmine 7.0で私が開発した新機能の狙いと背景
vividtone
1
130
2026/09/10 Spring_Bootから_Jakarta_EE_MicroProfileへの移行
megascus
0
280
PfEingのアプローチで働こう
rindrics
0
200
OpenTelemetry eBPF Instrumentationの舞台裏 / Behind the Scenes of OpenTelemetry eBPF Instrumentation
ymotongpoo
3
720
プロダクトエンジニアに必要な「いい感じ」に作る能力 〜たくさん作れる時代に、どこまで作るかの決め方〜
jnishime_dresscode
2
1.4k
【視聴者参加型!】AWSセキュリティアンチパターンクイズ
syoshie
1
480
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
110
コスト最適化の「めんどくさい」を AWS FinOps Agent でチョット楽にする
classmethod_kaz
0
290
Code4Lib JAPANカンファレンス2026 開会挨拶 / Code4Lib JAPAN Conference 2026: Opening Remarks
ykiyota
0
280
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
470
Designing for Timeless Needs
cassininazir
1
470
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Scaling GitHub
holman
464
140k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.9k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
260
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
520
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
240
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Transcript
Deeplearning4J Java/Scala で書ける産業向けのディープラーニングフレームワーク 本橋 和貴 2018年1月10日 AI & ロボット勉強会
▪ アジェンダ 社会性フィルタにより削除 ディープラーニングとは Deeplearning4J (DL4J) DL4J を用いた異常検知 2
▪ (人工)ニューラルネットワーク 脳機能に見られるいくつかの特性を計算機上のシミュレーションによって 表現することを目指した数学モデル (ニューラルネットワーク - Wikipedia) 3 図出典: http://www.lab.kochi-tech.ac.jp/future/1110/okasaka/neural.htm
人工ニューロン(パーセプトロン)
▪ ディープニューラルネットワーク ネットワークをディープにすることで より多くの、高次の特徴量を抽出 4 図出典: http://dl.ndl.go.jp/info:ndljp/pid/10952149 入力層 中間層 (隠れ層)
出力層 (Shallow) Neural Network 【中間層が1層】 Deep Neural Network 【中間層が2層以上】 図出典: GumGum
▪ ディープラーニングは機械学習のあくまで一分野 しばしば機械学習は自然からヒントを得ている • 進化論 ◦ 遺伝、自然淘汰 • 物理学 ◦
アニーリング • 群知能 ◦ 蟻コロニー • 免疫 ◦ クローン選択説 • 神経科学 ◦ ニューラルネットワーク 5 図出典: Deep Learning: A Practitioner’s Approach
▪ なぜいまディープラーニングか 計算機の発達、GPGPU (General Purpose Graphic Processing Unit) の台頭 扱えるデータ量の爆増
学習のための様々な工夫の発明 (ReLU, Dropout, Batch Normalization, etc) ⇨ ディープラーニングの本領発揮、人間を超えるパフォーマンスも 6 ニューラルネットは パラメータが多く、表現力が高い 学習が遅い・難しい (過学習、勾配の消失)
▪ ニューラルネットの学習 * 入力 x と(正しい)出力 y の “マッピング” を学習
ニューラルネットワーク = 関数近似器 7 図出典: https://www.slideshare.net/AkinoriAbe1/ss-69510936 出力の誤差 パラメータの変分
▪ ディープラーニングの得意分野 入力 ⇨ 出力 の マッピング は得意 • 物体認識(画像
⇨ 種類) • 音声認識(音 ⇨ 単語) • ゲーム(画面 ⇨ ボタン操作) • 次元圧縮(高次元 ⇨ 低次元) それ以外は実際そうでもない • 会話(フレーズ ⇨ 適切な「回答」って?) * 一問一答ならできる、チャットボット 8 ナチュラルな会話には感情のモデル化が必要でしょう https://musyoku.github.io/2016/03/16/deep-reinforcem ent-learning-with-double-q-learning/ http://tech-blog.abeja.asia/entry/object-detection-summar y 出典:いらすとや
▪ アジェンダ 社会性フィルタにより削除 ディープラーニングとは Deeplearning4J (DL4J) DL4J を用いた異常検知 9
▪ ディープラーニング開発フレームワーク Q: Tensorflow, Keras, Pytorch, Chainer, Caffe2, .. どれを使えばいいの?
10 ニューラルネットの 構築・学習・利用 のためのモジュール群 出典: https://dev.classmethod.jp/machine-learning/introduction-keras-deeplearning/
▪ ディープラーニング開発フレームワーク 11 出典: https://dev.classmethod.jp/machine-learning/introduction-keras-deeplearning/ ニューラルネットの 構築・学習・利用 のためのモジュール群 Q: Tensorflow,
Keras, Pytorch, Chainer, Caffe2, .. どれを使えばいいの? A: 好きなやつ (Python わかるなら個人的には Keras, Pytorch, Chainer) cf) 比較表 https://docs.chainer.org/en/stable/comparison.html
▪ Open Neural Network Exchange ニューラルネットのモデルの統一フォーマット Microsoft と Facebook によるオープンソースプロジェクト
「あるAIフレームワークで構築した学習モデルを異なる機械学習システムに簡単に切り 替えることを目的としている」http://www.itmedia.co.jp/news/articles/1709/08/news051.html 12 相互 import /export
▪ ディープラーニング開発工程 いわゆる研究開発用開発フレームワーク (Tensorflow など) が活躍するのは 開発工程の一部 (まあそこが肝だけど) 運用を意識したフレームワーク選び ⇨
Deeplearning4J の提案 13 図出典: https://www.abeja.asia/news/
▪ Deeplearning4J (DL4J) Java/Scala で書ける商用ディープラーニング開発ソフトウェア群 cf) Reddit 「Amazon のシステムは 99%
Java で動いている」 https://www.reddit.com/r/java/comments/7cyhjc/what_do_you_mainly_use_java_for/dptr5fg/ [[ DataVec (ETL), ND4J (線形代数), SKIL (デプロイ)]] Skymind社による商用サポートあり Apache Spark にネイティブに対応 ⇨ Hadoop クラスタを用いた並列化 14 プログラミング 人口ランキング (TIOBE)
▪ アジェンダ 社会性フィルタにより削除 ディープラーニングとは Deeplearning4J (DL4J) DL4J を用いた異常検知 15
▪ 時系列データの異常検知 【正常・異常のラベル付きデータの場合】 通常の分類問題に帰結 【ラベルなしデータの場合】 基本的にこちらが対象 方針:正常データを学習しておき、「正常」からの逸脱をみる 以降の説明で用いるニューラルネットワーク*: LSTM (時系列データを扱うためにメモリセルを導入したモデル)
+ Variational Autoencoder(正常データの復元;できなければ異常) 16 図出典: https://qiita.com/kenmatsu4/items/68e48a00aaebf338bedc * 引用元: IBM - developerWorks 深層学習を利用して異常を検出するコグニティブ IoT ソリューションを開発する https://www.ibm.com/developerworks/jp/iot/library/iot-deep-learning-anomaly-detection-3/index.html
▪ LSTM (Long-Short Term Memory) ある時刻 t の入力だけでなく、時刻 t -
1 の入力も考慮する どの時刻のデータを重視するかは入力・忘却・出力ゲートにより制御 17 図出典: https://www.slideshare.net/AndrePemmelaar/deep-lst-msandrnnsjulia 図出典: 深層学習 - 岡谷貴之
▪ Variational Auto Encoder 「入力 = 出力」になるようにエンコード・デコード処理を学習するモデル • 正常データを入力すれば正常データが復元される •
異常データはうまく復元できない (Reconstruction Error 大) 18 図出典: https://www.slideshare.net/ssusere55c63/variational-autoencoder-64515581
▪ DL4J (Scala) を用いたニューラルネット実装 1. ニューラルネットの configuration オブジェクトを作成 + 学習におけるグローバルパラメータの設定
19 引用元: IBM - developerWorks 深層学習を利用して異常を検出するコグニティブ IoT ソリューションを開発する https://www.ibm.com/developerworks/jp/iot/library/iot-deep-learning-anomaly-detection-3/index.html 2. まず、0層目に LSTM (designed by Alex Graves) を載せる
▪ DL4J (Scala) を用いたニューラルネット実装 20 引用元: IBM - developerWorks 深層学習を利用して異常を検出するコグニティブ
IoT ソリューションを開発する https://www.ibm.com/developerworks/jp/iot/library/iot-deep-learning-anomaly-detection-3/index.html 3. LSTM 層の出力を入力とした Variational Autoencoder を載せる 4. 最後に、出力層を載せ、config を MultiLayerNetwork に食わせれば完了
▪ Apache Spark を用いた並列化 21 MultiLayerNetwork オブジェクトの代わりに、 分散学習のため、各ワーカーにおける訓練結果の平均を取る機構を加えて、 SparkDl4jMultiLayer に食わせればOK
fit メソッドに訓練データセットを食わせて学習(ここでは1000回 iteration) 引用元: IBM - developerWorks 深層学習を利用して異常を検出するコグニティブ IoT ソリューションを開発する https://www.ibm.com/developerworks/jp/iot/library/iot-deep-learning-anomaly-detection-3/index.html
▪ IBM developerWorks 引用元の IBM developerWorks チュートリアルは非常に参考になる https://www.ibm.com/developerworks/jp/learn/analytics/ ベアリングの振動観測のための加速度計センサーを例に、 1.
Node-RED を用いた擬似 IoT データ作成 2. Watson IoT Platform サービスを MQTT メッセージ・ブローカーとして利用 3. ニューラルネットワークの構築・訓練 4. センサーで受信したデータに対する応答確認 https://www.ibm.com/developerworks/jp/iot/library/iot-deep-learning-anomaly-detection-3/index.html IoT x Deep Learning システム開発の一連の流れを学べる ApacheSystemML, Tensorflow (TensorSpark) を用いた例もあり 22
▪ まとめ • 社会性フィルタにより削除 • ニューラルネットワークは入力と出力のマッピングを行う関数近似器 • Deeplearning4J (DL4J) は
Java/Scala で書ける商用ディープラーニング 開発ソフトウェア群 ◦ Skymind 社による商用サポートあり ◦ 他フレームワークで構築したモデルをインポート可能 • DL4J + LSTM + Variational Autoencoder で時系列データの異常検知 ◦ Apache Spark とネイティブに連携して並列コンピューティング 23
▪ きっと参考になると思う文献 • 仕事ではじめる機械学習 ◦ 有賀康顕、中山心太、西林孝 ◦ 従来の機械学習を仕事に活用するためのノウハウ • Deep
Learning: A Practitioner’s Approach ◦ Josh Patterson, Adam Gibson ◦ プログラミング実務家向けの深層学習 w/ DL4J 活用指南書 • 異常検知と変化検知 ◦ 井手剛、杉山将 ◦ 従来の機械学習を用いた異常・変化検知手法の解説本 • 深層学習を利用して異常を検出するコグニティブ IoT ソリューションを開発する ◦ Romeo Kienzler ◦ 深層学習を用いた IoT データ解析手法の解説 24
Backup 25
26 https://www.abeja.asia/news/