Lec 17 A Brain-inspired Theory of Mind Model Based on BrainCog for Reducing Other Agents’ Safety Risks

Hello, everyone. I will introduce a brain-inspired theory of mind model based on BrainCog for reducing other agents’ safety risks.

Theory of mind (ToM) refers to the ability to distinguish self from others, so as to understand the mental state of others such as goals, ideas or beliefs, etc. . We can understand ToM through a simple experimental paradigm: this experimental paradigm is the false belief task. In the Figure 1, we can find that Sally, the child on the left, put the ball into the box on the left. Anne, the child on the right, put the ball into the box on the right. The experiment is based on the answer of the subject to which box Sally thinks the ball is in when she comes back.

17_1

Figure1:False Belief Task [1,2]

ToM is an important social cognitive ability of higher animals. Therefore, we borrowed from the relevant literature of neuroscience the known brain regions and the partial connections between brain regions related to ToM to build a brain-inspired ToM spiking neural network (ToM-SNN) based on multiple brain regions coordination. The network is trained with Reward-modulated Spike-Timing-Dependent Plasticity (R-STDP). The model is applied to reduce other agent`s risks.

17_2

Next, I will introduce how to build a ToM model based on BrianCog. Our code is under the path of Social_Cognition/ToM. The code of the multiple brain area models are mainly under the BrainArea file. We will use PFC_ToM as an example to introduce how to use BrainCog to simulate the function of PFC in inferring others. Class PFC_ToM inherits the dlPFC class, and trains the network by calling the learning rule of braincog.base.learningrule.STDP in combination with the eligibility. Externally, we can call the network established by PFC_ToM through the forward function.

class PFC_ToM(dlPFC):
    def __init__(self,
                     step,
                     encode_type,
                     in_features:int,
                     out_features:int,
                     bias,
                     node,
                     num_state,
                     greedy=0.8,
                     *args,
                     **kwargs):
            def update_c(self, c, dw, tau_c=0.2): #update the trace of eligibility
            def update_s(self, R, mapping):		# update weight
            def forward(self, inputs, num_action, episode): 	

The experimental environment is a gridworld with a common action space(up/down/left/right/stay), goals, and blocking walls. The environment consists of three agents: a bystander which learn the policy in the interaction with environment and two pedestrians which have fixed policy. Different agents have different goals to reach. Agents cannot pass through walls. The wall will block part of the view of an agent in the environment. Because the experiment is designed by ourselves, the environment code and pedestrian fixed policy code are also given.

17_3

Finally, I will briefly introduce the experimental results. We compared the performance of the agents when the bystander did not use the ToM-SNN model. Based on the following experiments, we show that the bystander with the ToM-SNN model can help others avoid risks.

17_4 17_5

[1] Baron-Cohen, Simon, Alan M. Leslie, and Uta Frith. “Does the autistic child have a “theory of mind”?.” Cognition 21.1 (1985): 37-46.

[2] Zaroukian, Erin. “Theory of Mind and Metareasoning for Artificial Intelligence: A Review.” (2022).

If you are interested in our work, please cite our article. If you have any questions, please contact us by email.

@article{zhao2022brain, 
title={A Brain-Inspired Theory of Mind Spiking Neural Network for Reducing Safety Risks of Other Agents}, 
author={Zhao, Zhuoya and Lu, Enmeng and Zhao, Feifei and Zeng, Yi and Zhao, Yuxuan}, 
journal={Frontiers in neuroscience}, 
pages={446}, publisher={Frontiers} }

@misc{https://doi.org/10.48550/arxiv.2207.08533,
  doi = {10.48550/ARXIV.2207.08533},
  url = {https://arxiv.org/abs/2207.08533},
  author = {Zeng, Yi and Zhao, Dongcheng and Zhao, Feifei and Shen, Guobin and Dong, Yiting and Lu, Enmeng and Zhang, Qian and Sun, Yinqian and Liang, Qian and Zhao, Yuxuan and Zhao, Zhuoya and Fang, Hongjian and Wang, Yuwei and Li, Yang and Liu, Xin and Du, Chengcheng and Kong, Qingqun and Ruan, Zizhe and Bi, Weida},
  title = {BrainCog: A Spiking Neural Network based Brain-inspired Cognitive Intelligence Engine for Brain-inspired AI and Brain Simulation},
  publisher = {arXiv},
  year = {2022},
}