Slide 1

Slide 1 text

Do Automata 2024/08/24 - Kyoto. #6 Hiroya Fujinami (@make_now_just) / NII 学習 !!

Slide 2

Slide 2 text

Formal Method 形式 手 法

Slide 3

Slide 3 text

ܗࣜख๏ʢ͚͍͖͠͠Ύ΄͏ɺӳ: formal methodsʣ ͸ɺιϑτ΢ΣΞ޻ֶʹ͓͚Δ਺ֶΛج൫ͱͨ͠ιϑ τ΢ΣΞ͓Αͼϋʔυ΢ΣΞγεςϜͷ࢓༷هड़ɺ։ ൃɺݕূͷٕज़Ͱ͋Δ[1]ɻιϑτ΢ΣΞ͓Αͼϋʔυ ΢ΣΞઃܭ΁ͷܗࣜख๏ͷద༻͸ɺଞͷ޻ֶ෼໺ͱಉ ༷ɺద੾ͳ਺ֶతղੳΛߦ͏͜ͱͰઃܭͷ৴པੑͱؤ ݈ੑ͕޲্͢Δͱ͍͏༧૝ʹΑͬͯಈػ෇͚ΒΕ͍ͯΔ [2]ɻ 出典: 百科事典 『 (Wikipedia)』

Slide 4

Slide 4 text

ܗࣜख๏ʢ͚͍͖͠͠Ύ΄͏ɺӳ: formal methodsʣ ͸ɺιϑτ΢ΣΞ޻ֶʹ͓͚Δ਺ֶΛج൫ͱͨ͠ιϑ τ΢ΣΞ͓Αͼϋʔυ΢ΣΞγεςϜͷ࢓༷هड़ɺ։ ൃɺݕূͷٕज़Ͱ͋Δ[1]ɻιϑτ΢ΣΞ͓Αͼϋʔυ ΢ΣΞઃܭ΁ͷܗࣜख๏ͷద༻͸ɺଞͷ޻ֶ෼໺ͱಉ ༷ɺద੾ͳ਺ֶతղੳΛߦ͏͜ͱͰઃܭͷ৴པੑͱؤ ݈ੑ͕޲্͢Δͱ͍͏༧૝ʹΑͬͯಈػ෇͚ΒΕ͍ͯΔ [2]ɻ 出典: 百科事典 『 (Wikipedia)』

Slide 5

Slide 5 text

Formal Method ܗࣜख๏ 『数学的 記述 書 仕様』 用 、 ・ 振舞 正 数学的 証明 。 ・ 絶対 数学的 主張 。

Slide 6

Slide 6 text

Formal Method ܗࣜख๏ 『数学的 記述 書 仕様』 用 、 ・ 振舞 正 数学的 証明 。 ・ 絶対 数学的 主張 。

Slide 7

Slide 7 text

Model Checkin 検査 形式 手 法 一 種 (遷移 ) https://youtu.be/Xkq13ZthmA0 G (Pr(F ∧ N ) ≥ 1 8) 満 欲 性質 (時相論理式)

Slide 8

Slide 8 text

Model Checkin 検査 形式 手 法 一 種 (遷移 ) https://youtu.be/Xkq13ZthmA0 G (Pr(F ∧ N ) ≥ 1 8) 満 欲 性質 (時相論理式) 確率分布 極限 取 …… 検査

Slide 9

Slide 9 text

Model Checkin 検査 形式 手 法 一 種 (遷移 ) https://youtu.be/Xkq13ZthmA0 G (Pr(F ∧ N ) ≥ 1 8) 満 欲 性質 (時相論理式) 確率分布 極限 取 …… 検査

Slide 10

Slide 10 text

We have no mode 俺 現実

Slide 11

Slide 11 text

We have no mode 俺 現実 (遷移 )

Slide 12

Slide 12 text

We have no mode 俺 現実 (遷移 ) 助 ……

Slide 13

Slide 13 text

Automata 学習

Slide 14

Slide 14 text

Black-box 中 身 分

Slide 15

Slide 15 text

Angluin's L* algorithm L*

Slide 16

Slide 16 text

Angluin's L* algorithm L*

Slide 17

Slide 17 text

Type of Automata 型 lstar( system: string => T, equivalence: Automaton => true | string, ): Automaton

Slide 18

Slide 18 text

Type of Automata 型 lstar( system: string => T, equivalence: Automaton => true | string, ): Automaton 入力 ( 文 字列) 対 、 何 返 ?

Slide 19

Slide 19 text

Type of Automata 型 lstar( system: string => T, equivalence: Automaton => true | string, ): Automaton 入力 ( 文 字列) 対 、 何 返 ? 学習中 正 ?

Slide 20

Slide 20 text

Type of Automata 型 lstar( system: string => T, equivalence: Automaton => true | string, ): Automaton 入力 ( 文 字列) 対 、 何 返 ? 学習中 正 ? 教師

