JP7189553B2 - 推論方法、推論装置及びプログラム - Google Patents
推論方法、推論装置及びプログラム Download PDFInfo
- Publication number
- JP7189553B2 JP7189553B2 JP2019192988A JP2019192988A JP7189553B2 JP 7189553 B2 JP7189553 B2 JP 7189553B2 JP 2019192988 A JP2019192988 A JP 2019192988A JP 2019192988 A JP2019192988 A JP 2019192988A JP 7189553 B2 JP7189553 B2 JP 7189553B2
- Authority
- JP
- Japan
- Prior art keywords
- inference
- query
- reasoning
- vector
- answer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims description 35
- 238000012549 training Methods 0.000 claims description 24
- 239000011159 matrix material Substances 0.000 description 22
- 238000012545 processing Methods 0.000 description 16
- 238000004364 calculation method Methods 0.000 description 12
- 238000004891 communication Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 230000014509 gene expression Effects 0.000 description 5
- 238000010801 machine learning Methods 0.000 description 4
- 238000002945 steepest descent method Methods 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 241000282326 Felis catus Species 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000017105 transposition Effects 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
まず、本発明の実施の形態における推論装置10を説明する前に、TensorLogについて説明する。TensorLogは、一階述語論理によって記述された規則の集合と、非負実数のパラメータが付与された事実の集合{f1,・・・,fn}とで構成される。事実は、述語記号p,q,・・・等と、定数a,b,c,・・・等とを用いて、例えば、p(a,b),q(c)等といった形で記述される。また、全ての定数で構成される集合Cは有限である。
uncle(X,Y)←parent(X,W),brother(W,Y)
を含み、事実として
parent(liam,eve),0.99
parent(dave,eve),0.99
parent(liam,bob),0.75
brother(eve,chip),0.9
を含むTensorLogの確率モデル(以降、確率モデルを単に「モデル」とも表す。)が与えられたものとする。このモデルでは、uncle,parent,brotherが述語記号であり、bob,chip,eve,liamが定数となる。また、事実に付与されている非負の実数(つまり、0.99,0.99,0.75,0.9)がパラメータを表している。なお、これらのパラメータは「重み」とも称される。
vW=MparentvX
vY=MbrothervW
により行列計算を繰り返し実行してベクトルvXを更新し、ベクトルvYを得る。具体的には、vW=MparentvXにより行列計算を実行してベクトルvXをvWに更新した後、vY=MbrothervWにより行列計算を実行してベクトルvWをvYに更新する。これにより、uncle(dave,Y)のYに対して5つの定数bob,chip,dave,eve,liamをそれぞれ代入した場合におけるスコアがvY=(0,0.891,0,0,0)tとして計算できる。この結果よりY=chipとするのが最も確率の高い答えとなる(つまり、クエリに対する回答はY=chipである。)。
次に、本発明の実施の形態における推論装置10の機能構成について、図2を参照しながら説明する。図2は、本発明の実施の形態における推論装置10の機能構成の一例を示す図である。
以降では、本発明の実施の形態における学習処理の流れについて、図3を参照しながら説明する。図3は、本発明の実施の形態における学習処理の一例を示すフローチャートである。
以降では、本発明の実施の形態における推論処理の流れについて、図4を参照しながら説明する。図4は、本発明の実施の形態における推論処理の一例を示すフローチャートである。なお、図4では、モデル記憶部107に記憶されているモデルのパラメータは学習済みであるものとする。
ここで、図4のステップS202で確率を推論する処理の詳細について説明する。上記の手順1~手順2で説明したように、TensorLogでは、因子グラフを作成した上で、この因子グラフに沿って行列計算を繰り返し実行して、問い合わせ(クエリ)に対応するベクトルの値を更新することで所望の確率の計算を行う。本発明の実施の形態では、このベクトルの値の更新方法が既存のTensorLogと異なる。具体的には、本発明の実施の形態では、TensorLogにて述語pに対応する|C|×|C|の行列Mpとの乗算によりベクトルの値を更新している箇所を以下の式(1)に置き換える。
Marco Cuturi, Mathieu Blondel, "Soft-DTW: a Differentiable Loss Function for Time-Series", in Proceedings of ICML, 2017
また、γはパラメータであり、γ>0であるものとする。γ>0のときは、rijは微分可能な編集距離と一致する。なお、γ=0のときは、rijは通常の編集距離である。
次に、図3のステップS102でパラメータを推定(学習)する処理の詳細について説明する。パラメータ推定処理では、通常のTensorLogと同様に、モデルのパラメータで目的関数を微分して勾配を求めた上で、この勾配に基づいてパラメータを更新する。具体的には、本発明の実施の形態では、TensorLogにて述語pに対応する|C|×|C|の行列Mpとの乗算によりベクトルの値を更新している箇所を上記の式(1)に置き換える。上記の式(1)はγ>0であれば微分可能であるため、モデルのパラメータ
最後に、本発明の実施の形態における推論装置10のハードウェア構成について、図5を参照しながら説明する。図5は、本発明の実施の形態における推論装置10のハードウェア構成の一例を示す図である。
101 モデル入力部
102 訓練例入力部
103 パラメータ推定部
104 クエリ入力部
105 推論部
106 回答出力部
107 モデル記憶部
Claims (6)
- 規則と学習済みのパラメータが付与された事実の集合と述語記号の集合と構造を持った項の集合とが含まれる確率モデルに対する問い合わせが与えられると、前記項の間の類似度を用いて、前記規則に対応する因子グラフに従って前記問い合わせに対応するベクトルを更新することで、前記問い合わせに対する回答を推論する推論手順と、
前記推論手順で推論された回答を出力する出力手順と、
をコンピュータが実行することを特徴とする推論方法。 - 前記確率モデルに対する訓練例が与えられると、前記項の間の類似度を用いて前記因子グラフに従って前記訓練例に対応するベクトルを更新し、該更新されたベクトルと前記訓練例との誤差に基づいて前記パラメータを学習するパラメータ推定手順、をコンピュータが実行することを特徴とする請求項1に記載の推論方法。
- 前記構造を持った項は文字列である、ことを特徴とする請求項1又は2に記載の推論方法。
- 第1の文字列と第2の文字列との間の前記類似度は、
前記第1の文字列の長さiの接頭辞と前記第2の文字列の長さjの接頭辞とを用いてi=0及びj=0から順に再帰的に計算される、微分可能な編集距離である、ことを特徴とする請求項3に記載の推論方法。 - 規則と学習済みのパラメータが付与された事実の集合と述語記号の集合と構造を持った項の集合とが含まれる確率モデルに対する問い合わせが与えられると、前記項の間の類似度を用いて、前記規則に対応する因子グラフに従って前記問い合わせに対応するベクトルを更新することで、前記問い合わせに対する回答を推論する推論手段と、
前記推論手段により推論された回答を出力する出力手段と、
を有することを特徴とする推論装置。 - 請求項1乃至4の何れか一項に記載の推論方法における各手順をコンピュータに実行させることを特徴とするプログラム。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019192988A JP7189553B2 (ja) | 2019-10-23 | 2019-10-23 | 推論方法、推論装置及びプログラム |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019192988A JP7189553B2 (ja) | 2019-10-23 | 2019-10-23 | 推論方法、推論装置及びプログラム |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021068186A JP2021068186A (ja) | 2021-04-30 |
JP7189553B2 true JP7189553B2 (ja) | 2022-12-14 |
Family
ID=75637239
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019192988A Active JP7189553B2 (ja) | 2019-10-23 | 2019-10-23 | 推論方法、推論装置及びプログラム |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7189553B2 (ja) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015018394A (ja) | 2013-07-10 | 2015-01-29 | 富士通株式会社 | 有向グラフ生成方法、有向グラフ生成プログラム、及び有向グラフ生成装置 |
-
2019
- 2019-10-23 JP JP2019192988A patent/JP7189553B2/ja active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015018394A (ja) | 2013-07-10 | 2015-01-29 | 富士通株式会社 | 有向グラフ生成方法、有向グラフ生成プログラム、及び有向グラフ生成装置 |
Non-Patent Citations (1)
Title |
---|
William W. Cohen,"TensorLog: A Differentiable Deductive Database",arXiv.org [online],arXiv:1605.06523v2,米国,Cornell University,2016年,pp.1-10,[検索日 令和4年11月10日], インターネット:<URL:https://arxiv.org/pdf/1605.06523v2> |
Also Published As
Publication number | Publication date |
---|---|
JP2021068186A (ja) | 2021-04-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Molnar et al. | General pitfalls of model-agnostic interpretation methods for machine learning models | |
Michelucci | Applied deep learning | |
Raschka et al. | Python machine learning: Machine learning and deep learning with Python, scikit-learn, and TensorFlow 2 | |
Campesato | Artificial intelligence, machine learning, and deep learning | |
Rhys | Machine Learning with R, the tidyverse, and mlr | |
Brownlee | XGBoost With python: Gradient boosted trees with XGBoost and scikit-learn | |
Korner-Nievergelt et al. | Bayesian data analysis in ecology using linear models with R, BUGS, and Stan | |
McClure | TensorFlow machine learning cookbook | |
CN110362723B (zh) | 一种题目特征表示方法、装置及存储介质 | |
Kollmannsberger et al. | Deep learning in computational mechanics | |
CN110909125B (zh) | 推文级社会媒体谣言检测方法 | |
JP6172317B2 (ja) | 混合モデル選択の方法及び装置 | |
Coelho et al. | Building Machine Learning Systems with Python: Explore machine learning and deep learning techniques for building intelligent systems using scikit-learn and TensorFlow | |
Garreta et al. | Scikit-learn: machine learning simplified: implement scikit-learn into every step of the data science pipeline | |
Sosnovshchenko et al. | Machine learning with Swift: artificial intelligence for iOS | |
KR20200046189A (ko) | 생성적 적대 신경망에 기반한 협업 필터링을 위한 방법 및 시스템 | |
CN107688865A (zh) | 识别网络游戏中潜在高消费用户的方法及设备 | |
CN114021722A (zh) | 一种融合认知刻画的注意力知识追踪方法 | |
Habib | Hands-on Q-learning with python: Practical Q-learning with openai gym, Keras, and tensorflow | |
CN115238169A (zh) | 一种慕课可解释推荐方法、终端设备及存储介质 | |
CN117744754A (zh) | 大语言模型任务处理方法、装置、设备及介质 | |
Leekha | Learn AI with Python: Explore machine learning and deep learning techniques for building smart AI systems using Scikit-Learn, NLTK, NeuroLab, and Keras (English Edition) | |
Lin et al. | Practitioner’s Guide to Data Science | |
JP7189553B2 (ja) | 推論方法、推論装置及びプログラム | |
EP3614314A1 (en) | Method and apparatus for generating chemical structure using neural network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7426 Effective date: 20191028 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20191028 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220214 |
|
TRDD | Decision of grant or rejection written | ||
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20221116 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20221122 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20221124 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7189553 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |