随笔Essays

我为什么还在做 AI4SWhy I'm Still Doing AI4S

现在用 AI 做研究,常常觉得时间不够用。以前写代码,我需要先设计结构,再一点点实现、编译、测试。现在 agent 和我把计划来回迭代几轮,很快就自己做完了一轮:读了几篇论文,改了几千行代码,跑出一批结果,还顺手写了个像模像样的总结。屏幕上的执行记录不停往下滚,有时我觉得某一步似乎有一点意思,又说不出为什么,只能让它先停下来,把刚才做的事情重新解释一遍;解释得太快,还要再叫它慢一点。慢慢的我越来越感觉是我自己在卡着 agent 不能更高效地干活,于是最近越来越感到焦虑,也是一点担心:当人的理解效率本身成了整件事情里最慢的一环,人继续参与其中,还真的有价值吗?

我并不是从一开始就在想这样的问题。事实上,我过去的求学经历走过了挺长的一段路,最初甚至连要往哪里走也不清楚。

我本科在天津工业大学。最初的两年,我就是个无头苍蝇。2017 年入学时,AlphaGo 打败柯洁的新闻还很新,人工智能像一阵突然吹进计算机学院的风,大家并不十分清楚它是什么,却都知道应当往那里看一看,仿佛这个词本身便带着一点未来的光亮。学院里原先有做网络安全的,有写前端后端的,也有玩嵌入式的,一时间又多出一些人开始谈神经网络。我也跟着尝试了一些。网络安全的课听过几次,因为概念实在太多,听得云里雾里,很快便没再去;嵌入式和物联网也玩过一点,没有做出什么像样的东西。神经网络则是每天晚上去一个高年级学长的宿舍里听他讲。他自己攒模型打比赛,在 Kaggle 上不少数据集都做到了榜首;代价也相当直观,学校里的课挂了不少,能不能毕业似乎更让人担心。过了大半年,我最后参加得最久的反而是英语社团,因为偶尔能用学校经费找地方吃饭,算是最实际的好处。

那时我还做主持、参加模拟联合国,学公共管理的二学位,也和同学尝试过儿童编程项目。我们把一套图形化编程工具翻译成中文,接上开发板和小机器人,后来真的进了两所学校办兴趣班,也一度想过租门店、注册公司。但大家的课程逐渐忙起来,又发现北京已经有团队把相似的事情做成了公司,于是那一点刚刚聚起来的勇气,也就慢慢散掉了。我那时满脑子博雅教育,或者更诚实一点说,是没有主意,什么都想看看。下课以后常往图书馆跑,哲学、历史和社会科学的书也读了许多。那时候尤其喜欢哲学和法理学里一些思辨的东西,现在很难说其中有多少真的读懂了。若一定要把这段经历解释成”跨学科探索”,未免有些给过去贴金;当时更多只是看到一扇门,便想把头伸进去瞧一瞧,至于进去以后做什么,通常并没有计划。

真正让我开始把那些杂乱的兴趣收拢起来,是本科时的一门计算机前沿课程。课上讲人工智能与生物信息、药物、语音和视觉的交叉应用。内容现在看来只是很基础的介绍,当时却正好成了我的启蒙。计算机原来不只是用来写软件,还可以伸进别的学科里,去碰那些原本与我毫无关系的问题。后来我联系了开课的刘丁老师,和室友一起跟着他做研究。最早接到的项目与 RNA、蛋白质和 CRISPR 基因编辑有关,简单说来,是想用机器学习预测某种蛋白会在什么位置切割一段序列。

我当时没有什么生物基础,高中学过的遗传知识也已经忘了不少。第一次读相关综述,每句话都像长了刺,各种拉丁词和缩写挤在一起,一个词查出来,解释里又长出三个不认识的词,一段话往往半个小时也走不出去。但那段时间我似乎相当有耐心。每查清一个概念,脑子里就多出一个很小的点。刚开始这些点没有什么关系,只是散在那里;慢慢多了以后,忽然便能连成线,再后来竟也勉强有了一点感觉。蛋白质为什么能找到特定序列,切割为什么有选择性,数据中的输入和输出究竟应当如何对应,这些东西像一团皱巴巴的纸,被一点点展开、压平,最后竟也能在上面画出箭头,变成一个具体的模型。当时 Transformer 刚提出不久,我们尝试把它用在序列任务上。我花了很长时间读论文、改代码、清洗数据,模型最早的效果比随机判断还差,后来一点点从百分之五十以下提高到六十、七十,再到八十左右。项目最后因为合作原因没有形成论文,若只按成果表格来算,大概不算一次成功的研究;但它几乎改变了我看待学习的方式。学习一个新领域会带来一种很直接的快乐,像走进一间原本锁着的屋子,门刚推开时里面漆黑,只能摸索着碰到桌角和墙壁;待得久了,家具和门窗慢慢露出形状,最后竟也能在其中走动。屋子并没有因此变小,只是我不再完全被黑暗挡在外面。自那以后,我不太愿意先问一个问题是不是”我的方向”,更容易先问它是否有意思。只要足够有意思,便总想找个入口进去看看。

