TOC {:toc} Task discription To find/generate the stimuli that evoked the strongest response of a neuron in a visual system is in essense an optimization problem. But the optimization task on hand has several unique features that are essential to the choice of optimization algorithms, for example,
题记 一直计划着博士期间定期写一点note把自己最近学到的有趣的, 美妙的东西记下来. 如果读得是一个数学物理的博士, 或者理论神经科学的博士, 那这种Note就像是在数学世界中的探险笔记, 可以叫This week’s finding, 大约就是这周看了什么书, 学会了什么数学, 玩儿了什么Model, 发现了什么trick或者math game,做了什么优美的图. (可以参见之前挖出来好些有意思东西的一个站点 This Week’s Finds in Mathematical Physics UCR一个数学物理教授坚持了十多年的每周数学笔记) 不过现实中, 我读的是Neuroscience的博士, 大概只能写learning写不了什么finding了. (而对于Brain一周时间也学不了什么新东西…) 因此, Note的内容就会更庞杂: 一部分是技术性的, 新学会的数学、统计方法、机器学习方法, 也许会有新的实验技术以及相关的物理原理; 另一部分是理念类的,也许有最近听seminar听到的神经或者心理的实验结果,也可能是相关的有趣的哲学讨论。我想我会逐渐发现哪些内容更适合分享, 以及哪些内容写下来对自己以及对读者更有帮助, 经过一段时间的磨合,这个post series应该能形成自己的风格。
一些建立生活体系的基本原则1 知止而后有定,定而后能静,静而后能安,安而后能虑,虑而后能得 止者,所当止之地,即至善之所在也。知之,则志有定向。静,谓心不妄动。安,谓所处而安。虑,谓处事精详。得,谓得其所止。 四书章句集注 · 大学 回归简单的东西. 一本书 一张纸 一杯茶 一个程序. 一个时刻一心干一件事, 书桌桌面 电脑桌面东西不宜太多. 将复杂化为简单。(Cf. Physics from symmetry) 从感知(~mindfulness 正念 正觉)开始做起, (感知即仁, cf. 程子) Brain是进行任何思考活动的基础,在使用这一工具前,检查其状态,调谐(Tuning)其状态是必须的。感知与Meditation类似这种调谐身心的方法。(类似的使用自己的感知觉前 也应试图检查 反思其工具是否有问题,e.g. 是否眼镜片脏了) 从感知自己的状态,心情开始: 感知的目的是知识 了解, 进而是去改变, 调整, 不让不好的思维 习惯 状态控制自己的心智太久 一种改变自己状态的经典有效方法就是与自己写信/日记(which 自己曾经实践过很久):通过文字经过屏幕的feedback,与自己交流理清思想。 自己常见的不适状态: 不知如何选择; 焦虑未来 焦虑已经做出的选择; 为(可能)惹别人不开心而焦虑; 为自己的self image受损而焦虑; 回避状态,因为一件事很困难而一直做别的, 不去处理这一件事,拖延 【face what your fear 性欲(Sexual Arousal)的annoying; 注意力不集中于一件事, 经常switch到手机 其他窗口中etc; 一段时间内拒绝思考未来, 不做计划; 拒绝回顾过去, 不去反思. 感知与反思过程所要弄清的一些问题: 目前的(心理)状态, motivation目标,外在压力来源(如ddl 事件), 扰动来源,环境状况 感知的基础是正常的Brain cognitive function. 作为生物体,保证足够的睡眠休息, 咖啡是必须的. (cf. 生生之道, 以促进生的方式对待生. )。 相反,不足够的睡眠之后就要去小心 risk of a malfunctioning brain ,比如如下方面: Memory 短时记忆力很差, 容易忘记事情 容易丢东西落东西; Attention 注意力很难集中; Self Perception 感知自己的状态、思想已经很困难,更难关注到,帮助到别人的状态; Planning 难以规划未来。 将理解 从自己推已及人 : 对自己有了充分的感知之后, 了解了自己的状态和情绪, 从而能更自信的交接事物, 理解他人,而不容易因为自己的情绪状态影响他人。 i.e. 关心自己是关心别人的发端和基础,知识基础以及习惯基础 人是有时间维度的. 完全生活在当下(一个没有过去也没有未来的点状人)也会带来负面结果. 在时间维度的一边是将来,我们需要 Expect and Plan,进行规划预期. 规划未来与感知当下 看似矛盾, 实际统一:没有规划的人会陷入永远的焦虑,因而难以感知当下;没有对当下自己状态、需要、目标的感知,也无从规划. (Duality of present and future) 为了做到一些事情(比如早睡),就需要预先去规划/修改规划一番。 清楚的规划使人与别人的合作可以更方便一些,不会因为自己计划的不确定 而不断干扰他人计划。 【过于活在当下,不想即将发生的事儿,也许是自己不断迟到的一个原因 时间维度的另一端是过去,是memory,是experience,是dataset。 挖掘这一dataset,做pattern recognition, clustering (unsupervised learning), 是了解自己当下、了解自己状态的基础。 对于自己做的事引发的好或者不好的结果(these teaching signal enables supervised learning),对于他人的exemplar,这些teaching dataset是Reinforcement Learning,改变自己的行为的基础。反思可以加强teaching signal,放大reward 与punishment,从而让人学的更快。(Cf. Skinner的鸽子) 不时整理数据集,写Note。(Cf. 曾子, 吾日三省吾身) 于了解自己发端,之后进行思想领域、知识领域、实践领域的探索 思想领域 不时检查思想领域的统一性 一贯性。思想/价值观本身像manifold 是由局部平凡的小块拼接起来的。每个局部上有统一的坐标,结构,整体上则非。 逻辑性并非人思维自带的模块,所以需要不时加入这一模块检查自身思想、价值体系 知识领域 整个的知识图景,与局部的细节。(Knowledge tree/network的重要性) 实践领域 Reinforcement Learning的重要性。 知行合一 Written in the last semester of undergrad. When I was intensively taking Math, Chinese Philosophy and History of Buddhism course. Trying to connect between Philosophical theory and the Psychological theory and Data Science to build a possible routine for life. Practise the idealism of breaking the barrier and let the different languages in different fields talk to each other. ↩︎
Antithesis 1 Search out necessary in everything for the sake of divine; and the divine we should search for the sake of a life of such happiness as our nature permits.
Multi-Indexing Just like in excel, you can have multi indexing columns for a table. Level and Columns reset_index transform existing indices to columns set_index transform columns to indices set_index(..., append=True) will add a new level index. If False it will discard all levels except the new one. This name is really intuitive, set_index vs reset_index
For an 0 th order optimization. You only need a way to generate samples around you (sampling) and a way to estimate gradient on these samples. Several aspects will affect the performance of your optimizer
Basic Categories of Synaptic Learning Rule Associative vs non-associative Non associative, involves one side only. Associative, involves activity of both pre and post. Associative rules are more often used in computation. Local vs Global (homo, hetero synapse) Hetero synapse is to modify weight $w_{B\to A}$ by synapse $w_{C\to A}$. Direction: Potentiation, Depression Time scale: Short term, Long term Hebbian Learning $$ \tau_w dw/dt = u v $$Updated version is this covariance rule or extended Hebbian Learning
Note on StyleGAN 1 and 2 Adaptive Instance Normalization Actually BigGAN has some similar design with this. StyleBlock Mapping Network Mapping Network warp the input Normal distribution into a more complex manifold. Both ease sampling with a Gaussian distribution and facilitate complex distribution as input.
Motivation It’s well known that the neurons are noisy signal transmitter, but to measure how noisy they are we need some statistics to do so. Classic SNR Definition SNR is typically defined in a linear Gaussian system.
Smoothness of Function on Manifold Motivations Dirichlet Energy Dirichlet energy is defined as the integral of squared norm of functions’ gradient in a set. So it’s a functional over smooth function on the set $C^\infty (M)\to \R$.