2022-12-19

清華大學電機系81級民國66-68學年度於教室與實驗室

 清華大學電機系81級教室民國66學年度(夏肇毅提供):















清華大學電機系81級電子實驗課民國68年(夏肇毅提供)






清華仁愛工作隊

 大一開始,也參加了清華仁愛工作隊這個社團。

仁工隊的常態服務包括有兒童之家,少年監獄,課輔以及暑期山地服務。

不定期活動包括電影義演,康輔研習營,接待機構院童來校活動等。

仁工隊歷任社長為 66學年詹本中(電機80),67學年夏肇毅(電機81)。

我大一時在仁工隊主要是參加每週兒童之家的訪問,以及負責整個仁工隊的宣傳海報繪製。

後來經詹本中學長傳承,大二開始接掌社長職務。

仁工隊每學年的第一場活動就是電影義演。

學校讓這義演的收入給仁工隊做為社團活動經費。

結果我開張第一場的活動就碰上颱風,人數稀少,收入勉強打平。

這也上了社會大學第一課:意外隨時會發生,要準備好備案。

但我們的義演就只有一次機會,以後省經費著用就好。 

後來也舉辦了學校的康輔研習營,讓大家學習如何舉辦活動。

這是技術Hard Skill的教學傳承。

辦完之後,主任說這次辦得很好,以後寒暑假康輔研習名額就由你們來分配。

將這訊息告知承辦人後,馬上踢到鐵板,才察覺侵犯到別人的領域的嚴重性。

又上了社會大學第二課:人情世故Soft Skill 才是職場最重要的學問。

以後就只好邊做邊學,小心為上囉!


清華大學仁愛工作隊光華國中課業輔導民國68年4月-2(夏肇毅提供):

























清華大學仁愛工作隊光華國中課業輔導民國68年4月-3(夏肇毅提供):

























清華大學仁愛工作隊光華國中課業輔導民國68年4月-1(夏肇毅提供):























清華大學仁愛工作隊新竹伯大尼兒童之家民國67年5月-1(夏肇毅提供):



清華觀瀾社

 清華觀瀾社是一個人文社團, 以談話性活動為主軸。

進入清華後大一時, 參加了觀瀾社。

當時的社長是工業工程系三年級的莊春藻(工工79)。

所謂瀾就是波瀾壯闊的瀾, 浪很大的意思。

民國66年10月清華觀瀾社舉辦了南寮觀瀾的迎新活動,到南寮海邊看日落。

後來又到百齡堂旁邊的住宿部兩層紅磚樓房中,拜訪李家同老師以及師母。


還舉辦了石門水庫夜遊,先拜訪韋端老師在石管局旁的住處(應該是石園吧?)。 晚飯後,再順著石園旁的鐵絲圍籬,一路走到石門水庫。山區夜間十分安靜,只聽得到蟲鳴,有一些寒意。 


民國66年10月清華觀瀾社南寮觀瀾迎新活動照片:






2022-11-23

Design of a Robo-Tutor for AI Financial Systems

 Design of a Robo-Tutor for AI Financial Systems


Chao-Yih Hsia ( 夏肇毅 )

CubicPower Smart Center 

CubicPower.idv.tw

Taipei,Taiwan



ABSTRACT


智慧金融教學機器人設計: 我們在這裡規劃了一個智慧金融的教學機器人。先根據每個人的學習目標選定學習路徑,在為每個人分析知識斷點後,產生客製化的教學藍圖。然後利用循環地演示,練習,小考,評量流程來執行自動教學工作。我們定義了在JSON下的結構化知識格式及不同的知識陳述型態。同時並以AI類神經網路進行了要學習多少內容才有辦法進行推論的實驗。最後並提出如何由結構化知識庫中不同的陳述型態來做測驗的方法。


關鍵字:教學機器人,智慧金融,理財機器人,類神經網路, 人工智慧


This is a design of robo-tutors to do the training online for the institutes to promote AI financial technology without hiring new professional tutors.

We've planned a Robo-Tutor for AI Financial Systems. First we draw study paths based on each one’s study goals. Then we’ll generate a study roadmap after we tested the points of disruption of the study paths. Our robo-tutor does the presentation, practice, quiz and exam tasks based on this roadmap. We define the JSON structure knowledge format and different knowledge statement types for this robo-tutor. We use an RNN Bidirectional LSTM model to test how much data we need before we can infer other contents we’ve never learned. Finally we present how to do tests with different statement types.


Keywords: Robo-tutor, Robo-Advisor, Artificial Intelligence, Neural Network, AI Financial Systems


  1. Introduction


In recent years, financial institutes adopt the digital transformation to increase the performance and cut costs. Like robo-advisors[5] help people invest their money to get more profits and reduce risks, we can also design a robo-tutor to do the training jobs online for the institutes to promote financial technology without hiring new professional tutors. AI financial systems use AI algorithms in  daily financial processes. Therefore its robo-tutor should be able to deliver knowledge of the financial markets and AI domains.


The goals of our Robo-Tutor design should be:

-To train users to handle real world financial markets with AI algorithms.

-To provide knowledge, data and AI algorithms.

-To build up experimental APIs for  practice.


We plan to build up the knowledge about  artificial intelligence in financial markets in this robo-tutor. Let people learn AI and financial courses[8] and review results immediately. 


Typical processes of machine learning are: prepare, train, verify and infer data. And the ways of a human classroom are presentation, practice, quiz and exam. Practice is a process of  memorizing, just like training. Some theories say human brains need to repeat 21 times before bearing in mind. Therefore our robo-tutor needs to repeat a unit several times within a certain time to help people to bear in mind easily.


A robo-tutor can build a personal study plan for each person based on how much you’ve learned. During the exam process, it can track the areas you are not familiar with. Then dig into their underlying components to find points of disruption of the lowest level. These are the start points of study in your personal study roadmap.


  1. Previous Works


In our earlier works[4], we planned a blueprint of building a robo-advisor based on a structured knowledge processing network. The idea comes from the conceptual model of  human brain operations. The hierarchical arrangement of knowledge stickers allows human experiences  to be executed to manage the portfolios of clients properly.  And in later works[1,2,3], we planned to use a robot tool  to help teachers in the classroom. These tools allow students to practice financial formulas of investment and cryptography  online[7]. 


  1. Structured Knowledge Base


We use a JSON data structure to keep all knowledge on our robo-tutor.  A JSON data format supports the dictionary {} and the array [] data type. We can keep the whole knowledge within a big structured knowledge tree there.


Definition 1: Knowledge Tree (KT)


A Knowledge Tree is a piece of JSON data to represent the structure of the knowledge. 


Example:

KT={

“f(A,B)”:{

“A”: [A1,

{“A2”: [A21,A22,A23]}, 

A3,..],

“B”: [B1,B2,B3,..]}, 

“f(C,D,E)”:{

“C”: [C1,C2,..] ,

“D”: [D1,D2,..], 

“E”: [E1,E2,..]},

“f(F,G)”:{

“F”: [F1,F2,..],

“G”: [G1,G2,..]},…

}


Under this KT we can understand principles, derive results and solve problems. Here we need to define what the words “principle”, “understand”, ”derive”, ”solve” mean.


Definition 2: Principles


A principle is a knowledge subtree(KST).


Examples:


Principle of Investment


Investment={

“Instruments”: [Stock,Bond,Cash,..],

"Compound":{

“CF(r,n)”: (1+r)^n,

”r”:rate,

”n”:period},

"Discount":{

“CP(r,n)”: 1/(1+r)^n,

”r”:rate,

”n”:period},...

}


Principle of Cryptography


Cryptography=[Hash,Encrypt,Decrypt,Sign,Verify]


Principle of blockchains


blockchain=[{“block”:..,”hash”:..}]


Principle of Neural Networks


Neural Network={

Learn:{

“Gradient Descent”: New weight=weight *Learning Rate * -Gradient(Error),

”Learning Rate”:Constant

},

“Error”: Answer - Prediction,

”Prediction”: f|weights(Inputs),

“Gradient Descent”:  -Gradient(Error), “Backpropagation”: Propagate Gradient with Chain Rule (Error)

}


Definition 3: Understand


All nodes of a knowledge subtree have been studied.


Definition 4: Derive


Extend to a complete knowledge subtree (KST) from some leaf nodes. Also need to fill the gap if  missing nodes in this KST exist.


Definition 5: Computible Principle


If we know the values of all leaf nodes of a subtree then we can say this is a computable principle. To get the value of this principle, we do the problem solving procedure.


Definition 6: Problem Solving


Compute values of leaf nodes first, then the upstream nodes. Finally,compute the root node value of the knowledge subtree. 


Example:

KST={

“f(A,B)”={

“A”: fa(A1,A2),

“B”: fb(B1)}

}

Question:

 if A1=1,A2=2,B1=3,

 then f(A,B)=?

Answer: 

B=f(B1), 

A=f(A1,A2),

f(A,B)=f(fb(B1), fa(A1,A2)) 

=f(fb(3),fa(1,2))


  1. Knowledge Statement Types


When we deliver knowledge, we describe different principles with statements. Typical statements are “A is B”, “A consists of B,C,D”, “if A, then B.”,.. etc. Here we list some statement types used in our design:


A=B

Examples:

  • {“A”:B}

  • A is B.

  • A equals to B.


A=[B,C,D,...]

Examples:

  • {“A”:[B,C,D,...]}

  • A consists of B,C,D.

  • B,C,D belong to A.


if..then(direct)

Examples:

  • if A=B,then f(A)=f(B)

  • {“if..then(direct)”: if_then(“A=B”, ”f(A)=f(B)”) }


if..then(indirect)

Examples:

  • if A=B, B=C,then A=C

  • {“if..then(indirect)”:

if_then(“A=B,B=C”,”A=C”)}


Statement=True

Examples:

  • {“Statement”:True}

  • Statement A is correct.

  • Statement A is true.


Statement=False

Examples:

  • {“Statement”:False}

  • Statement A is incorrect.

  • Statement A is not true.


Statement: Formula

Examples:

  • {“Statement ”:Formula}

  • Statement: B=f(C,D)=C/(1+D)^2

  • {“B”:f(C,D),

“f(C,D)”:C/(1+D)^2} 


Getting value of a function

Examples:

  • {“B”:f(C,D),“f(C,D)”:C/(1+D)^2}

  • If C=1,D=2, then B=?

B=f(1,2)=1/(1+2)^2  


  1. Tasks of a robo-tutor


5.1 Train different principles

A robo-tutor trains users by showing topic nodes of the selected principles periodically. Each topic node should include the definition, description and examples attributes for people to study. It will be difficult to learn a topic unless we know all its underlying knowledge. Therefore, it’s better to  teach a principle with a bottom up method. 


After a presentation, we should practice some examples and then test. Once a topic has been teached, we need to review it randomly. Try to meet the 21 times target. 


5.2 Problem Solving

If the question is a direct “if..then” statement then we simply compute the result with its formula directly. But if the question is  an indirect “if..then” statement, then we need to compute values of leaf nodes first and then upstream step by step  to get the root node value at last. 


5.3 Derive principles

Extend to a complete knowledge subtree from partial leaf nodes of the subtree. Also need to fill the gap by guessing  if  missing nodes in this KST exist.


5.4 Evaluate performance

Quizzes and exams are the way to understand how much users have learned. If users fail the test, digging down to find lower level points of disruption is the key to keep on studying.


  1. Minimum Knowledge for Inferring


In order to know how much content we need to study before getting an inferring ability, we did an  experiment with an AI Movie Reviews Sentiment Analysis model. This task is like training people to learn how to identify the sentiment of the contents by our robo-tutor.  Two class sentiment analysis is similar to the true or false test therefore it could be used as a reference of  our robo-tutor exams result.  


We used two different datasets: IMDB (Internet Movie Database) and SST (Stanford Sentiment Treebank) in this experiment. The IMDB dataset consists of 50000 records with 128.5 words each record on average and the SST dataset consists of 8544 records with 11.67 words each record  on average. The datasets contain two classes of results: positive or negative. Therefore the correct random guess result would be 50%.


We built a Bidirectional LSTM RNN model to train these data by changing training data percentage and get the following result. Each time we trained the model up to reach more than 99% of accuracy with different percentages of the training data. We then calculate the scores with a formula of :

score=percentage*accuracy +

  (1-percentage)*val_accuracy.

Here we set the accuracy value  as 0.99.


We train the model with different percentages of data to see the score changes and get the result in figure 1.


We found when we train the model with a small amount of data, the val_accuracy is around 0.5. It means purely by guessing.  Then we increase the amount of training data.  The output curve starts rising from an inflection point like a hinge shape.


training data %

SST val_accuracy

IMDB val_accuracy

SST score

IMDB score

0.10%

0.4221

0.5962

0.4226

0.5965

10%

0.5157

0.782

0.5631

0.8028

20%

0.5319

0.8062

0.6235

0.8429

30%

0.4745

0.8555

0.6291

0.8958

40%

0.4582

0.8805

0.6709

0.9243

50%

0.4885

0.8711

0.7392

0.9305

60%

0.6296

0.9345

0.8458

0.9678

70%

0.7231

0.9884

0.9099

0.9895

80%

0.7671

0.9909

0.9454

0.9901

90%

0.7708

0.9872

0.9680

0.9897


Table 1:  IMDB/SST  Sentiment Analysis scores of different percentages of the training data.


We think that contents with more words each could produce data leak problems. Therefore it could be used to infer other contents.  


From the result we see we can get a SST score of 0.56 if we study 10% of the SST content and get a score of 0.968 if we study 90% of the content. 


On the contract, we will get a IMDB score of 0.8 if we study 10% of the IMDB content and get a score of 0.987 if we study 90% of the content.


To check when we can exceed the score of 0.8, we can see above 60% in SST and 10% in IMDB will do.


  1. Exam Styles


Different types of tests can be done for different statement styles:


7.1 True or False


Statement types of “A=B” and “A=[B,C,D,...]”  are easy to do the true or false test. We just replace “A” with other items. For the “Get value of a function” statements, we can compute the correct answer first then replace it with incorrect answers randomly.


7.2 Multiple Choices


We combine multiple true or false questions into a single multiple choices test. A simple example is to select the correct and incorrect result values of the computation as answers of the question. And more complex examples are to put multiple statements together to identify correct ones. 


7.3 Compute Value


Use “if..then(direct)” and “if..then(indirect)” statements to do the computation test. Topics for the test should include attributes of a computable formula.


  1. Conclusion


A robo-tutors can do the training online for the institutes to promote AI financial technology. It draws study paths based on each user’s study goals and generates the study roadmaps after testing the points of disruption of the study paths. Each robo-tutor can do the presentation, practice, quiz and exam tasks based on this roadmap. We also defined the JSON structure knowledge format and different knowledge statement types for this robo-tutor. We tested how much content we need to study before we can infer other contents which we’ve never learned. We also presented how to do tests with different statement types. Therefore, we believe a robo-tutor could be built with all these designs.


References:


  1. Chao-Yih Hsia(夏肇毅),”運用區塊鏈與教學機器人於智慧金融之體驗式教程規劃”,TANET 2020 臺灣網際網路研討會,P1434 - 1439

  2. Chao-Yih Hsia(夏肇毅),”運用理財機器人輔助之金融科技實驗教程規劃”,ICIM 2019 第三十屆國際資訊管理學術研討會.

  3. Chao-Yih Hsia(夏肇毅),”具認知能力的理財機器人知識處理器規劃”,TANET 2018  臺灣網際網路研討會,P1891 - 1895

  4. Chao-Yih Hsia(夏肇毅),”Blueprint of Building Robo-Advisors with a Structured Knowledge Processing Network”, NCS 2017 National Computer Symposium, P534 - 537

  5. Investopedia,”Robo Advisor” http://www.investopedia.com/terms/r/roboadvisor-roboadviser.asp

  6. 夏肇毅,“夏肇毅觀點:複製小抄大腦,讓金融科技搭起人工智慧塔”,2017 風傳媒 http://www.storm.mg/article/289062

  7. Chao-Yih Hsia,”CubicPower Money Management”. http://www.cubicpower.idv.tw

  8. Zvi Bodie ,Alex Kane and Alan Marcus, ”Essentials of Investments”