做完这个项目后,刘老师没有急着让我继续跑新的数据,而是让我去学机器学习理论、统计学习和信息论。他认为理论基础如果不清楚,做出来的东西很容易只剩下一层表面的技巧。

那段时间,我开始接触神经网络背后的理论。为了看懂不同模型之间的关系,我读了许多文章,又试着把它们写成相似的数学形式。某一天,早期的神经能量模型、联想记忆网络和现代 attention,忽然在纸上显出了相似的骨架。神经网络似乎不再只是一个黑箱,背后隐约有一套可以被理解的结构。于是我当时的热情几乎都集中在一件事上:”open the black box”。这种兴奋现在想起来有一点幼稚。每次刚刚串起几样东西,总会产生一种自己已经明白许多的错觉,过几个月再看,才发现只是从一个黑箱走进了更大的黑箱。不过研究有时也需要靠这点短暂的自信续命。

后来我们围绕神经网络中的信息度量写了一篇文章,尝试在高维参数空间里定义一种新的熵和互信息度量。文章发表在一个不算显眼的期刊上,几年后却发现被一些大模型训练相关的工作引用,LeCun 团队的一项研究也将其中的度量用于构造训练目标。

大四下我确定了研究生去天津大学,我接触到一个用 AI 加速电子结构和量子输运计算的合作项目。项目涉及非平衡态格林函数、电子结构和半导体器件。我开始时觉得,这大约和生物项目相似:不认识概念便查,查得多了自然就会。但我很快发现不是这么回事。生物里的困难往往是术语多,一个名词查清,便可以暂时放在那里。物理里的一个名词后面却常常拖着一整座房子,推开门还有楼梯,楼梯下面又是地下室。想理解量子输运,先要知道格林函数;想知道格林函数,又要回头补量子力学、微分方程、线性代数和复分析;再往下追,最后总能追到一些最基础的数学和力学。前沿文章读了几次都看不懂以后,我只好承认,靠临时查资料大概不行。我必须把物理的基础重新学一遍。也因此,我的毕业旅行和整个暑假,便一起被格林函数吃掉了。

从暑假到研究生第一年,我花了很长时间补数学和物理。研究生开学后,我发现本专业的工程数学,数值计算课,以及计算机视觉里的不少内容已经自学过,便很高兴地不去上课,跑到理学院旁听物理课。天大的理学院建得和罗马斗兽场一样,每次进去都会迷路。在那里,我和物理系本科生一块听下了理论力学和量子力学。还记得工程数学老师第一节课说,若觉得自己会了可以不来,最后按考试成绩计算平时分,我当时觉得这安排极好,后来才发现,会知识和会考试是两回事。因为没有跟着做习题,许多计算十分生疏,考试时推得很慢,别人已经交卷,我还有一部分没有做。最后的结果是,做了的几乎都对,没做的也十分稳定地全错,成绩自然不大好看。那时倒并不在意,觉得打下了物理基础比成绩单高个十几分可重要得多。但现在申请 funding 需要提交成绩单时,偶尔也会对当年的洒脱产生一点后悔,不过后悔得不多;若再选一次,大概仍然会跑去理学院听课,只是考试前或许会多做两套习题。

数学分析、统计力学和量子力学给我的冲击各不相同。以前工程课程里直接拿来使用的公式,忽然都有了来源和边界;几个基本假设和少数方程,竟然可以把微观粒子的混乱运动与宏观世界连接起来。学物理的过程也常常像在学物理史:书上干净的一行公式,其实是许多人绕了很远的路才留下来的,像是把一段漫长又泥泞的旅程,最后折叠成纸面上一条笔直的线。为了逼自己把含糊的地方真正弄清楚,我还在实验室里定期把这周学到的内容讲给同组同学,但学的越多,我也越能感觉到数学和物理的深邃。真正在这个领域做出一点有价值的东西,并不能只凭 CS 或 AI 的直觉,把新模型放到一批科学数据上跑一遍。如果不理解领域本身,便很难知道什么问题重要,什么近似可靠,模型到底是在解决核心困难,还是只在边缘上晃悠,做出看起来好看但没有用的东西。

在量子输运合作中,我也第一次接触到郭鸿老师。

当时我们更熟悉算法和机器学习,对半导体器件、材料和实际应用的判断都很有限。郭老师却常常能从一个计算方法出发,很快指出它可能对应什么器件问题,什么样的物理量有实验意义,可以被拿来参考和设计。这种不拘于方法本身、总要继续追问结果与现实有什么关联的习惯,恰恰是这门学科里最深、也最要紧的部分。这给我的印象很深。因为从 AI 和 CS 的背景出发,我见过不少研究从方法出发,再寻找一个能够容纳它的应用,组成一个故事。不能说这些工作都没有价值,但 AI 最不缺的就是方法,也不缺给方法讲新故事的能力。一个方法究竟应当放在哪里,常常比把它再提高几个百分点更需要领域经验,它来自对材料、器件和产业问题长时间的接触,知道哪些是理论上的问题,哪些才是会在实验中真正卡住事情。

我们当时尝试把自动微分引入非平衡态格林函数计算。传统仿真大多是正向的,给出结构和参数,再计算电流或电导;如果整个计算过程可以求导,便有机会从目标性质反过来优化材料和器件。这项工作后来发表在 PRB,也是我的第一篇正式发表在物理期刊上的文章。

真正让我再次坚定地把 AI4S 当成一条长期道路的,是读到了《应用数学的新曙光》。

那天我在天津营口道那吃完拉面,外面是阴天,刚下过雨,地面有些泥,路上行人和车辆都很嘈杂。我站在路边,用手机慢慢把文章读完。它谈高维问题、科学计算、机器学习与应用数学。恰好过去一年的课题让我把其中不少问题亲自踩了一遍,我已经看到 AI 确实能让一些计算发生变化,却还不知道应当怎样理解这些零散的变化。文章里的每个案例,都像恰好按在我刚刚碰过的某个问题上;但它又站得更高,从一个更广阔的视角,描述了 AI 与理论计算结合以后可能出现的未来。那些原本在我手里彼此分散的数学、物理、算法和数值计算,忽然被放进了同一张地图里。我也在那时突然意识到,一次计算从十个小时缩短到一分钟,到底意味着什么。

需要十个小时的模拟,通常只能偶尔做一次,用来解释和推演;如果一分钟便能完成,它就可以被放进循环里,一遍遍调整参数、重新计算,再根据结果继续优化。量变积累到这里,工具的性质便发生了变化。模拟不再只是观察和解释世界,也可能开始参与设计世界。现在回想,这个想法相当粗糙,我当时把理论、实验和制造之间的道路想得过于平整,真实工艺里的缺陷、波动和偶然性,几乎都没有被画在那张地图上。不过大的方向,到现在我仍然相信没有错。

研究生期间,我后来获得机会到 AI for Science Institute 实习,从研二一直待到毕业前后,前后两年多。那时的 AISI 有一种很强的磁场,来自完全不同领域的人聚在一起,各自说着自己专业里的方言,却都真的相信,AI 和科学计算可以把原来做不到的事情变得可行。我看到机器学习势函数从研究工具逐渐变成大规模模拟的基础设施,也看到机器学习支撑的高通量筛选预测出过去没有发现的分子和材料,进入了材料筛选、能源设备和真正的制造测试。真实过程似乎发生得很自然,实际工作中,互相讨论时都是每天碰到得各种琐碎的日常,数据格式、失败的任务、重新训练的模型,以及一个体系上运行得很好,换到另一个体系便莫名其妙坏掉的程序。这些琐碎的日常把最终成果的突破拆成了每天向前挪动的一点点,因此真正看到结果时,反而没有那么惊讶。等到回头看,才发现那些不浪漫的工作里,确实长出了一些很了不起的东西。

我在那段时间也把很大一部分精力投入到一件对我很重要的事情里,和顾强强一块开发 DeePTB。我们想用神经网络学习材料局域环境与紧束缚哈密顿量之间的关系。第一性原理计算精确但昂贵,传统经验模型很快,却常常难以适应复杂材料,因此领域里大致有两条路:一条继续加速第一性原理,另一条提升经验模型的精度和适用范围。由于前面的经验,我们逐渐发现,在半导体和器件工业中,研发人员需要的不只是一个从原理出发、尽可能准确的模型,还需要它足够快,能够处理大体系,并且可以随着实验数据和具体工艺不断校准。如果模型缺少面向特定实验和制造条件进行调整的自由度,理论与现实之间就很难反复对齐。于是我们希望在中间建立一种新的模型,既从高精度数据里学习,又保留一定的物理结构和校准能力,这就是 DeePTB。后来,模型逐渐能够处理更复杂的体系,计算尺度也扩展到百万原子和千万轨道量级。刚做到这些时,我曾经觉得,大尺度电子结构的问题似乎已经解决了很大一部分,仿佛桥已经快搭到对岸。很快又发现并没有,桥大概只搭到了河中央。哈密顿量算出来,不代表实验者关心的性质已经有了。电学、光学和输运性质仍然要计算,温度、缺陷、界面和器件环境仍然要考虑。理论里的理想材料与工艺线上真正做出来的东西,中间隔着的是一整套不同的问题和语言。对于做电子结构的人,一张能带图常常已经是结果;对于器件工程师,他关心的可能是电流、噪声、稳定性和工艺窗口。我逐渐意识到,这条路上真正困难的部分,是把模型、性质、实验、器件和工艺这些不同世界里的语言连接起来,使它们能够相互校准,再进入真正的设计和优化。

我也是带着这个问题来到 McGill,成为郭鸿老师的学生。选择来这里,是因为我觉得自己仍然缺少两样东西。

第一样是真正深入具体领域之后的判断力。实验和工艺关心什么,什么量可以被测量,器件里失效的原因在哪,这些都需要长期待在问题里,被真实体系一次次纠正。郭老师在半导体输运、量子器件和实际应用上的经验,正是我此前最欠缺的部分。过去我更容易从”这个算法能做什么”出发寻找应用,到了这里以后,才慢慢学习从”真实问题需要什么”反过来设计计算方法。

第二样,是把大尺度电子结构模型继续转化为可观测性质的能力。机器学习已经可以建立越来越大的材料模型,但如果不能从中提取输运、光学和其他实验可见的性质,大尺度模型仍然很难真正进入器件设计和工艺问题。

所以博士阶段,我一面继续学习强关联、多体物理、量子器件和凝聚态材料,尝试用更多具体的研究工作推进自己对领域细节的理解;一面开发大尺度性质计算所需要的软件和数值方法。这类工作横跨物理理论、数值算法、高性能计算和软件工程。有时一天都在检查某个公式的适用条件,第二天又变成排查 MPI 通信,第三天可能只是因为内存布局不合适,程序便慢了几倍。做久以后,这些领域之间的界线也没有那么清楚,它们只是在不同位置共同决定一件事情究竟能不能真正算出来。幸好这些工作恰好与我过去的经历接得上:计算机背景使我不太害怕软件和性能问题,物理训练让我能够理解公式从哪里来,而机器学习电子结构的经验,又让我知道这些计算最终应当怎样与 AI 模型连接。最近在一个关于莫尔材料的研究里,AI agent 也真正参与到了我的科学发现的过程中。它从复杂的结构变化里提出,可以尝试用少数声子模式进行投影。沿着这条线继续做下去,我们发现,原本看起来极其复杂的上万原子重构,竟然主要可以由少数几个模式描述。AI 在工作中几乎全程参与,帮助写代码、分析结果,也从大量文献中寻找可能的机理解释;其中一些关键线索,甚至主要来自它对远超个人阅读能力的资料进行梳理。这件事让我更确信,AI 会越来越深入地参与科学发现,帮助研究者提出和验证假设,并从远超个人阅读能力的资料中寻找联系。但真正长时间和 agent 一起工作以后,我反而不期待一个完全没有人的自动科学系统。一个更可靠、也更吸引我的远景,是让人和机器在研究中不断相互校验,让 AI 加速每一个研发环节,最终形成仍然能够被人理解的发现和理论。因为新的现象被找出来,并不意味着研究已经结束;我们还要知道它为什么出现,与已有理论是什么关系,实验上可能看到什么,又能由此继续问出什么问题。只有经过这些过程,一个发现才会变成知识,融入人类已有的理解,再成为下一次发现的起点。

回头看,我过去做过的事情似乎很杂。生物序列、信息论、神经网络、量子输运、电子结构、高性能软件、材料和器件,若放在简历里,需要分成好几栏,看起来很不整齐。每次申请 funding 或奖项,需要用很短的篇幅解释自己的方向,我都觉得头疼。就连这篇文章,也用了这么长的文字,才勉强把这条路顺一遍。但在我心里,这些经历反复发生的其实是同一种冲动:想知道。这是一种很具体、甚至有些烦人的好奇。我现在具体做的,是连接 AI 电子结构模型、大尺度物理性质计算与真实器件问题的计算基础设施。它可能表现为一个模型、一套算法或一款软件,过几年也可能换成别的形式。但我想长期做的事情,比其中任何一个项目都宽一些:让机器承担科学中不断增长的复杂度,让人仍然有余裕去理解、判断,也仍然能够享受探索本身的快乐。这当然说得有些大。真正每天做的工作,常常只是改代码、查错,或者和 agent 为一个似乎很小的问题反复争论。宏大的目标若不能落在这些琐碎事情里,也就只是些漂亮话罢了。

回到最初的问题,人会被排除出工作吗?对于许多日常执行,答案大概是肯定的。我也不想为了证明人仍然重要,便把人硬塞回本可以由机器完成的流程里。机器若能把事情做得更快、更好,没有理由只为了保留一种旧的工作方式而拒绝它。但至少在我愿意称之为科学的意义上,我不认为人会消失。科学不只是把正确答案生产出来,而是人把现象中的异样变成问题,把结果变成解释,再把解释放回共同的知识体系,并用它继续发现的过程。一个结果若没有被理解,不能被融入已有的理论,也不知道应当怎样验证,它至多是一个暂时有用的答案,很难成为可以继续生长的知识。即使未来所有研发环节都可以自动完成,在结果的鉴定、理解和采用上,仍然需要人的判断与实践。因为价值并不悬浮在答案本身之中,它总要落到某个主体身上,改变人的认识、选择或者生活,才真正成为价值。