Slide 21

Slide 21 text

Type of Automata 型 lstar( system: string => T, equivalence: Automaton => true | string, ): Automaton 入力 ( 文 字列) 対 、 何 返 ? 学習中 正 ? 学習結果 教師

Slide 22

Slide 22 text

Minimally Adequate 教師 現実 学習 → 押 ? 次 移動 system("→")

Slide 23

Slide 23 text

Minimally Adequate 教師 現実 学習 → 押 ? 次 移動 → 仮説 A 次 現在 system("→")

Slide 24

Slide 24 text

Minimally Adequate 教師 現実 学習 正 ? →→ 押 動 違 ! → 仮説 A 次 現在 equivalence(A)

Slide 25

Slide 25 text

For More Informatio 詳細 Web https://makenowjust-labs.github.io/blog/post/2023-07-19-lstar/

Slide 26

Slide 26 text

Implement 実装 Learnlib: 的実装。Java製。 https://learnlib.de AALpy: MDP 。Python製。 https://github.com/DES-Lab/AALpy Lernen: 拙作。機能少 。昨 日 作 。Ruby製。 https://github.com/makenowjust/lernen

Slide 27

Slide 27 text

Implement 実装 Learnlib: https://learnlib.de AALpy: https://github.com/DES-Lab/AALpy Lernen: 拙作。機能少 。昨 日 作 。Ruby製。 https://github.com/makenowjust/lernen

Slide 28

Slide 28 text

Try it! 試

Slide 29

Slide 29 text

Try it! 試 require "bundler/inline" gemfile do source "https://rubygems.org" gem "lernen" end alphabet = %w[0 1] sul = Lernen::SUL.from_block do |inputs| inputs.count { _1 == "1" } % 4 == 3 end oracle = Lernen::BreadthFirstExplorationOracle.new(alphabet, sul) automaton = Lernen::LStar.learn(alphabet, sul, oracle, automaton_type: :dfa)

Slide 30

Slide 30 text

Try it! 試 require "bundler/inline" gemfile do source "https://rubygems.org" gem "lernen" end alphabet = %w[0 1] sul = Lernen::SUL.from_block do |inputs| inputs.count { _1 == "1" } % 4 == 3 end oracle = Lernen::BreadthFirstExplorationOracle.new(alphabet, sul) automaton = Lernen::LStar.learn(alphabet, sul, oracle, automaton_type: :dfa)

Slide 31

Slide 31 text

Try it! 試 require "bundler/inline" gemfile do source "https://rubygems.org" gem "lernen" end alphabet = %w[0 1] sul = Lernen::SUL.from_block do |inputs| inputs.count { _1 == "1" } % 4 end oracle = Lernen::BreadthFirstExplorationOracle.new(alphabet, sul) automaton = Lernen::LStar.learn(alphabet, sul, oracle, automaton_type: :mealy)

Slide 32

Slide 32 text

Try it! 試 require "bundler/inline" gemfile do source "https://rubygems.org" gem "lernen" end alphabet = %w[0 1] sul = Lernen::SUL.from_block do |inputs| inputs.count { _1 == "1" } % 4 end oracle = Lernen::BreadthFirstExplorationOracle.new(alphabet, sul) automaton = Lernen::LStar.learn(alphabet, sul, oracle, automaton_type: :mealy)

Slide 33

Slide 33 text

Try it! 試 require "bundler/inline" gemfile do source "https://rubygems.org" gem "lernen" end alphabet = %w[0 1] sul = Lernen::SUL.from_block do |inputs| inputs.count { _1 == "1" } == inputs.count { _1 == "0" } end oracle = Lernen::BreadthFirstExplorationOracle.new(alphabet, sul) automaton = Lernen::LStar.learn(alphabet, sul, oracle, automaton_type: :dfa)

Slide 34

Slide 34 text

Try it! 試 require "bundler/inline" gemfile do source "https://rubygems.org" gem "lernen" end alphabet = %w[0 1] sul = Lernen::SUL.from_block do |inputs| inputs.count { _1 == "1" } == inputs.count { _1 == "0" } end oracle = Lernen::BreadthFirstExplorationOracle.new(alphabet, sul) automaton = Lernen::LStar.learn(alphabet, sul, oracle, automaton_type: :dfa) 正規 言 語 助 ……

Slide 35

Slide 35 text

Implement 実装 Lernen: 拙作。機能少 。昨 日 作 。Ruby製。 https://github.com/makenowjust/lernen Learnlib: https://learnlib.de AALpy: https://github.com/DES-Lab/AALpy

Slide 36

Slide 36 text

Conclusi ・形式 手 法 ( 検査)   使 必要 ・既存 ・   得 方 法   学習

Slide 37

Slide 37 text

Who am I? 自 己 紹介 ・藤浪 大 弥 / Ph.D student at NII ・ @make_now_just   /  @makenowjust ・Hatena internship 2017 ・Ruby committer