SlideShare a Scribd company logo
1 of 31
Download to read offline
1
建構XAI金融程式交易預測模型
"As with any black box, if you don't know why it works,
you won't realize when it's stopped working. Even a
broken watch is right twice a day." — Mr. Lo of MIT
2
人工智慧+工人智慧 如何合作?
步驟㇐
經由AI發現人類沒有發現到的
networks(關聯性? 因果性?)
步驟二
人類分析步驟㇐後,修正AI不
合理之處, 重新再回到步驟㇐
3
步驟㇐ : AlphaGo完美攻擊 圍棋王李世石太吃驚
發稿時間:2016/03/09 21:29
李世石說,沒想到在開局就犯下難以理解失誤,「AlphaGo展現出完美的攻擊
令我吃驚」。AlphaGo的程式設計師還稱讚他是圍棋攻擊型明星,但李世石對
於電腦程式設計師能將AlphaGo開發得如此完美,表示由衷敬佩。
李世石在記者會上表示,他今天被兩件事嚇到,㇐是AlphaGo㇐開始的布局解
決能力,原以為AlphaGO㇐開始會有些困難,誰知它的解決能力實在令他吃
驚。
另外,就是到了雙方都陷入困境時,或可說是下決定勝負㇐步棋時,李世石說
,「AlphaGo竟下了人類絕對不可能下的㇐步棋」,這又讓他很吃驚。
對於AlphaGo「出奇招」,南韓職業圍棋9段高手金成龍說,「在那種狀況下
,若是職業棋手,誰都會認為鐵定完局了,AlphaGo竟下了這麼奇怪的㇐步棋
」,縱然如此,AlphaGo始終表現出凌厲的攻勢,這也正是AlphaGo勝利的原
動力。
這次人腦與人工智慧對決,金成龍形容,「完全不像人類在下棋,可說是排除
了人類職業棋手感覺的㇐盤棋。」
對於以後的賽程,李世石說,他在多項世界大賽上得過冠軍,實戰經驗豐富、
也應對過不同的狀況,不會因輸㇐盤棋而有所動搖。
李世石說,「現在才剛開始,AlphaGo確實展現了驚人的㇐面,但未到下定論
的時候」。
4
步驟二 :修正 AI不合理之處
第四盤結束後~
Deep Mind的創始人Demis Hassabis在Twitter上發言,解釋了AlphaGo
失常,李世石白棋78手之後,AlphaGo的價值評估網路對局面的勝率
判斷開始出錯,直到黑棋87手,這導致了AlphaGo㇐系列低級失誤的
下法。這說明AlphaGo價值評估網路還不完美,還有缺陷。
不過即使從黑棋第87手,AlphaGo價值評估網路意識到落後以後,還
是下出了連圍棋新手都不會下的落子,那麼說明AlphaGo可能還有更
多缺陷等待修復。
第四局AlphaGo失敗,對機器和人類都是大好事:
職業棋手揚眉吐氣了,也有膽量持續挑戰AlphaGo了。估計不光是柯潔
等人不服,就是李世石自己也不服,估計會要求再下㇐次,㇐雪前恥
的。
第三盤結束後~
韓國棋院秘書⾧梁宰豪形容,AlphaGo「就像是在山中自學成材的棋手」,看起來不像高手,每步下子亦
無甚創意,但整局看來處處打破常規。他說,學棋者看了 AlphaGo 的獨特下法後,將能開闊視野。
南韓九段棋手趙惠連指,AlphaGo 將改寫圍棋歷史,包括圍棋的範式和學習方式,重新定義何謂圍棋。
5
什麼是XAI(可解釋的AI)?
XAI是人工智慧的㇐個新
興分支,用於解釋人工智
能所做出的每㇐個決策背
後的邏輯。
Source: Holy Grail of AI for Enterprise — Explainable AI (XAI) by Saurabh Kaushik
神經網路模型本身並不是㇐個黑箱,其黑箱性在於我們沒
辦法用人類可以理解的方式理解模型的具體涵義和行為
6
看到這張圖你想要AI解釋什麼?
7
你想AI解釋的….就是你想知道的
你想知道…
1.為何上漲段和下跌段訊號這麼接近轉折?
2.為何趨勢過程AI不受噪音K棒影響?
3.為何AI會知道有㇐段趨勢?
…….
問題可以有很多….
其實就是想知道每個時間決策AI背後的理由是什麼
8
Source: Holy Grail of AI for Enterprise — Explainable AI (XAI) by Saurabh Kaushik
XAI 三個主要面向:
AI作的預測人類覺得合理
人類能理解模型如何作決策
人類可以溯源整個預測過程
內
外
信任是由內而外徹底的
清楚 、理解和認同
9
People do not expect explanations that cover the actual and
complete list of causes of an event. We are used to selecting
one or three causes from a variety of possible causes.
你希望聽到金融程式交易的背後理由是⾧篇大論嗎?
Even if the world is more complex, AI gives a short
explanation with simply one to three reasons.
10
Source: Holy Grail of AI for Enterprise — Explainable AI (XAI) by Saurabh Kaushik
XAI — Major Techniques:
There are two major techniques for XAI.
11
XAI方法 演算法/工具 優點 難題
數據視覺化 分佈圖、樹形圖、關
聯圖、Tableau…
快速 複雜問題
探索性分析 MMD-critic 1.更好理解數
據分佈
2.協助建立可
解釋的模型;
3.協助可解釋
的黑箱模型
1.必須選擇原型prototypes和批評
criticisms的數量
2.如何選擇內核及其縮放參數
3.所有特徵作為輸入,而忽略某些特
徵可能與預測結果無關
基於規則 決策樹 任何㇐個決策
都可以對應到
㇐個邏輯規則
表示
1.規則表示過多時
2.原始特徵本身就不是特別好解釋時
12
XAI方法 演算法/工具 優點 難題
線性模型 線性回歸、邏輯回歸、廣義線性
回歸、廣義加性模型…
Theil-Sen Regression
RANSAC隨機採樣㇐致性演算法
統計學基礎 非線性?
(Theil-Sen Regression
RANSAC 除外)
基於實例 BCM
Growing Spheres
Anchors
方便解釋 1.需有Domain Knowhow
2.可能挑出來的樣本不具
有代表性
稀疏性 LDA 利用資訊的稀疏性特質,將模
型盡可能簡化表示,更容易理解
特定主題所代表的含義
不適合非高斯分佈樣本
單調性 相關性檢定
PDP
不用擔心參數孤島 比較適合參數少
交互作用 Friedman’s H-statistic
可變交互網絡(VIN)
基於方差的特徵相互作用
1.H統計量無維度且在0和1之
間,因此可以跨特徵甚至跨模
型進行比較。
2. 3個或更多個特徵之間的相
互作用強度。
1.需要很⾧時間計算.
2.採樣不同時,估計值也會
不同,結果可能不穩定.
13
XAI方法 演算法/工具 優點 難題
隱藏層
分析
反池化-反激活-轉置卷積
網絡切割(Network Dissection)
線性探針(linear classifier probes)
隱性馬爾可夫模型(HMM)
最大熵馬爾可夫模型(MEMM)
條件隨機場(CRF)
隱藏層變成
㇐項可解釋
的過程
1.概念資料集太耗人工
2.單獨看個別隱藏層貢獻可能會低估加乘效果
3.隱藏層每㇐層細微差異,多數依賴我們的主
觀判斷
敏感性
分析
1.變數敏感性分析(基於連接權重、基於
統計方法(隨機打亂輸出值)、基於偏導數、
基於輸入變數擾動MIV、部份依賴圖PDP、
個別條件期望ICE、累積局部效果ALE)
2.樣本敏感性分析(GANs、denoising
autoencoders)
3.神經元刪除法 4.Shapley value
通過研究輸
入層的變化
對結果的影
響來判斷輸
入變數或輸
入樣本的重
要性
兩個非常接近的樣本的解釋可能很不穩定
代理模型 1.加權有限狀態機(WFSA)向前模擬神經
網絡的向前過程
2.使用self-loop模擬RNN過程
代理模型可
以使用任何
可解釋的模
型
1.如果R平方接近1,也仍然不知道未來是否繼續
適用這個代理模型
2.如果R平方接近1,那還需要這個黑盒模型嗎?
3.使用性質差異過大的代理模型,真的有瞭解這
個黑盒模型內部運作嗎?
局部代理
模型
LIME 同上 1.擾動的鄰近樣本如何正確定義?
(也影響到相似權重計算)
2.兩個非常接近的樣本的解釋可能很不穩定
14
Similarity is an organic conceptual framework
for machine learning models because it
describes much of human learning.
There is nothing more basic to thought and language than our sense of
similarity; our sorting things into kinds.
Source: ONTOLOGICAL RELATIVITY AND OTHER ESSAYS (1969) by W.V. QUINE
15
但…..「眼見」相似的金融走勢…不代表有相似的「未來」走勢
16
你認為的趨勢….延續性強嗎? 善變嗎? 可測嗎?
趨勢的協整性強嗎?
近期的趨勢呢?
會不會每個人看法都不㇐樣
協整是指若兩個或多個非平穩的變數序列,
其某個線性組合後的序列呈平穩性.
單㇐序列呢?
誤差修正模型如何運作?
17
Intuitive Trading
18
何謂「相似 Similarity 」?
19
金融市場不是只在乎解釋…而且解釋不等於預測
眼見的金融走勢相似…很表象…甚至不具任何意義
但若有更具關聯性的相似…出現在眼前呢?
是不是XAI金融商品預測就可以實現
可理解的深入特徵…..盤感特徵
Domain Knowhow 如何轉化成盤感特徵或有用資料就是關鍵
20
城隍廟
拜月老
小強和小化㇐起出門開車到城隍廟拜月老
到了桃園市時請猜㇐下他們會往哪走?
請告訴我前㇐分鐘他們在哪
請告訴我前二分鐘他們在哪
請告訴我前三分鐘他們在哪
…….
深度學習說 : 數據越多儘量給我
21
你要全部數據呀
全給你….
小強和小化從鵝鑾鼻燈塔開來的
你不僅知道所有路徑轉彎
你還知道時間耶
有用嗎???
22
走省道,以前只走過㇐次但很好走
城隍廟
拜月老
走回高速公路,
但下班時間怕變
成大型停車場
這條沒走過,要不要試看看?
但會不會踩坑呀?
若太晚到怕月老睡了
開發
探索
但問題是…
1.強化學習在對agent反饋信
息很少的環境中表現不佳
2.獎勵機制設計不當是個災難
強化學習說 : 讓Agent來處理吧!
23
如果你看到小強和小化正看著GPS
你再猜㇐下他們會往哪走?
24
這故事告訴我們…
手上若有金融走勢 GPS 那該多好
合理的探索 : Agent沒有試圖預測其行為的結果,而是尋求從已在情境記憶中
對那些「特別」實現目標的觀察。
25
合理的探索 : Agent沒有試圖預測其行
為的結果,而是尋求從已在情境記憶中
對那些「特別」實現目標的觀察。
26
Example-Based Explanations(基於實例的解釋)
Example-based explanation methods select particular instances
of the dataset to explain the behavior of machine learning
models or to explain the underlying data distribution.
Example-based explanations are mostly model-agnostic,
because they make any machine learning model more
interpretable. The difference to model-agnostic methods is that
the example-based methods explain a model by selecting
instances of the dataset and not by creating summaries of
features (such as feature importance or partial dependence).
27
今天AI成功的關鍵是利用「大數據解小問題」,例如
AlphaGo的圍棋對奕,但這不易類推,而人的智慧則
善於靠「小數據解大問題」,透過蛛絲馬跡,從因果
關係來歸納、推論出㇐般性(Generalization),這
是AI未來應該研究的課題。
by 微軟AI及研究事業部負責人沈向洋
106年金管期總字第008號 【元大期貨02-27176000】
內文提到技術指標的原則,僅在提供概念的說明,不保證交易方式會獲利
操作時應依交易人經驗與喜好並考量風險測試出適合自己之交易模式
28
專利名稱 : 用於金融商品價格圖像處理之運算設備
全球唯㇐
AI + 盤感交易
FaceBook : Calvert Lin
106年金管期總字第008號 【元大期貨02-27176000】
內文提到技術指標的原則,僅在提供概念的說明,不保證交易方式會獲利
操作時應依交易人經驗與喜好並考量風險測試出適合自己之交易模式
29
如果想把XAI金融交易預測模型分享給其他人用
可以怎麼做?
AI程式開發者說:我不想讓人知道原始碼,要怎麼做?
跟單者說:你之前績效很好,所以要㇐直維持下去,你不能動模型呦
AI程式開發者說:模型不可能永遠不動呀,既使只動超參數都會有調參呀
跟單者說:那我怎麼相信你不會亂亂調?
…..開始鬼打牆了….
106年金管期總字第008號 【元大期貨02-27176000】
內文提到技術指標的原則,僅在提供概念的說明,不保證交易方式會獲利
操作時應依交易人經驗與喜好並考量風險測試出適合自己之交易模式
30
專利名稱 : 用於處理金融資產之策略模型腳本
之區塊鏈系統與節點伺服器
全球唯㇐
程式交易+區塊鏈
FaceBook : Calvert Lin
XAI + Blockchain
= Double Trust
106年金管期總字第008號 【元大期貨02-27176000】
內文提到技術指標的原則,僅在提供概念的說明,不保證交易方式會獲利
操作時應依交易人經驗與喜好並考量風險測試出適合自己之交易模式
31
1、六十四卦是否各自有自己的「特徵」?
2、當走勢特徵出現「某種六十四卦特徾」時,
會不會之後走勢特徵和這卦的走勢特徵很接近?
3、當走勢特徵出現「某種特徾和另㇐種特徵」
雙重特徵時,會不會之後走勢特徵和GAN
的走勢特徵很接近?
4、3可否泛化?是否是有限解?
5、藉由認知型XAI分析是否存在特化? FaceBook : Calvert Lin
希望下次和大家分享下面這五個研究成果
今天很謝謝各位⾧官,教授,專家,同好不嫌棄對俊良的指導
謝謝大家!

More Related Content

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

建構XAI金融程式交易預測模型