These days, doing research with AI, I often feel there isn’t enough time. I used to write code by first designing the structure, then implementing, compiling, and testing it piece by piece. Now the agent and I iterate on a plan back and forth a few times, and it quickly finishes a whole round on its own: it reads a few papers, changes a few thousand lines of code, produces a batch of results, and even writes up a respectable-looking summary along the way. The execution log keeps scrolling down the screen. Sometimes a step strikes me as somehow interesting without my being able to say why, and all I can do is make it stop and re-explain what it just did; and when it explains too fast, I have to ask it to slow down again. Gradually I’ve come to feel that I’m the one holding the agent back from working more efficiently, and lately this has left me increasingly anxious — and a little worried: when the speed of human understanding itself becomes the slowest link in the whole chain, is there still any value in a person staying in the loop?

I didn’t start out thinking about questions like this. In fact, my education wandered a long way, and at first I wasn’t even sure where I was headed.

I did my undergraduate degree at Tiangong University. For the first two years, I was a headless fly. When I enrolled in 2017, the news of AlphaGo beating Ke Jie was still fresh; artificial intelligence blew into the School of Computer Science like a sudden gust of wind. Nobody was quite sure what it was, but everyone knew they ought to at least look in that direction — as if the word itself carried a faint glow of the future. The school already had people doing network security, people writing front-end and back-end, people playing with embedded systems; now, all at once, more of them began talking about neural networks. I tried a bit of everything too. I sat in on a few network-security classes, but there were so many concepts that I was lost in the fog and soon stopped going; I dabbled a little in embedded systems and IoT without building anything worth showing. For neural networks, I’d go every evening to an upperclassman’s dorm and listen to him talk. He built his own models for competitions and had reached the top of the leaderboard on quite a few Kaggle datasets; the cost was just as plain — he’d failed a good number of courses, and whether he’d graduate seemed the more pressing worry. After about half a year, the thing I actually stuck with longest turned out to be the English club, because now and then we could use the school’s budget to go out and eat somewhere — the most concrete benefit of all.

Back then I also emceed events, took part in Model UN, pursued a second degree in public administration, and tried a children’s coding project with some classmates. We translated a set of visual programming tools into Chinese, hooked them up to dev boards and little robots, and actually ended up running after-school clubs at two schools; for a while we even thought about renting a storefront and registering a company. But everyone’s coursework gradually piled up, and we found that a team in Beijing had already turned something similar into a company, so the small bit of courage we’d just gathered slowly dispersed. My head was full of the liberal-arts ideal back then — or, to be more honest, I had no idea what I wanted and just wanted to look at everything. After class I often went to the library and read a great deal of philosophy, history, and social science. I was especially drawn to the more speculative parts of philosophy and jurisprudence, though it’s hard to say now how much of it I truly understood. To dress this period up as “interdisciplinary exploration” would be to gild the past; at the time it was mostly just seeing a door and wanting to stick my head in for a look, usually with no plan for what I’d do once inside.

What really began to gather up those scattered interests was a frontiers-of-computer-science course I took as an undergraduate. It covered the intersections of artificial intelligence with bioinformatics, drug discovery, speech, and vision. The material looks like only a very basic introduction in hindsight, but at the time it happened to be my awakening. Computers, it turned out, weren’t only for writing software; they could reach into other disciplines and touch problems that had nothing to do with me before. Afterward I got in touch with Professor Ding Liu, who taught the course, and did research under him together with my roommate. The first project I picked up had to do with RNA, proteins, and CRISPR gene editing — put simply, we wanted to use machine learning to predict where a certain protein would cut a sequence.

I had almost no background in biology at the time, and had forgotten much of the genetics I’d learned in high school. The first time I read a review paper, every sentence seemed to bristle with thorns — Latin terms and abbreviations crowded together, and looking up one word would grow three more I didn’t know inside its explanation; a single paragraph could take half an hour to get through. But I seemed to have a lot of patience in that period. Each concept I cleared up added one small dot in my mind. At first these dots had no relation to one another, just scattered there; as they slowly accumulated, they could suddenly be joined into lines, and later even yielded a faint sense of the whole. Why a protein can find a particular sequence, why its cutting is selective, how exactly the inputs and outputs in the data should correspond — these things were like a crumpled ball of paper being slowly unfolded and pressed flat, until at last you could even draw arrows on it and turn it into a concrete model. Transformers had just been proposed then, and we tried applying them to sequence tasks. I spent a long time reading papers, changing code, and cleaning data; at first the model did worse than random guessing, and then it climbed bit by bit from below fifty percent to sixty, seventy, and around eighty. The project never became a paper because of issues with the collaboration, and judged purely by a table of results it probably doesn’t count as a successful piece of research; but it nearly changed the way I see learning. Learning a new field brings a very direct kind of joy, like walking into a room that had been locked: when the door first opens it’s pitch dark inside, and you can only grope your way to the corner of a table and the wall; stay long enough and the furniture, doors, and windows slowly take shape, until at last you can move around in it. The room hasn’t grown any smaller — I’m just no longer shut out entirely by the dark. Ever since, I’ve been reluctant to first ask whether a problem is “my direction,” and more inclined to first ask whether it’s interesting. As long as it’s interesting enough, I always want to find a way in and take a look.

After that project, Professor Liu didn’t rush me on to running new data; instead he had me go study machine-learning theory, statistical learning, and information theory. He believed that if the theoretical foundations weren’t clear, whatever you built would easily amount to nothing more than a layer of surface tricks.

During that time, I began to encounter the theory behind neural networks. To make sense of the relationships among different models, I read many papers and tried to rewrite them into a common mathematical form. One day, the early neural energy models, associative memory networks, and modern attention suddenly revealed a similar skeleton on the page. A neural network no longer seemed to be just a black box; behind it there was a dimly visible structure that could be understood. So nearly all my enthusiasm at the time converged on one thing: “opening the black box.” That excitement seems a little naive to me now. Every time I’d just strung a few things together, I’d get the illusion of having understood a great deal, only to look again a few months later and find I’d merely walked out of one black box into a larger one. Still, research sometimes needs this kind of brief self-confidence to keep it alive.

Later we wrote a paper on information measures in neural networks, trying to define a new kind of entropy and mutual information in the high-dimensional parameter space. It came out in a not-very-prominent journal, but a few years on I found it cited by some work related to large-model training, and a study from LeCun’s group had used one of its measures to construct a training objective.

In the second half of my senior year, I settled on Tianjin University for graduate school, and came into contact with a collaborative project using AI to accelerate electronic-structure and quantum-transport calculations. It involved non-equilibrium Green’s functions, electronic structure, and semiconductor devices. At first I assumed it would be roughly like the biology project: look up the concepts I didn’t know, and once I’d looked up enough, I’d understand. But I soon found it wasn’t like that at all. In biology the difficulty is usually the sheer number of terms; once you’ve clarified a term, you can set it aside for the time being. In physics, a single term often drags an entire house behind it — push open the door and there’s a staircase, and beneath the staircase a basement. To understand quantum transport, you first have to know Green’s functions; to know Green’s functions, you have to go back and shore up quantum mechanics, differential equations, linear algebra, and complex analysis; chase it further down and you always end up at some of the most basic mathematics and mechanics. After failing several times to understand the frontier papers, I had to admit that looking things up on the fly wasn’t going to work. I had to relearn the foundations of physics from the ground up. And so my graduation trip and my whole summer were swallowed together by Green’s functions.

From that summer through my first year of graduate school, I spent a long time catching up on math and physics. After the semester began, I found I had already taught myself much of the engineering mathematics, the numerical computation course, and a good deal of the computer-vision material in my own program, so I happily skipped those classes and went to sit in on physics courses at the School of Science. Tianjin University’s science building is built like the Roman Colosseum, and I got lost every time I went in. There, alongside physics undergraduates, I sat through theoretical mechanics and quantum mechanics. I still remember the engineering-math professor saying in the first class that if you felt you already knew the material you didn’t have to come, and that the participation grade would in the end be computed from the exam score. I thought this arrangement was excellent at the time, only to discover later that knowing the material and knowing how to take the exam are two different things. Because I hadn’t done the problem sets, many calculations were unfamiliar; I derived slowly during the exam, and while others had already handed in their papers I still had a portion undone. The result was that what I did do was almost all correct, and what I didn’t do was very reliably all wrong, so my grades naturally didn’t look good. I didn’t mind at the time — I felt that laying a foundation in physics mattered far more than a dozen extra points on a transcript. But now, when applying for funding requires submitting transcripts, I occasionally feel a little regret over that old nonchalance — though not much; if I had to choose again, I’d probably still go sit in on those courses at the School of Science, and just do a couple more problem sets before the exams.

Mathematical analysis, statistical mechanics, and quantum mechanics each struck me differently. Formulas I’d previously just picked up and used in engineering courses suddenly had origins and boundaries; a few basic assumptions and a handful of equations could, astonishingly, connect the chaotic motion of microscopic particles to the macroscopic world. Learning physics often felt like learning the history of physics: a clean single line of formula in a book is really what many people left behind after taking a long, roundabout path — as if a long and muddy journey had been folded, in the end, into one straight line on the page. To force myself to genuinely clear up the vague spots, I would regularly explain what I’d learned that week to my labmates. But the more I learned, the more I could feel the depth of mathematics and physics. To make something genuinely valuable in this field, you can’t rely only on CS or AI intuition to take a new model and run it once over a batch of scientific data. Without understanding the field itself, it’s hard to know which problems matter and which approximations are reliable — whether a model is solving the core difficulty or just wobbling around the edges, producing something that looks good but is useless.

It was in the quantum-transport collaboration that I first met Professor Hong Guo.

At the time we were more familiar with algorithms and machine learning, and our judgment about semiconductor devices, materials, and real applications was quite limited. Professor Guo, though, could often start from a computational method and quickly point out what device problem it might correspond to, which physical quantities carried experimental meaning and could be used as references and for design. This habit of not being confined to the method itself, of always pressing on to ask how a result connects to reality, is precisely the deepest and most crucial part of this discipline. It made a strong impression on me. Coming from an AI and CS background, I’d seen plenty of research start from a method and then look for an application that could contain it, assembling a story. It’s not that such work has no value, but the one thing AI is never short of is methods — nor the ability to tell new stories about them. Where a method actually belongs often takes more domain experience than pushing it up another few percentage points; it comes from long contact with materials, devices, and industrial problems, from knowing which are problems in theory and which are the ones that will actually get things stuck in experiment.

At that time we tried bringing automatic differentiation into non-equilibrium Green’s function calculations. Traditional simulation is mostly forward: you give a structure and parameters, then compute current or conductance; if the whole computation can be differentiated, you have a chance to optimize materials and devices backward from a target property. This work was later published in PRB, and it was my first paper to appear formally in a physics journal.

What truly renewed my resolve to treat AI4S as a long-term path was reading “The New Dawn of Applied Mathematics.”

That day I’d just finished a bowl of ramen near Yingkou Road in Tianjin. Outside it was overcast, it had just rained, the ground was a bit muddy, and the pedestrians and traffic were noisy. I stood at the roadside and slowly read the article on my phone. It talked about high-dimensional problems, scientific computing, machine learning, and applied mathematics. As it happened, the past year’s work had led me to step through many of these problems myself; I had already seen that AI could indeed change certain computations, but I didn’t yet know how to make sense of these scattered changes. Every case in the article seemed to press exactly on some problem I had just touched; and yet it stood higher, describing from a broader vantage the future that might emerge once AI was combined with theoretical computation. The mathematics, physics, algorithms, and numerical computation that had been scattered separately in my hands were suddenly placed on the same map. It was then that I suddenly grasped what it really means for a computation to go from ten hours down to one minute.

A simulation that takes ten hours can usually only be run occasionally, to explain and to extrapolate; if it can be done in a minute, it can be put into a loop, tuning parameters and recomputing over and over, then optimizing further based on the results. Once quantitative change accumulates to this point, the nature of the tool changes. Simulation is no longer only about observing and explaining the world; it may begin to take part in designing it. Looking back now, this idea was fairly crude — I imagined the road between theory, experiment, and manufacturing as far too smooth, and the defects, fluctuations, and contingencies of real processes were almost never drawn onto that map. But the broad direction, I still believe to this day, was not wrong.

During graduate school I later got the chance to intern at the AI for Science Institute, staying from my second year through around graduation — more than two years in all. The AISI back then had a strong magnetic field: people from completely different fields gathered together, each speaking the dialect of their own discipline, yet all genuinely believing that AI and scientific computing could make the previously impossible feasible. I watched machine-learning potentials go from a research tool to infrastructure for large-scale simulation, and watched machine-learning-driven high-throughput screening predict molecules and materials that hadn’t been found before, entering materials screening, energy devices, and real manufacturing tests. The real process seemed to happen quite naturally; in practice, what we discussed with one another were all the trivial dailies we ran into — data formats, failed jobs, models to be retrained, and programs that ran perfectly well on one system and inexplicably broke on another. These trivial dailies broke the final breakthroughs into a little bit of forward motion each day, so that when the results finally appeared, they weren’t all that surprising. Only looking back did I find that something quite remarkable had, in fact, grown out of that unromantic work.

During that time I also put a large part of my energy into something very important to me: developing DeePTB together with Qiangqiang Gu. We wanted to use neural networks to learn the relationship between a material’s local environment and its tight-binding Hamiltonian. First-principles calculations are accurate but expensive; traditional empirical models are fast but often struggle to adapt to complex materials. So the field has roughly two paths: one keeps accelerating first principles, the other improves the accuracy and applicability of empirical models. From our earlier experience, we gradually realized that in the semiconductor and device industry, what R&D people need isn’t just a model that is as accurate as possible from first principles — it also has to be fast enough, able to handle large systems, and able to be continuously calibrated against experimental data and specific processes. If a model lacks the freedom to be tuned toward particular experimental and manufacturing conditions, it’s hard to keep aligning theory and reality back and forth. So we hoped to build a new kind of model in between, one that learns from high-accuracy data while retaining a degree of physical structure and calibration ability — and that is DeePTB. Later the model gradually became able to handle more complex systems, and the computational scale extended to the order of a million atoms and ten million orbitals. When we first reached this point, I once felt that the problem of large-scale electronic structure had largely been solved, as if the bridge were almost across to the far bank. Soon I found it wasn’t — the bridge had probably only reached the middle of the river. Computing the Hamiltonian doesn’t mean the properties an experimentalist cares about are already in hand. Electrical, optical, and transport properties still have to be computed; temperature, defects, interfaces, and the device environment still have to be considered. Between the ideal material in theory and the thing actually made on the process line lies an entire set of different problems and languages. For someone doing electronic structure, a band diagram is often already the result; for a device engineer, what he cares about might be current, noise, stability, and the process window. I gradually realized that the truly difficult part of this path is connecting the languages of these different worlds — model, property, experiment, device, and process — so they can calibrate one another and then enter real design and optimization.

It was with this problem that I came to McGill and became Professor Hong Guo’s student. I chose to come here because I felt I was still missing two things.

The first is the judgment that comes only from going deep into a concrete field. What experiment and process care about, which quantities can be measured, where devices fail — these all require staying inside the problem for a long time, corrected again and again by real systems. Professor Guo’s experience in semiconductor transport, quantum devices, and real applications is exactly what I had most lacked before. In the past I was more inclined to start from “what this algorithm can do” and look for applications; only after coming here did I slowly begin to learn to design computational methods backward from “what the real problem needs.”

The second is the ability to keep turning large-scale electronic-structure models into observable properties. Machine learning can already build ever-larger material models, but if you can’t extract transport, optical, and other experimentally visible properties from them, large-scale models will still struggle to genuinely enter device design and process problems.

So in my doctoral stage, on one hand I keep studying strong correlation, many-body physics, quantum devices, and condensed-matter materials, trying to advance my understanding of the field’s details through more concrete research; on the other hand I develop the software and numerical methods needed for large-scale property calculations. This kind of work spans physical theory, numerical algorithms, high-performance computing, and software engineering. Some days I spend the whole day checking the applicability conditions of a formula, the next it becomes debugging MPI communication, and the third the program is several times slower simply because the memory layout is off. After doing it long enough, the lines between these areas aren’t so clear anymore; they just jointly decide, from different positions, whether something can actually be computed. Fortunately this work happens to connect with my past: a computer-science background means I’m not too afraid of software and performance problems, physics training lets me understand where formulas come from, and experience with machine-learning electronic structure lets me know how these computations should ultimately connect to AI models. Recently, in a study on moiré materials, an AI agent genuinely took part in my process of scientific discovery. From the complex structural changes, it suggested trying a projection onto a few phonon modes. Following this thread, we found that a reconstruction of tens of thousands of atoms, which had looked extremely complex, could in fact be described mostly by just a few modes. AI was involved almost throughout — helping write code, analyze results, and search a large body of literature for possible mechanistic explanations; some of the key clues even came mainly from its combing through material far beyond what one person could read. This made me more certain that AI will take part in scientific discovery ever more deeply, helping researchers propose and test hypotheses and finding connections in material far beyond any individual’s reading capacity. But after actually working with an agent for a long time, I find I don’t in fact look forward to a fully human-free automatic science system. A more reliable, and to me more appealing, vision is to let humans and machines continually cross-check each other in research, letting AI accelerate every link of R&D while ultimately producing discoveries and theories that can still be understood by people. Because a new phenomenon being found doesn’t mean the research is over; we still have to know why it appears, how it relates to existing theory, what might be seen in experiment, and what further questions can be asked from it. Only after these processes does a discovery become knowledge, folded into humanity’s existing understanding, and then become the starting point for the next discovery.

Looking back, the things I’ve done seem quite scattered. Biological sequences, information theory, neural networks, quantum transport, electronic structure, high-performance software, materials, and devices — put on a résumé, they’d need several separate columns and look rather untidy. Every time I apply for funding or an award and have to explain my direction in a very short space, I find it a headache. Even this essay took this many words to barely trace the path once. But in my heart, what recurs across these experiences is really the same impulse: wanting to know. It’s a very concrete, even somewhat annoying, curiosity. What I concretely do now is build the computational infrastructure connecting AI electronic-structure models, large-scale physical-property calculations, and real device problems. It may take the form of a model, a set of algorithms, or a piece of software, and in a few years it may take some other form. But what I want to do over the long run is broader than any single one of these projects: to let machines carry the ever-growing complexity of science, so that people still have room to understand and to judge, and can still enjoy the pleasure of exploration itself. This is, of course, putting it a bit grandly. The actual daily work is often just changing code, hunting bugs, or arguing back and forth with the agent over some seemingly tiny problem. If a grand goal can’t come down into these trivial things, it’s nothing but pretty words.

Back to the original question: will people be pushed out of the work? For much of the day-to-day execution, the answer is probably yes. Nor do I want to cram people back into a process machines could complete, just to prove that people still matter. If a machine can do something faster and better, there’s no reason to refuse it merely to preserve an old way of working. But at least in the sense I’m willing to call science, I don’t think people will disappear. Science isn’t only about producing correct answers; it’s the process by which people turn the anomalies in phenomena into questions, turn results into explanations, and put those explanations back into a shared body of knowledge, using it to keep discovering. A result that isn’t understood, can’t be folded into existing theory, and offers no idea of how it should be verified is at most a temporarily useful answer, and can hardly become knowledge that keeps growing. Even if every link of R&D can one day be automated, the appraisal, understanding, and adoption of the results will still require human judgment and practice. Because value doesn’t float within the answer itself; it always has to land on some subject — changing a person’s understanding, choices, or life — to truly become value.

随笔Essays