[BidClub_]
The Cognitive Revolution · · 99 分钟

伟大的安全更新:AI ∧ 形式化方法——RAND的Kathleen Fisher与AWS的Byron Cook

Nathan LabenzKathleen FisherByron Cook

YouTube
TL;DR
  • AI正在降低技能门槛、抬高专家上限,并让网络攻击实现大规模并行化。 Kathleen Fisher的判断是「遗憾的是,以上全部」:从脚本小子到民族国家级对手,所有攻击者都在变强。Byron Cook的补充是,防守方可以把每次事件转化为一个形式化属性,让失败对未来系统改进产生「大得多的爆炸半径」。

  • 形式化方法只能为选定属性提供机器可检验的保证,不能笼统证明系统安全。 实际目标是划定一个运行边界——凭证永不写入日志、所有静态数据均加密,或某类数据永不离开某个区域——而不是穷尽描述每一种行为。假设一层层向下延伸,从操作系统API到处理器模型乃至物理规律,但嘉宾认为,如今的基线太差,单是把门窗关上并锁好,就足以彻底改变风险水平。

  • HACMS直升机证明,组合式证明可以转化为可信的系统级防护。 一套约10,000行的SEO4内核由约100,000行Isabelle证明支撑,将关键飞行功能与受攻击的摄像头分区隔离;一次搭载2名飞行员的空中红队攻击中,被攻陷的分区反复崩溃、重启,却没有影响飞行。DARPA后来把类似的四轴飞行器防御系统交给DEF CON黑客测试,系统同样未被突破。

  • AWS已经把形式化推理嵌入商业关键基础设施,而不是把它当成学术式的保证剧场。 IAM Access Analyzer、VPC Reachability Analyzer及相关工具帮助客户分析配置;AWS的策略解释器每秒调用超过10亿次,并已相对于形式化定义的策略语义证明正确。另有工作覆盖密码学、虚拟化、持久性和身份系统,相关证明正逐渐「开始相互接触」。

  • Automated Reasoning Checks把自然语言策略转化为形式化模型,并用定理证明约束AI输出。 由于最初的翻译本身可能产生幻觉,用户需要检查模型生成的边界案例并持续完善模型;推理时,系统会检查多个翻译是否逻辑等价,因此支持的是「最高99%的验证准确率」,而不是100%。其商业价值在于,为人力资源、分区规划、合规和智能体工作流提供强度异常高的最后一道护栏。

  • 生成式AI可能改写如今不安全代码的叙事:同时生成程序和可独立检查的证明产物。 模型可以搜索归纳不变量、秩函数和并发抽象,这些工作过去需要稀缺的博士级人才;确定性工具则负责验证结果。Fisher预计,只要明确把安全能力纳入奖励目标,GPT-6、Gemini 4、Nova以及开放权重模型都将成为超越人类的安全代码工程师。

  • 一次伟大的软件重写在技术上正变得可行,但决定时间表的可能是激励机制与治理,而非原始能力。 AICC、Google的CodeMender、OpenAI的同类项目以及DARPA的TRACTOR,都指向以更快速度发现、修复和翻译脆弱的遗留代码,包括在适用时通过程序间等价性检查把C迁移到Rust。然而,更安全的系统会诱发更激进的使用——「因为汽车更安全,我们就开得更快」;形式化政策还带来第二重挑战:保留合理例外,同时不把人为偏见重新引入系统。

摘要 · 为研究而整理的核心内容

1. AI让所有攻击者规模化,失败也可能复合成更强的防御

  • Fisher对威胁的判断是绝对的:「遗憾的是,以上全部。」AI正在协助网络攻击链的每一个环节,提升并行度,让新手、熟练操作者和专家都更有效率。她认识的世界级逆向工程师甚至都「震惊于AI工具有多强」,无论是作为助手还是独立工作。

  • 因此,今天的脆弱软件正同时面对多重威胁:规模化勒索软件和民族国家级攻击、隐蔽入侵、公开攻击,以及失控运行的自主智能体。Cook认为,软件是近期最适合防守的「甜蜜点」,但完整系统还包括同样可能出错的硬件和人。

  • Cook更乐观的框架是形成反馈回路:防守方可以把每次事件转化为一个属性——不记录凭证、所有静态数据均加密、指定数据永不离开某个区域——再针对后续代码证明这些属性。即使这对当下的安慰有限,每次入侵也可能对未来系统改进产生「大得多的爆炸半径」。

2. 形式化方法从日常类型检查延伸到完整正确性证明

  • Cook给出的简洁定义是「对证明进行算法式搜索」。证明是「关于某个命题为真的有限论证」,人们由此可以遵循一小组被接受的逻辑规则,在有限时间和有限空间内「推理无限对象」,而规则的每次应用都能由机器检查。

  • Fisher把形式化方法描述为一整套数学技术谱系:可用性越高,保证的丰富程度通常越低。Java的类型检查器只能证明相对有限的事实——一个整数不会被意外加到函数上——但普通开发者无需理解背后的证明机制,就能获得这层保证。

  • JavaScript的托管内存提供了另一种基于形式化方法的保证:以整数存储的值不会随后「自行变形」成一个函数。C缺少这种内存安全抽象,除非由其他机制补足,否则会暴露出一个尤其有价值的攻击面。

  • 在困难的一端,CompCert证明C源代码映射到汇编后仍具有相同语义。交互式定理证明可以建立完整的功能正确性,但历史上需要「巨量脑力」;选择哪个属性值得付出这笔成本,本身就是一门艺术,因为谱系上的每个点都可能有用。

3. 有用的安全是建立在明确假设上的有限边界

  • Cook认为,「100%安全」不是正确的现实目标:一栋完全无法攻破的房子,如果房主丢了钥匙,也会变得无法使用。当前软件更像一栋门窗敞开的房子,因此在试图打造不可攻破的堡垒之前,先把门窗关上并锁好,就已经意义重大。

  • Fisher更倾向于不完全规定:先定义划定安全运行边界的属性,再让程序员或LLM在多个有效实现中作选择。系统可能需要证明区域数据主权得到保障,却不必证明内存行为的每个细节,尽管在特定场景下,内存安全或其他属性可能不可或缺。

  • 每项保证都建立在假设之上。软件证明可能假定处理器遵循某种指令集行为;证明处理器时,又会依赖更底层的假设,最终一路追溯到物理规律。「假设永远一层层向下延伸」,所以形式化验证提升的是保证程度,而不是提供形而上的确定性。

  • Fisher故意给出一个荒谬的比较:房间里的空气理论上可能聚集到一个角落,把所有人憋死。理性的信心意味着接受足够稳定的假设;在此基础上,内存安全、解析器生成器和输入校验可以让整类攻击变得足够罕见,使攻击者「去攻击你的邻居,而不是你」。

4. 证明工程从自动TLS检查到定制化虚拟机不尽相同

  • Cook把形式化方法工具比作「把所有80年代乐队都看一遍,再试着界定什么是流行歌曲」:它们的证明表示、自动化程度和所需专业能力差异巨大。因此,证明长度不存在普适的代码对证明比例。

  • 对于Amazon编写的一套开源TLS实现,Cook称TLS握手的正确性证明完全自动化。基于SAT的推理和归纳不变量发现效果良好,因为密码学循环通常比较简单,也避开了最棘手的递归数据结构。

  • Amazon的新Isolation Engine虚拟机管理器将进入Graviton 5的AWS技术栈。其Isabelle证明工作涉及复杂属性;按Cook的粗略估计,每名软件工程师大致需要配备1名形式化方法专家,证明脚手架与实现工作量接近一对一。

  • CompCert的保证同样有边界:早期工作假设航空电子代码是顺序执行的,依赖x86或ARM等ISA模型,并对操作系统或第三方API的行为作出假设;最初的解析器假设后来得到修正。未知的外部行为可以用「恶魔式不确定性」建模,再只在证明需要更强假设的地方逐步细化。

5. HACMS把分区证明带到了空中红队测试

  • DARPA的HACMS项目于2011-2016年开展,使用SEO4这一经过形式化验证的隔离内核,包含约10,000行C代码和约100,000行Isabelle代码。其核心属性是:一个配置分区中的软件不能干扰另一个分区。

  • 在Boeing的无人Little Bird上,研究人员将摄像头、任务控制和飞行控制功能分离。他们用AADL建模系统架构,从语法生成解析器,并证明系统级属性,例如:任何到达任务控制模块的地面站消息,都必须经过经过认证且加密的通道。

  • 基线测试至关重要。红队仅凭约6周积累的知识,就攻陷了未经修改的军用直升机,令Boeing工程师大吃一惊;随后红队在整个项目中持续跟踪重新设计,因此后续未能攻破新系统,不能归因于不了解新系统。

  • 第二阶段,团队在地面发动攻击;第三阶段则在空中、2名测试飞行员在机的情况下发动攻击。恶意代码可以不断派生进程并令摄像头分区崩溃,但系统只是发现「摄像头分区挂了,那就重启这个分区」。飞行员无法区分这架高保证直升机与普通版本,后来DEF CON黑客也没能攻破相关四轴飞行器。

6. 证明回答的是被提出的问题,而非所有可能重要的问题

  • Fisher表示,这次飞行主要是向外界展示证据;编写程序的人愿意拿飞行员的生命冒险,项目中的所有人也都基于证明及其周边产物,预期系统不会出问题。硬件或物理手段仍可能发动攻击——仍然可以「向旋翼扔石头」——但在那个场景里,软件攻击的风险可能低于其他手段。

  • Cook把「如何」与「是什么」分开。即便有一种神奇程序,能够以完美可靠性回答关于任何程序的问题,也会面对无限多种可能的查询:证明了5,000个属性之后,第5,001个问题仍可能暴露出一种此前没人意识到自己不喜欢的行为。

  • 所以「总有更多东西需要证明」。验证可以在假设成立的前提下,确凿建立一个定义清晰的陈述;但它无法保证人类确实选定了所有承重属性、正确建模了环境,也无法保证局部结果已经组合成他们真正关心的系统属性。

7. AWS已把面向客户的分析连接到生产级证明

  • Cook于2014年加入Amazon时,客户看重灵活的云策略和虚拟网络,却不喜欢无法确认配置是否正确。AWS随后推出IAM Access Analyzer、VPC Reachability Analyzer、S3 Block Public Access,并把形式化推理嵌入Inspector、Config Rules及其他服务。

  • 内部团队则聚焦密码学、虚拟化、存储持久性和身份等高后果领域。他们没有试图一次性证明整个AWS,而是围绕高风险组件建立「关键引理」;随着时间推移,相邻系统的证明开始「相互接触」,逐渐模糊出更大范围的已验证区域。

  • 最强的连接案例是AWS的策略解释器:它每秒被调用超过10亿次,用于判断API操作是否获授权。它相对于最初为客户分析而形式化的策略语言语义,已经被证明是正确的——这直接回答了客户自然会提出的问题:「我怎么知道你确实正确解释了这项策略?」

  • 2022年假期后,高管们迅速把问题焦点从基础设施转向聊天机器人,再转向多智能体的正确性。Cook说,底层数学可以迁移:Family and Medical Leave Act类似于一项S3策略,而证明组合智能体的属性,类似于证明组合微服务为S3提供的是强一致性,而非最终一致性。

8. Automated Reasoning Checks先形式化策略,再约束智能体

  • 该产品有两项工作:形式化描述什么是真的,以及在推理阶段消除由幻觉驱动的错误。生成式模型首先把自然语言资料——例如一份人力资源手册——翻译成适合自动推理的逻辑表示。

  • 这会产生一个表面上的循环论证:用不可靠的模型来构建防范不可靠模型的护栏。AWS的做法是遍历生成的公式,计算具有代表性的边界案例并展示给用户;用户可以用自然语言否定某个答案,触发下一轮翻译和测试。

  • 部署时,系统会对输入生成多个形式化翻译,并询问定理证明器这些翻译是否等价。达成一致只能带来高水平而非绝对的保证——因此是「99%,不是100%」;出现分歧则支持主动追问:如果头等舱旅行和教练陪同出行产生了不同解释,系统可以询问用户究竟指哪一种。

  • 一旦含义得到确定,形式化模型就能证明或证伪合规性。逻辑检查器「完全没有创造性」;它定义了一个由真假答案构成的无限边界,同时允许语言模型在这个边界内自由地创造性组织表达。

9. 规格定义仍比证明或修复代码更难

  • Cook明确承认,定义预期行为「远远」是最难的部分,尽管后续推理有时也会遇到不可判定或难解问题,包括NP完全问题。他回忆,自己曾在往返楼宇的班车上花费大量时间,只为让团队达成共识,确认他们写下的确实是正确规格。

  • 「所有静态数据均已加密」暴露了问题所在。什么才算加密——从「谷物盒里拿出来的」设备,还是只有获批准的API?什么算静态——特定存储介质中的数据,还是持续在高延迟网络中绕着世界传输的数据?一个看似简单的要求,立即需要多轮细化。

  • 初始实现「不会」满足规格,因此验证会变成反复修复的过程。Nathan观察到,出现疑似漏洞时,1名工程师可能接受其存在,另2名工程师则否认环境条件可能发生;Cook说,穿透这种认知偏差的可靠方法,是构造一个漏洞利用或概念验证。

  • 工具的诊断质量各不相同。有些抽象丢弃了足够多的信息,只能报告不完整的证明;另一些工具则会给出「贯穿全部代码的疯狂路径」以及触发失败的精确输入。具体的反例远比抽象结论更难被工程团队搪塞过去。

10. 持续交付使维护证明成为生产纪律

  • 学术界的形式化方法往往在定理证明后就告结束,但云代码持续变化。生产团队必须把验证整合进CI/CD,伴随实现同步修复证明,并在代码变化与核心论证无关时自动保留已有证明。

  • 底层问题仍然不可判定或难以处理,因此工具有时会「直接去吃午饭」。把变量名从X改成Y,可能改变内部哈希表,使一个此前3秒完成的证明耗时400秒,甚至永远无法返回,尽管程序的相关语义并没有变化。

  • 推理层级从无循环条件分支开始;即使是判断某个分支能否发射火箭,也可能已经是NP完全问题。加入循环或递归后,要证明某个断言永远不会失败,就需要归纳不变量:它在进入循环时成立,在每次迭代中保持成立,并推出被禁止状态不可达。

  • 要证明最终一定终止,还需要秩函数及其支持性不变量;并发场景可能需要依赖—保证条件,对每个线程的环境进行抽象。这些人为创造的产物,正是稀缺专家最关键的地方,因为强大的组合求解器可以在有人提供洞见后完成检查。

11. 生成式AI搜索证明洞见,确定性工具负责裁决

  • SAT求解器已经把形式化方法从研究型「修道院」带入实用自动化。分布式系统——Cook提到一个名为Malibu的工具——会运行多个求解器、共享学到的引理,并展现出与Transformer模型非常相似的规模定律;这些进步让AWS能够在20秒内可靠推理客户策略和VPC网络。

  • 生成式AI直接攻向剩余的搜索瓶颈:「给我找一个归纳不变量,找一个秩函数,再找一组依赖—保证约束。」每个候选项都可以还原为成熟求解器能够接受或拒绝的组合检查,而云基础设施会并行尝试大量模型与工具组合。

  • 「第37步」的类比还低估了这件事的重要性。一个成功证明通常需要少数人才能找到的洞见,因此Cook说,团队「每一次都濒临第37步奇迹」;模型可以吸收文档、威胁模型、运行计划和旧证明,再搜索新的不变量。

  • Fisher认为,生成式AI正在「把这件事调到11档」。形式化语言的训练语料稀少,但证明检查器可以认证合成样本,从而生成可信训练数据。她提出的基准测试,将推动模型开发者围绕内存安全、类型安全和输入校验展开竞争,而不只是比拼生成代码的数量。

12. 安全代码模型让伟大重写变得可信,但并非必然发生

  • Nathan提出的飞轮逻辑成立:模型生成大量证明尝试,检查器保留成功结果,经过认证的证明成为训练数据,而证明成功本身成为代码生成的奖励。对于GPT-6和Gemini 4能否成为超越人类的安全代码工程师,Fisher回答「可以」,并同时点名Nova和开放权重模型。

  • 翻译提供了一条穿越数十年遗留软件的路径。旧程序可以充当新程序的规格,使等价性证明相对更容易处理;Cook提到从Java迁移到Rust,Fisher则指出DARPA的TRACTOR项目正致力于把C翻译成符合惯用写法且内存安全的Rust。

  • Fisher说,AICC已经展示AI结合网络安全如何「以速度和规模」发现并修复漏洞,Google的CodeMender和OpenAI的类似项目也在做同样的事。技术可能先于社会准备好:网络危害已经上升约20年,而公众一直像「被煮熟的青蛙」一样无动于衷;不过,Y2K证明了协调式修复是可能的。

  • Cook的提醒是,安全会鼓励冒险:「因为汽车更安全,我们就开得更快。」市场会在安全、性能、功能和可用性之间权衡,例如设备驱动为了让游戏更快而进入内核空间。形式化方法或许能帮助隔离一个高度激进的AI,甚至「隔离超级智能」;但更强的封锁也可能鼓励部署能力更强的系统。

13. 形式化政策可以普及获取,同时让例外显性化

  • Cook以Portland分区规划为例说明产品机会。如今,计划建造附属住宅单元的人,可能需要找一位在Oregon州Portland执业的建筑师来解读退界要求,包括建筑是否必须距离地界5英尺。会产生幻觉的聊天机器人无法安全替代这个中间人;经过形式化检查的智能体则可能提供准确、低成本、全天候的服务。

  • 政府可以发布政策模型,也可以将其开源、授权,或在不同机构之间组合使用。由于每个答案都能追溯到明确公理,公民可以指出「正是这条公理让规则不公平」,提出修订,并重放此前的对话,查看哪些人的结果会发生变化。

  • Nathan和Fisher保留了核心反对意见:规则有时需要合理的弹性空间。Cook建议设置不平等的公理类别——有些必须遵守,有些除非必要否则可以规避,最后再设置「Steve怎么说?」这样的升级路径——但Nathan追问,判断究竟应该放在哪里,因为人的裁量既能提供人道的灵活性,也能制造破坏性的偏见。

  • 最后的综合是神经符号AI,正如Cook所说,这是「花生酱和巧克力时刻」。形式化方法提供保证,却僵硬且难以使用;AI灵活、易获取,却不值得信任。两者结合可能产生乘数效应,前提是机构接受Nathan指出的更深层挑战:社会正在「逐渐认识到,弄清真相究竟有多难」。

Nathan Labenz

Today, we're diving into the world of automated reasoning and formal verification of software. My guests, Kathleen Fisher and Byron Cook, are legends in this underappreciated but increasingly important field. Kathleen famously led the High-Assurance Cyber Military Systems, or HACMS, project at DARPA, is currently the director of the Cybersecurity Initiative at RAND, and, starting in February, will take over as CEO of the UK's Advanced Research and Invention Agency, ARIA. ARIA is often described as the UK's DARPA, though its mission goes beyond military technology, with the goal of unlocking scientific and technological breakthroughs that benefit everyone.

Byron, meanwhile, is vice president and distinguished scientist at Amazon, where he's made a major contribution to cloud security by leading the application of formal methods to distributed systems at AWS. Despite being arguably the world's biggest target for cyberattackers, AWS has maintained an amazingly strong security record.

In all honesty, I don't think I've ever felt more outclassed by my guests than I did in this conversation. My own math career topped out at differential equations and complex analysis in college, and I've never been strong when it comes to mathematical proofs or formal logic. Nevertheless, I'm hearing more and more in AI circles, not just about the need to harden critical infrastructure against cyberattacks before AI-powered hacking becomes ubiquitous, but specifically about the unique power of formal methods to deliver true information-security guarantees.

And so, I was really eager to learn as much as I could, and honored that these masters were willing to answer my remedial questions. We cover a lot of ground in this conversation, from the nature of the cybersecurity threats that AI poses to the relationship between software specifications and the proofs generated by formal methods, the critical role of assumptions, and how we can be confident that many low-level logical statements do, in fact, add up to system-level guarantees.

We also discuss how these methods can be used to create a reward signal for coding models, and why, despite what we've seen from AI coding assistants to date, we should expect LLMs over the next generation or two to achieve superhuman levels of code security. That could create the opportunity for a great society-wide software rewrite that could dramatically and durably reduce cybersecurity risks.

Finally, we explore how AWS is applying these methods to AI agents in the form of its new Automated Reasoning Checks product. In short, by translating natural-language policies, like a company's HR handbook or a city's zoning laws, into a set of variables and rules that a user can iteratively run test cases against and refine, and then mapping an AI agent's output onto this structure, the service makes it possible to use formal methods to check an AI agent's work for policy compliance.

The translation from natural language to formal rules does create some gray area that isn't present in the traditional process of formally verifying explicitly coded software, but this approach nevertheless stands out to me as one of the strongest I've ever seen for implementing AI agent guardrails. So much so, in fact, that toward the end, for the first time ever, I found myself worrying that AIs might one day become so consistent in their adherence to policy that we could lose the flexibility to make exceptions when official policy doesn't fit a particular situation. That, ultimately, is a problem for another day.

For now, the bottom line is that, with threats ramping up everywhere, the techniques we discussed today constitute one of very few strategies I'm aware of that could really work, in the sense that they're capable of resolving specific, critical vulnerabilities once and for all. This is challenging material. If you're like me and you find that some of this conversation is over your head, I would encourage you to pause and chat with your favorite frontier language model to clarify key concepts. I'm confident that if you do, your AI worldview will be stronger for it.

I hope you enjoy this technically demanding but deeply optimistic conversation about the future of AI and secure systems with Kathleen Fisher and Byron Cook. Kathleen Fisher, director of the Cybersecurity Initiative at RAND and soon to be CEO of the UK's ARIA, and Byron Cook, Amazon vice president and distinguished scientist, welcome.

Kathleen Fisher

Thank you.

Byron Cook

Yeah, glad to be here.

Nathan Labenz

I'm really excited about this conversation. The world of AI and its impact on cybersecurity is obviously heating up at a tremendous pace, and a lot of people are worried about what this is going to do to the offense-defense balance when it comes to securing our digital systems. You two are both world-leading experts on this topic, and I'm really excited to develop my intuition and help other people develop theirs about where we are, what threats we have, and what threats are emerging as a result of AI.

Then there are these, I would say, formerly little-known—or you might even say esoteric—but increasingly central methods that you guys have pioneered: formal methods that can hopefully give us a qualitatively different level of confidence in the systems we're building and how much we can rely on them, and ultimately create that sort of DEAC future that we can all live safely and happily in.

So teach me everything, but let's start with how you see the impact AI is having right now on the cyber landscape. Is it already happening? We hear it's coming, and Anthropic has put out a report, but I don't really know how to think about it.

One way would be that chatbots help people who aren't that capable become more capable, but maybe they're just attacking people who otherwise had security by obscurity, and it's not really that big of a deal. Maybe we're going to see these AIs coming up with cybersecurity move 37 type, brand-new zero-day exploits, and it's going to be crazy.

Maybe the way to think about it is that hackers have historically been limited by the fact that they can't share or collaborate in very broad networks, so they're only able to attack a few things at once. Maybe AIs could make that a super-parallelizable sort of thing. What do you think is real and what is fake when it comes to AIs changing the threat landscape in the cyber domain?

Kathleen Fisher

I think, sadly, it's all of the above. AI is providing assistance at all levels of the cyber kill chain and at all levels of expertise. It's making people who don't know very much know more, people who know some know more, and experts more effective. It's making hackers able to work at scale and in parallel.

I have colleagues who are really powerful reverse engineers, among the best on the planet, and they are shocked at how good AI tools are at helping them do their jobs better, or how well those tools are able to do on their own. So everything from script kiddies to nation-state adversaries: AI helps everyone do better at cyberattacks, or whatever part of the cyber kill chain you're functioning in. AI helps you do better at that skill.

Byron Cook

I agree with Kathleen, but I can give a slightly more optimistic take on it. It also helps the defender. One of the things we've depended on for a long time is the absence of mechanisms. We humans wrote code, and then we didn't really know what the programs were doing, and we hired some good people to try and figure out how they were written.

But as we're using these agentic AI tools, there's a movement away from sociotechnical mechanisms toward formalization. I think there is now a feedback cycle: as security events happen, we can say, "Oh, we don't want to ever be in that situation again, and here's the property we could write down and then show is true of the code." So I think each incident has a tremendously greater blast radius for improving the systems of the future. But I'm speaking to the future; I'm not just speaking to this moment.

Nathan Labenz

Yeah, I think that, to answer your question, right now the software we have is riddled with vulnerabilities, and AI will make it easier to exploit those vulnerabilities for all different kinds of attackers, from script kiddies to ransomware gangs to nation-state attackers. It can do that either in a subtle way or in an overt way, or cause an AI agent to run amok. All of those threats are made more intense by AI.

Byron Cook

I think that's the doom-and-gloom scenario. The same technology that is producing that doom-and-gloom scenario, though, can be flipped on its head to make the software less vulnerable.

We're talking about software, of course. We have hardware, software, and people, right? All of those things are potentially affected by AI systems. Formal methods paired with AI can potentially help with many aspects of the system, not just the software, although I think software is the sweet spot where we have the most ability to make a positive difference relatively quickly.

Nathan Labenz

For somebody who, like me not very long ago, had either not heard of formal methods at all or had heard of them and had a very primitive understanding, can we do a little 101? What are formal methods? What is the formal verification of software? What does it allow us to do that's qualitatively different?

Byron Cook

It's the algorithmic search for proofs. What is a proof? It's a finite argument of what is true. You can reason about the infinite in finite time and finite space.

To do that, you need chess-like rules. You need an accepted set of a small number of rules that, to make an argument, you have to religiously follow. Those rules have evolved over the past 2,000 years, but we have, as a society, settled on a few of them, like modus ponens and so on.

Basically, you follow these rules, and these days we can algorithmically search for those arguments. Generative AI is actually very good at helping us with that. You can use generative AI to help find a proof and then check it according to one of these checkers that only follows those rules.

Kathleen Fisher

I would say, at a slightly higher level, it's a set of mathematical techniques that let us prove properties of software in a way that we can check—the machine can check—so that we can make sure that we did all of our work properly. That allows us to prove properties of software.

Those properties aren't a one-size-fits-all thing. There's a whole range of different kinds of formal-methods-based properties. The gamut goes from things that are really easy to use and easy to understand to harder-to-use methods where you prove richer properties.

A type system, like the type system in Java, is actually an example of a formal-methods-based property. When you run the type checker in Java, it proves that the way your program is manipulating data means you're only ever going to put integers together in a way that is consistent with integer-like behavior. You're not going to try to add an integer and a function, for example. That would be a type error.

If you've ever written a Java program and run the compiler, you've used a formal-methods-based property. The type checker has checked your work and given you the seal of approval. You've used that formal-methods-based approach correctly. You didn't have to know very much about how it was doing it. You just had to know the rules for how various kinds of types could interact appropriately, and the compiler checked that those rules were used properly.

There's the escape hatch of a type cast, which you have to avoid if you don't want to break the soundness of the type system. That's at one end of the spectrum, where it's actually pretty easy to use and you get a relatively weak guarantee. Type safety is a pretty weak guarantee.

At the other end of the spectrum is an interactive theorem prover, where you're proving full functional correctness. You have a specification of exactly what the code is supposed to do. CompCert is a verified C compiler that proves that the C code maps down to assembly code with exactly the same semantics. That was proven in an interactive theorem prover, where the people doing the proof had to use a huge amount of brainpower to prove that it was correct. Each step of the logic was checked using modus ponens, like Byron referred to.

That's the other end of the spectrum, where you're talking about PhD-level smarts to use. There's a whole bunch of things in the middle, where you have an intermediate level of property and an intermediate level of how much elbow grease you had to use to get that property proven.

All of them are useful. Everything from very simple properties like type safety to very high-end properties like full functional correctness is useful. It's just a question of when we want to use this level of effort to establish what kind of guarantee. Choosing which properties and what level of effort for what kind of thing is part of the art of appropriately using formal methods. Did that make sense?

Nathan Labenz

Yes, although I definitely have some follow-ups.

Kathleen Fisher

Please.

Nathan Labenz

My software background is basically more on the JavaScript side. I haven't even gotten very far into TypeScript, so I've written code where I can add an integer and a string. If I do that, it's on me.

I then do what I think most rank-and-file web developers, including many building on AWS, are doing: throw some code together, fire the app up in a browser, click around, and see if it's doing what I want it to do. If it's generally doing what I want it to do, then I feel like, okay, I guess I did a good job.

Obviously, in that process I'm not able to be anywhere close to exhaustive in terms of all the possible things that could logically go wrong. I definitely have an intuition for how type checkers, for example, can help reduce errors, because things that I wouldn't have thought of, these tools can flag: “Hey, you're breaking a rule here, and if you do that, you could get yourself into trouble.” That much I think I have a decent intuition for.

Kathleen Fisher

When you use something like JavaScript, you're getting memory safety, which is another kind of formal-methods guarantee, right? The memory boxes have an abstraction that the language is providing for you. When you store something in memory—when you store an integer in memory—when you take it back out again, it's still an integer. It didn't transmogrify itself into a function. That's a memory-safety property being provided by the language that you're using.

If you're using C, that's a language that doesn't provide memory safety. Memory safety is another property that is very useful for not getting hacked. It's a property that the language you're programming in is providing, and the interpreter that you're using is enforcing that particular property.

Nathan Labenz

Help me understand this basic idea that these type checkers can help me avoid shooting myself in the foot. I don't even have that great a sense of the taxonomy of attacks. Memory attacks or type attacks could be one. In my homework for this, I've noticed that parsers are maybe not the root of all evil, but a very common sort of weakness. Memory safety, type safety, input safety—yes.

So maybe give us a little walkthrough of the kinds of things that people tend to exploit and then the kinds of approaches that people take. This is where I get so fuzzy, because I'm like, how do I really know when it was fully correct?

How do we get to that level of confidence? The layperson who doesn't quite get it can wonder, “What if there was a mistake in that process? How do I know that it's truly proven in a way that I can accept it and take to the bank?” That's a fuzzy question, but I'd love to work my way toward having the confidence that I believe is well justified. I can't articulate yet why I can sleep soundly at night because this process has been executed.

Byron Cook

To some extent, cybersecurity is analogous to the security that you would want on your house. One hundred percent security is not actually a goal that you should really be going for. You don't want to have a house that no one can ever break into, because then if you lost your house keys, you would have to go buy a new house.

You want a house that has an appropriate level of security. Right now, the level of security we have is equivalent to the doors being open. The windows are open. They're not even closed, let alone locked. The question that you're asking is a little bit like—yes, we can walk through the example that you're asking for, but total security is way, way, way beyond where we are. We're looking for the equivalent of closing the doors and locking them, as opposed to everything being wide open, which is kind of where we are right now.

Kathleen Fisher

Yeah, the mental model I have is that there are a set of properties that you want to hold of your systems. They can be motivated by security concerns, past things you've seen, and also where things are going.

You might want to know that no credentials are ever logged and that all data at rest is encrypted. You can layer on more and more of these. Maybe for sovereignty, you want to know that certain data never leave the region.

To establish some of those things, you'll probably need to establish—you might need to establish—memory safety. You might need to establish various things, but maybe you don't, right? The way I like to think of it is: What properties do we want to hold? That creates an envelope in which the system can operate safely.

And then the programmer or the LLM can choose to implement that in different ways. So, I think that notion of totally proving everything about the system isn’t really true. I think that you want to underspecify the system and then allow there to be different implementations of that program.

The other point I’ll make is that you’re always having to make some assumptions. When you prove a program correct, you typically assume the microprocessor is correct. We could go prove that, but ultimately, if we prove the correctness of the microprocessor, we’re going to be making assumptions about the principles of physics. We don’t really know that they’re always going to hold. We believe historically gravity has held, and we believe it’ll continue to hold, but we don’t really know that. You’re not going to be able to do a mathematical proof of that per se, and if you do, it’s going to be under more assumptions. So, there are always assumptions all the way down. You’re only ever raising assurance; you’re never getting 100% assurance. But it becomes confident enough—

Nathan Labenz

Yeah, exactly.

Kathleen Fisher

—that you have assumptions that all the air in the room isn’t suddenly going to move into the corner, and that’s good enough. Even though theoretically it’s possible that all the air in the room will move into the corner and you will suffocate. It’s that kind of thing.

I think there are properties like, if your system is memory-safe, if your system uses parser generators and is input-valid, things like that will make it so that the likelihood that your system is vulnerable to certain kinds of attacks is much, much lower. Those things are the equivalent of having the practice of closing and locking your front door, and closing and locking your windows. It doesn’t mean your system isn’t vulnerable; it just means your system is likely to be much less vulnerable, and the people who are attacking may attack their neighbors instead of you.

Byron Cook

So, what we’ve done at Amazon is listen to customers about the concerns that they have, and then choose to focus on proofs of some of those things. The other thing we’ve done is work with engineers who are developing systems and identify the parts that we’re worried about, or that seem hard to get right. Then we focus there.

We’ve identified pieces of the system and done proofs of them, and what we’re seeing over time is that they’re beginning to spread and start to touch. You’ll have proofs of 2 systems, but those proofs begin to touch each other, and they begin to blur into the system, parts of which have been proved.

The big thing is: what are customers worried about, both internally and in terms of policies, networks, and that kind of thing?

Nathan Labenz

I’d love to go through some examples of customer concerns and the types of assurances that you’re able to give customers based on all this work. But maybe, before doing that, just one more beat on the C compiler.

When you said that it’s proven to the point where the semantics of the C code are proven to be reflected in the semantics of the machine code that it’s compiled into, what assumptions are still lurking there? I have an intuitive sense of what it means to say that the semantics are the same, but I’m unclear on what assumptions that would rest on. What’s the equivalent of the air all going into the corner for that scenario?

Byron Cook

I don’t remember off the top of my head what the assumptions were. They’re probably assumptions about the underlying hardware. For sure, they’re going to assume the correctness of the ISA. I only know the work secondhand, but they didn’t go prove the x86 or ARM instruction set. They’re assuming the x86 or ARM instruction set, and they have a hardware model of what that is. That’s what we do in our work at Amazon, too.

The original version had assumptions about the parser that turned out not to be correct, but they went and fixed that in a later version. They’ll also probably make some assumptions about the code. I don’t know what they do for concurrency, if they do anything, so it’s probably sequential. The original version was sequential because they were focused on avionics software. Avionics software is assumed to be single-threaded. So, there’ll be some assumptions along those lines.

When you’re calling the operating system, there’ll be some issues around that. There’ll be assumptions about what the operating system’s APIs do, and there will be other third-party APIs that they’ll have to model. The nice thing in this work is that you can model the outside world, and you can often model it with demonic nondeterminism. You can say, “I don’t know what this thing is going to return,” and a formula represents that uncertainty.

Nondeterminism isn’t free, but it’s already paid for in the formal reasoning tool, so it’s actually quite nice. Then you can refine that as needed. One of the areas of practical reality when you’re doing these kinds of proofs is that you end up refining your assumptions around third-party APIs, like operating-system system calls.

Nathan Labenz

Can you give me a little more flavor of how these proofs work? It might be useful to do this with examples, starting from customer concerns—or maybe not; you tell me.

What do these proofs look like? I have the sense that they’re exhaustive mappings out of every possible logical state, every possible corner case. I’ve heard estimates that the length of the proof might be an order of magnitude longer than the code that you’re trying to prove the validity of, maybe even longer than that. If we started to inspect the proofs, what do they look like?

Byron Cook

There’s a huge diversity of tools, and they make a number of different choices. It’s like looking at all 80s bands and then trying to characterize what a pop song is, right? Some of them are really heavy, some are super simple, some are long, and some are short.

Kathleen was alluding to this: there’s a spectrum of tools, and some are really easy, while some are really hard to use. With generative AI, maybe they’ll be easier in the future. There are also tools tailored to certain domains.

For example, there’s a technique called predicate abstraction and counterexample-guided abstraction refinement, which is good at proving certain kinds of properties, such as API usage properties.

They run completely automatically on the code. You don't need to do anything. They discover a proof, and then, if you want to investigate it, it has a particular shape and sort of representation.

But then, if you're trying to prove the—I don't know—the Collatz conjecture, or if you're trying to do something more complicated, that's a different story. At Amazon, we've recently announced the proof of a new hypervisor. We've announced the existence of a new hypervisor called the Isolation Engine. It'll be in the AWS stack, Graviton 5, and we have an Isabelle 3 proof of it. We've proved a bunch of properties of that, and those are quite intricate.

So there's really a spectrum. I could give you, for any data point you want, an example. Let's do a couple of relatively simple ones. For proving the correctness of the TLS handshake in AWS to it, it's an open-source implementation of TLS that we wrote at Amazon, and it's what Amazon uses all across Amazon. It's all completely automatic.

Underneath the hood, the tool being used is sat with the discovery of inductive invariants. Cryptographic code usually has fairly simple loops. The loops aren't over complex data structures, and so on, so fairly simple heuristics actually work.

That's one example that's quite easy, whereas in the proof of the hypervisor, my mental model is that there's sort of a 1-to-1 ratio of engineer to formal methods expert on the team. I imagine—I haven't looked at it in great detail—but it's on the order of that size. It's going to be roughly a 1-to-1 ratio of proof scaffolding to code. Those are a couple of examples.

Nathan Labenz

Can we go a little bit further into what sorts of statements are being made? “This software does what it's supposed to do and only what it's supposed to do” is a great place to get to, but I still want a little bit better intuition for how all these low-level statements that we can make aggregate up to that, and how we know that they do.

I apologize if this is a really ignorant line of questioning, but I do struggle with this. I can look at these individual statements and say, “Okay, we've gone down this logic path, and that one's okay.” We could do that a lot of times, and I'm still thinking, “How do I know that we're actually proving the things that we mean to be proving?”

Kathleen Fisher

I think it depends on the system. SEO4 is a separation kernel. It's one of the exquisite artifacts that was proven to be fully functionally correct by a team in Australia. The main property of a separation kernel is that you can configure it so that you have different compartments, and the code in one compartment cannot interfere with what's happening in another compartment. They specified that property in formal mathematics.

That was a massive undertaking. There's about 10,000 lines of C code that make up the hypervisor, and then about 100,000 lines of Isabelle proving that the property holds and that you have integrity of the system. The reason why that level of effort was worth it was because that is a building block that you can use in many systems.

In HACMS, which was a program that DARPA ran from 2011 to 2016, one of the things the HACMS performers did was build a helicopter, the Boeing Unmanned Little Bird. They used the SEO4 hypervisor to separate the code on the helicopter into different partitions. One of the partitions was the camera partition, which an analysis suggested was not important from a security perspective. It didn't matter if the camera partition was owned by the bad guy for the flight operations of the helicopter, or for the ability of the helicopter to communicate with the ground station.

Then there were the flight operations: the thing that controlled the actual ability of the helicopter to fly. The mission control computer was the thing that talked to the ground station, and there was the flight computer, which actually controlled the ability of the helicopter to fly. They analyzed the system and modeled the overall architecture in another formal language called AADL, the AADL architecture description language.

They wrote the protocol for communicating with the ground station in a grammar instead of writing it by hand. They wrote the grammar for what the message format had to be, and they proved system-wide properties. The only way to communicate from the ground station to the helicopter was through a pathway that had to be authenticated and encrypted. All messages that got from the ground to the mission control computer had to be authenticated and encrypted—properties like that, which are the high-level system properties that you cared about.

They reasoned about those properties in this architecture-wide description, which is a formal methods tool. Using that combination of formal methods tools—things like the parser tool, where they wrote the description of the properties; a cryptographic tool, where they wrote the formal encryption tools and proved properties of encryption; and then the SEO4 microkernel, which is how they got the separation property—they were able to prove system-wide properties like the fact that the only way to get a message to the mission control computer was through an authenticated, encrypted channel. They were able to prove those kinds of system-wide properties that you were asking about.

They then tested this with a red team. They let the red team put whatever code they wanted in that camera partition, which they had analyzed at the system-wide level to decide wasn't critical to the security of the overall system. At the end of phase 2, they let the red team attack the system while it was on the ground. At the end of phase 3, they let the red team attack and try to disrupt the operation of the helicopter while it was in flight, with 2 test pilots on board.

They were basically trying to crash not only their partition but the helicopter while it was in flight with test pilots on board. The test pilots not only survived; they couldn't tell that they were flying the high-assurance version of the helicopter instead of the normal version. The camera partition kept crashing because the red team could crash its own partition. They could basically do a fork bomb, and that would bring down their own partition, but the rest of the system would be like, “Oh, the camera partition went down. Let's restart that partition.”

So that's an example of how you can use a combination of different formal-methods-based tools to get system-wide guarantees of behavior, right?

Nathan Labenz

Yeah. One question I still have there—and that's an awesome story—is that you kind of glossed over the beginning part of the story. As I understand it, before this whole project began, the red team hacked right in and surprised the Boeing engineer. The baseline of hacking was that this was a military helicopter, right?

Kathleen Fisher

They also did the same thing with a quadcopter, and no one was surprised that the red team could hack into the quadcopter. The Boeing engineers were quite surprised that they could hack into Boeing's helicopter. DARPA had the red team attack the platforms unmodified to demonstrate what the baseline security was, basically to show that these platforms were hackable without that much effort. The red teams were able to hack in with about 6 weeks' worth of knowledge in the first place.

After the modifications, the red team was following along throughout the whole program. One concern people have voiced is, “The red team didn't know very much about the system, so why would you think they would be able to hack in?” The answer was that the red team actually knew a ton about the system because they were following along through the program the entire time.

On the quadcopter, DARPA took it back to DEF CON and to the Aerospace Village and had hackers try to break into the quadcopter several years later. No one was able to hack into it several years later, kind of demonstrating that these kinds of techniques really pass the test of time. There are still assumptions, so it probably is possible to hack into it, but probably you have to attack through the hardware instead of through the software.

Nathan Labenz

Yeah. My one main remaining question on that story is that, at the end of that process, for somebody like me who maybe doesn't get it, there's no substitute for flying the helicopter, right? But how much lingering doubt did you and the team have about whether the red team was going to get in?

When you say something is proven, in your mind is that 100% proven, or is it, “How many nines of proven is proven?” Was it purely for the doubters, or the people who don't get it, that you needed to do the flight? For your own sense of epistemic certainty, did you have everything you needed before the bird even went up?

Kathleen Fisher

Yeah. The flight was, I think, mostly for the demonstration quality. The people writing the program were willing to risk the lives of the pilots, but I think everyone in the program knew that it was going to be fine because of the level of guarantee it had.

It wasn't just the proof; it was all of the surrounding reasoning and artifacts that went into producing the evidence that was in that proof.

Kathleen Fisher

I mean, it’s probably still hackable. There are still, as Byron says, always assumptions. There’s always more to prove. There’s always more to prove, right?

But what the attackers could do in that case—given where the red team was and what it was going to be able to do—was not going to be enough to crash the helicopter in that situation. Could somebody come and attack it in a different way? Probably. Could somebody throw a rock at the rotors of the helicopter and crash it? There are other ways of attacking the helicopter that would cause a problem. Helicopters are fundamentally not very stable, right? So, is the risk to the helicopter through another means now higher than the risk of the software attack? Probably.

Byron Cook

If I could propose a way of thinking about it, we could separate the how and the what. I imagine there’s—I mean, the problem is undecidable, so this won’t be possible—but imagine there’s just this magical tool that can answer any question and find any proof. Now, there’s still an infinite set of questions you could ask of that tool.

So it’s like a query tool, right? Imagine Google Search: you type a question and get an answer. So imagine we have a procedure that can answer questions about your program. You have a program and a tool that can answer any question about it with 100% reliability. There’s an infinite, if not uncountable, number of questions you could ask.

And so imagine you knew all the answers to the questions you had asked. You had 5,000 questions; there might be a 5,001st question you want to ask that might reveal something you actually didn’t like about your system. That’s one way to think about it. What’s traditionally been a problem, and what can make this area difficult, is that actually establishing the answers to those questions is also rather challenging.

There are quite remarkable steps of progress happening now to make that easier, and that sort of brought it to the forefront. But the other thing that’s brought it to the forefront is that with generative AI and agentic AI, suddenly a much larger set of people are asking those kinds of questions. So it becomes much more interesting now.

Nathan Labenz

So, yeah, tell me where we are today. I mean, you’ve been working on this at Amazon for a decade, right? And there have been a lot of wins. Maybe sketch out some of the big wins. What are they? For a little developer like me, I just trust you guys are doing a good job. I don’t think too much about the how. I know big enterprise customers that are making decisions to move highly sensitive data into AWS are asking a lot harder questions than I’m asking. So, how much of the roadmap has been accomplished? How much remains to be done, and what does the acceleration look like today with the augmentation that we’re getting from generative AI tools?

Byron Cook

Yeah, let’s say that, before 2022, the things that we had done were, first of all, building tools to help customers reason about their configurations—their virtual networks and their policies. In AWS, as in many cloud compute environments, there’s a notion of policy that’s quite flexible. Basically, you have resources on the internet, and then you have policies that define when those resources can be accessed and the constraints under which that can happen. So a secure system is typically a configuration of those policies, which turns out to matter quite a bit.

When I joined in 2014, customers loved the flexibility of the policy language and the flexibility of the virtualized networking environment, but they didn’t love not knowing whether or not they got it right. One of the first things we did for customers was build tools to help them actually reason about their own systems. Those are embodied in many AWS features, but the flagships would be IAM Access Analyzer and VPC Reachability Analyzer, to reason about the policies and the networks.

We also have S3 Block Public Access, and there are also tools in Amazon Inspector and AWS Config Rules in a bunch of places. Internally, we identified a bunch of places where we wanted to get things right: the cryptography, the virtualization infrastructure, the storage infrastructure for durability, and the identity infrastructure. We have proved a number of key lemmas in that space.

What’s been very interesting lately is that we proved the “correctness”—and I don’t think the audience will be able to see me, but they’ll hear me, so there are quotes around “correctness”—of the policy interpreter. The AWS policy interpreter gets called more than 1 billion times per second. Whenever you call an AWS API, we gather all of the policies related to the principal and the resource, put them together in a collection, and then call this interpreter to make a decision: yes or no, should we allow this action to take place?

Now, what does correctness mean? It’s correctness with regard to the semantics of the policy language that we defined in that previous tool, which is the basis of IAM Access Analyzer. That’s an example of these tools beginning to connect up. We first defined the semantics of the policy language, then provided customers with tools to formally reason about their policies, and then customers began to ask questions like, “How do I know that you’re actually interpreting that policy correctly?” Well, okay, let’s go prove that. You see that in other places in the virtualization space and so on.

Then, very interestingly, what happened in late 2022 and early 2023 was that, for obvious reasons, suddenly people became very interested in generative AI. Coming back from the holiday break of 2022 to 2023, boards and C-suite leaders really wanted to develop stories for what their organizational generative AI story was going to be. A whole bunch of people began using generative AI tools.

The questions we began getting from customers evolved, and it became much more about, first, the correctness of chatbot applications and then, increasingly, the correctness of agentic AI and multi-agent systems. Under the hood, we’ve been applying many of the same techniques to agentic AI and chatbots. A policy of the Family and Medical Leave Act is very similar to an AWS policy on S3 buckets or VPC networks. Reasoning about the composition of multi-agent systems actually looks a lot like reasoning about the composition of microservices to show that S3 provides strong consistency as opposed to eventual consistency.

We’re able to take a bunch of those techniques and adapt them into that world. That’s where we’re at. The other area that’s quite exciting is that generative AI can actually help you find proofs. When you’re asking your generative AI tool to help you find a program, you can ask it to find a proof at the same time.

And so you can begin to check those proofs as the programs are synthesized. The big challenge has always been, and I imagine Kathleen will agree with me, figuring out what you want to prove. A lot of the work that's been going on recently—you'll see this in Automated Reasoning Checks and Bedrock Guardrails from AWS, but also Kyber, which is an IDE that Amazon has launched—is helping customers figure out what their specification is: What do you want to hold of the system? Let's iterate together on that to make sure you got it right, so you're actually proving what you think you're proving. That's where a lot of focus has been right now. So that's kind of a snapshot of where we're at.

Nathan Labenz

It might actually be helpful to dig in a little bit on the Automated Reasoning Checks as they relate to the LLM and agentic system outputs. I think this feed is by an AI obsessive for AI obsessives, but as much as I'm obsessed with all the latest developments in AI, I'm also not very good even with my own password-management-level security. So I think maybe the intuition will be a little bit easier to develop for the more familiar use case, and then we can backport a little bit of that intuition to the rest of the world.

One of the promises that the Automated Reasoning Checks make is that you can minimize AI hallucinations and deliver up to 99% verification accuracy. It might be helpful to talk through how this sort of policy works, because what people can start with, I think this is really interesting, is a natural-language policy. You mentioned the Family and Medical Leave Act policy. This is something that somebody has written in prose, presumably without even thinking about a software implementation when they wrote it, right? These policies typically predate the ChatGPT moment.

Then somebody comes along and says, “Okay, I could really save a lot of time and money if I had an AI evaluate everybody's FMLA applications.” But then we have the question of whether it's doing it right. So maybe take us through that loop of how this fuzzy, natural-language policy gets translated into a set of checks in the first place. There's also an iterative loop, which is part and parcel of everything I've seen in the AI game recently. Take us through that story of how a policy becomes a formally, or almost proven, policy. It's like how a bill becomes a law, but it's how a policy becomes a formally or almost proven policy.

Byron Cook

You can go today and ask Claude, “Hey, translate this. Here's this PDF. Can you please translate it into temporal logic—branching-time or linear-time temporal logic—or SMT or Lean? And then I want to answer these kinds of questions.” Under the hood, that's essentially what the product is doing.

There are 2 activities in the product. The 1st is to help you formalize what is true, and the 2nd is to remove incorrectness due to hallucination at inference time. We basically ask a generative AI tool to help translate it. Now you have the problem of, “Hold on. We just used generative AI to formalize this, but I thought the whole point was to address incorrectness due to hallucination in generative AI.”

What we can do now is walk through the structure of that formula, identify interesting corner cases, and walk you through what that formula is really giving you. You have a non-expert who probably doesn't understand logic, but we can calculate all of the representative corner cases and walk you through what answers you're going to get. If you don't like what you're going to get, then you can refine it. You can say, “I don't like this answer. Here's why,” in natural language, and we can go back to the generative AI tool and do that again.

That kind of models what we've been doing all along at Amazon and throughout my entire career, and I imagine Kathleen will agree. Traditionally, you would have paired up a formal methods person with a domain expert in the other domain—biology, operating systems, device drivers, airspace, railway switching, you name it. Together, you're going to build a formalization and look at a bunch of examples. The domain expert is going to say, “Oh, no, you got it wrong. You didn't understand the assumptions.” You bake those in, do it again, and iterate until you can't find any more problems. Then you say, “Well, I hope that's what we're trying to prove,” and you go prove that against the real code.

That's kind of what's happening in the system, too. There's a neat feedback cycle after deployment, which we'll talk about in a moment. So now let's talk about deployment. Once you've locked that in, you can deploy it. If your customers or users of your chatbot are asking questions, we translate those into natural language, and then we prove or disprove the correctness according to the formal model.

There are a couple of other gotchas. How do we handle the natural language? Again, we use generative AI, but now we don't want to do this loop. What we do is multiple translations, and then we use a theorem prover to see whether each of the translations is equal to the others. If so, our assurance that we got the translation right is relatively high. That's why we're at 99%, not 100%.

If not, then we can do a form of active listening. If one translation said, “They're talking about a first-class flight,” and another translation said, “They're talking about a coach flight,” then we can go back to the user and say, “Did you mean first class or coach?” Or we can query that in a database. There are various methods there. There's a sort of active listening to build a mental model about what the question is, and then we can prove or disprove that according to the model.

That's the kind of product. By the way, this is for corporate policies and these kinds of things, but you see very similar things happening in code, and you see very similar things happening in agentic systems. You see this pattern of the human in the loop translating data to knowledge quite a bit. Deployment into the inference system, either over natural language or structured systems like programs, is the downstream place where that gets deployed.

Nathan Labenz

Let me try to echo a little bit of that back to you. I think that was really good. In the traditional setting, you said—and it's essentially the same for the generative AI setting now—you start off with a fuzzy idea of what it is you want to be doing. You have to bring in the domain expert who has, if nothing else, the ability to answer the question, “Are we doing the right thing in this case?” You're trusting that person's judgment to be ground truth for what you want to happen.

Hopefully they've been able to capture that in written language, but probably not 100%. They get together with a formal methods person and translate natural language into a logical specification. They then run a bunch of examples through and validate that this all seems right, at least so far. In the traditional sense, this would probably be the biggest weakness, right? Did you get the specification correct?

Byron Cook

Yes, by far. It's the hardest part. Even though, once you have a specification and you're reasoning about programs, the problem is undecidable or intractable—NP-complete—by far the hardest part is the 2nd thing. In my career, working in large organizations, I've spent a lot of time on shuttle buses between buildings trying to get agreement among teams on whether we got the specification right. I've spent a lot of time doing that kind of thing.

[laughter]

Nathan Labenz

Okay, so that's interesting, and that obviously becomes one of the assumptions on some level: We're only as good as the specification.

Byron Cook

I'll give you a concrete example that's pretty illustrative.

Nathan Labenz

Please do.

Byron Cook

For various compliance reasons, like SOC 2, and various compliance regimes around the world, there's going to be one around “all data at rest is encrypted.”

Nathan Labenz

Okay, sounds plausible.

Byron Cook

But then, what do you mean by encryption? Exactly. If I use an encryptor that I get from a cereal box, that's encryption. Well, no, that's not encryption. That's the issue: How do you define encryption? Uh-oh. Now we're talking about what you mean by encryption, and so we're iterating on that.

Then we could talk about what “rest” is. What is “rest”? If I put it on the table, is that at rest? Oh, no. You mean digital storage. Okay, so now what you mean is digital storage, and then you can talk about what happens if the data is flying in a network and you're using the latency of the network such that it never actually gets stored to a disk drive, but is just going around and around the world. Is that at rest or not?

Because if that is at rest, then it probably doesn't hold, because that's not what we're proving, right? So you do have to define that “at rest” means these media or these APIs, and “encryption” means data coming out of these APIs. You have to get real clear on what those are.

And so, that has already gone through 3 or 4 refinements, and that’s just for a very simple case.

Nathan Labenz

Yeah, that’s fascinating. So, in the traditional, pre-GenAI context, you have your spec. You go do a bunch of work that’s above my pay grade to prove that the software as written satisfies the spec.

Byron Cook

Which it won’t.

Nathan Labenz

So, then you have to fix it.

Byron Cook

It won’t.

Nathan Labenz

Yeah.

Byron Cook

Yeah, it won’t. Exactly. And then you’re going to have to—

Nathan Labenz

Oh, yeah, that’s the other thing: people have cognitive biases around, “No, that’s not possible.” Right? So, invariably, when you’re doing this process—when you find what you believe to be a bug, you get 3 engineers from the team together, put it up on the board or whatever, and show them the bug. One of them will say it’s a bug, and 2 of them will say it’s not. And now you’re going to need a—

Byron Cook

Some people are going to be pessimists, and some people are going to be optimists. They’re like, “Oh, that’s not possible. The environment will never—”

Nathan Labenz

Be the conditions, right? The environment will make it so that could never happen.

Byron Cook

Yeah, that can’t happen. And then they’ll argue amongst themselves. Really, the only way to get to ground is to create an exploit.

Nathan Labenz

Yeah.

Byron Cook

To show that it’s possible. To show them that it does happen. You identify those exploits by finding places where the proof is incomplete or can’t quite get to the inputs that trigger the condition that makes it happen. Some of those tools are really good at finding those, and some of them aren’t, because we talked about all these different kinds of tools and all these different algorithms. Some of them lose so much information that you’re like, “The proof didn’t go through, but I don’t really know where the bug is.” But some of those tools are really good at saying, “Oh, no, here it is,” and showing the crazy path through all the code. Those are harder to argue with.

Nathan Labenz

Yeah, so, you—

Byron Cook

But, sorry—

Nathan Labenz

But we interrupted you. So, you were—

Byron Cook

No, you please.

Nathan Labenz

Again, I want you guys to do as much of the talking as possible, as long as I can roughly follow it. So, you iterate through this process of defining the spec, and then you’re again iterating through, “Well, here’s why we weren’t able to prove all this stuff.” We’re finding all these edge cases. We’re finding these vulnerabilities. We’re closing those down. Eventually, we sort of get there, and then we’re done, at least for this version or this generation of the system. Now, contrast that to the GenAI case, because we now have an additional level of fuzziness.

Byron Cook

By the way, if I could just make one parenthetical statement: this field was proposed by Turing. Turing wrote “Checking a Large Routine,” showing how to do proofs of programs. But this field went into decline in the ’70s and ’80s. It was really only in the monasteries, if you will, where there were people keeping this area alive. It wasn’t really used in practice except for some very obscure cases.

So, it’s become the discipline of the academics. From the academic view, you’re now done, everyone’s happy, and everyone can go celebrate. The problem is that the code, particularly in a cloud world, changes all the time.

Nathan Labenz

So now the big thing is, well, did you do CI/CD? You integrated this into the pipelines, and now you’re trying to repair the proof because the code is constantly evolving. That’s a whole thing that you kind of have to deal with.

Byron Cook

They’ve done some really cool work that shows that sometimes the proofs can be automatically updated when the code changes are irrelevant to the main arguments of the proof. The proofs can be automatically updated, and you don’t need to bring the proof engineers back.

Oh, and here’s another beautiful thing: because the tools are actually solving the undecidable or intractable, they sometimes just go to lunch, right? Because the problems are undecidable or intractable, when they give you an answer, now we can believe the answer. But if they don’t—because the problems are undecidable or intractable—sort of, surprise, from time to time they’re just not going to come back because they’re off spinning forever, because the problem’s undecidable or intractable.

Unfortunately, it might be that you changed a variable name from X to Y, and that messed with some hash table deep in the theorem prover. Suddenly, something that took 3 seconds maybe never comes back, or maybe it takes 400 seconds. So now your engineers are like, “Whoa, what happened?” That’s a big challenge for us.

Nathan Labenz

So, again, the generative AI world kind of addresses this in an interesting way. But I’m trying to lay the groundwork for a sort of pre-GenAI world.

Before we get to the GenAI world, in terms of using these methods to help boost the assurances we can get around GenAI systems, how are GenAI systems helping with this work? I understand that we’re seeing all these results in math, which, for somebody who’s not a mathematician, is kind of hard to parse. You’re sort of taking it on faith on Twitter: “Oh, this is a novel problem, but it’s not that big of a novel problem,” or, “The insight here was key,” or it wasn’t key. I don’t really know.

What has your experience been in terms of bringing language models to the process of building out reasoning and these sorts of proofs? Do you want me to say something, Kathleen, or do you want—

Kathleen Fisher

I can start. They’re showing a lot of promise. One of the reasons why formal methods was in the monasteries, as Byron was saying, was that it was in the universities. It was only a research problem for a long time. What changed was that it became possible for automation to solve a lot of the problems.

SAT solvers, which was a technology that Byron mentioned earlier, for example, made it so that a lot of the hard work could be done in a completely automated way, which kind of revolutionized a lot of formal methods work. That underlay some of the advances behind the work in HACMS, which started the spiral of, “Oh, actually, formal methods can be used in the real world.” It also underlay what Amazon has been doing.

I think large language models and generative AI have the promise of turning that up to 11 in terms of what can be automated, because language models and generative AI are really good at language, and a lot of formal methods are language-based problems. Formal methods involve fairly sparse languages at the moment. There’s not a massive amount of training data in a lot of formal, model-based languages, but there are places where we can generate the training data and be sure that the training data is correct because we can put it into formal-methods-based tools and get the “Yes, this is good” signal. So, we can turn the crank to generate the training data.

Putting on my DARPA hat—I was the I2O director for 4 years—this is the kind of place where there’s a massive, beating signal that there’s a huge promise: we can get generative AI to be really good at formal-methods-based approaches. We can marry the best of both worlds—generative AI and formal methods—not just code getting generated, but high-quality code getting generated.

That’s a huge promise for the future. Part of why I think one of the things we really want to do is get a high-quality benchmark generated, so that we can measure the quality of code being generated from a formal methods and cybersecurity perspective. Then we can get frontier model companies racing to produce high-quality formal-methods-based code and security code—not just racing to produce code, but racing to produce really good code.

If a lot of the code in the future is going to be written by language models, can we get that code to be really, really good instead of bad code from a cybersecurity perspective or from a formal verification perspective? There’s no reason to think that if it’s going to produce code, we can’t get it to produce memory-safe code, type-safe code, and input-validated code. It’s not going to care. If we could just add the benchmarks and drive the frontier model companies to compete on that dimension, then we can get a future that is much more secure from a cyber perspective.

The threat that we started this conversation with about an hour ago—how AI is going to make the cyber threat much worse—we could tamp down that concern a lot. Byron has been working directly with some of these challenges of getting the frontier models to work better with formal methods, and he can add more details.

Byron Cook

To answer your question, I’m going to identify a hierarchy. Imagine you have a program with no loops and no recursion, but you have conditional expressions. Just asking, “Could this conditional expression—if blah, then launch the rockets—” the question of whether the rockets could be launched is an NP-complete problem.

You can put arbitrarily complicated formulae in the if expression, with thousands or millions of propositional variables; you can have integers or whatever. You can put all kinds of crazy stuff in there. And so just finding a satisfying assignment—finding a way to get into that then expression—is NP-complete. Under certain restrictions, like if you choose a language like C, for example, and we're not talking about the heap and a few other things, then it's basically the same question. It is actually the propositional satisfiability question.

That was the first question to be proved NP-complete. So that is an NP-complete question, and when you use propositional satisfiability, you're solving that problem. There has been amazing progress. I first saw this graph in a report, I think, from the HACMS project, where they showed each winner of the International Satisfiability Solving Competition compared on the same hardware and the same benchmarks. It was like, “Wow, they're getting so much better.”

And now we've had really explosive success since then because we've moved from sequential solvers to distributed solvers. There is this really amazing tool called Malibu, which runs many, many SAT solvers across the network, and then they share lemmas as they try to solve the same problem together. That's just unbelievably better. There is a scaling law very similar to transformer models: You put this in, you get this out.

That really explains why we've been so successful at Amazon, for example. It's why we can reason about your policies in your VPC networks in less than 20 seconds now, very reliably. It's because of this success in that area. So that's one piece of the hierarchy.

Now imagine you have loops. You're allowing loops or recursion, but you don't care about anything like “eventually.” You're just saying, “We can't hit this state. We can't hit this state,” like an assert that can never fail. Now you're talking about undecidable problems. To prove that the assert can't fail, you have to find something called an inductive invariant.

It's fundamental. You find this artifact, this weird thing called an inductive invariant, and then you show that it's true when you enter the loop, it's true when you go around the loop, and then you show that thing implies that the assert can't fail. That's what they call safety. It's basically property-based assert verification. That's the next level of the hierarchy.

The next one after that is termination. You say, “This loop eventually terminates.” If you use the word “eventually,” then, generally speaking—there are some side conditions about not having negations and so on—but if you're thinking about the word “eventually,” like, “If I call this API, then eventually I call this other API,” that's ultimately a termination question. To solve that, you need to find something called a ranking function.

To prove termination, you need to find a ranking function, but to prove that the ranking function is a valid one, you also have to find an inductive invariant. To prove the inductive invariant, you also have to do combinatorial reasoning.

The last level of the hierarchy is concurrency. Now we have 2 threads, or N threads, and we're trying to prove things about them. There's a technique called rely-guarantee, where you basically find environment abstractions such that you only have to prove something about each thread at a time. So there are these different levels of abstraction.

I'll now generalize. We have really amazing tools for handling that combinatorial reasoning, that first thing—the no-loops case. But for the tools we had before for reasoning about programs with loops, termination, or rely-guarantee, we had techniques, for sure, but very often the successful way to really make these things work was to just hire a human. So you have a PhD chained to their desk: “Get us our proofs,” right?

There is abstract interpretation, predicate abstraction, and various techniques, but they're limited to certain domains and so on. What's really neat about generative AI is that you can ask it to find these artifacts. You can say to generative AI, “Find me an inductive invariant, find me a ranking function, and find me rely-guarantee constraints such that this whole thing holds.”

All that now reduces just to the combinatorial reasoning, which we have really good tools for. You can iterate the combinatorial reasoning, or the checking, together with the search that the GenAI tools can do. Then you can combine that with all the techniques we had before. Because we're on the cloud, you can run all different combinations of those on different machines and then take the answer you like the most. That really changes the game.

Nathan Labenz

Have you seen examples of this that correspond to, like, move 37 in Go?

Byron Cook

The inductive invariants and ranking functions that GenAI tools find are pretty great. Let me—breaking—I realize this breaks the move 37 analogy just a little bit. Basically, to get a proof to go through requires incredible insight, so there are very few people who can find those. You're on the verge of a move 37 miracle every time you get a proof to go through. So, yeah, it's all the time.

What we're finding now is that, in Amazon, the teams that did the scaffolding for proof are now just super happy with GenAI. Now they can pair up a programmer with a generative AI tool. There's a whole methodology being developed in Amazon, and you see this in startups and so on, too, where they're changing their development methodologies to use generative AI to write the code.

The scaffolding they built around the proof provides semantic guardrails that allow them to deploy and not have to roll back very often with generative AI. They're really happy with the investment in it.

Nathan Labenz

What does the GenAI need to see about the codebase to be able to do this?

Byron Cook

There's a blog post about this from some folks in Amazon. It works better if you put all the documentation, the threat models, and everything else in the same place. That way, when the generative AI is generating the code or finding the proof, it also has the documentation, the ops plan, and everything else they've written.

If you throw that all in, it's actually better able to find the code. It sees the entire codebase, and it also has all the thinking about the codebase and all the documentation. That's really cool: It has not just the code, but also the human-level understanding of the code.

For proof search, you can ask, “How do humans do proofs?” They often read a bunch of other proofs. Then they're essentially doing matrix multiplications in their head to derive something like, “This proof looks a lot like this thing, but it's a little different. It's like this other thing. So I bet this is the inductive invariant.” They pull it out like a rabbit out of a hat, and voilà, the thing goes through.

People are really good at that, like John Harrison. He's read all the proofs. The generative AI can do that, too. You can actually pass it old proofs of programs, and it's going to be better at finding new proofs. It reads old proofs.

Nathan Labenz

Yeah, you can do that.

Byron Cook

It reads proofs of software construction and digests all of the literature about how you prove these kinds of things. Most model providers today are training their models over proofs, like in Lean, for example. So they actually understand some of those old proofs. You can also provide your code and proofs you've done into the context window.

Nathan Labenz

So do I understand the path from here? This has obviously been a huge critique of AI-generated code: It's insecure, right? We've heard that all over the place, and I think not incorrectly, at least so far.

If I am understanding correctly, the vision for getting to a world where AIs generate secure code at a much higher rate is basically that, first, we're taking advantage of a pretty familiar trick: Something might be hard to come up with the proof for, but it's easy to verify the proof, right? That's a cornerstone of this.

The AIs are presumably at least in the game now. Based on all this pretraining and other things they've learned, and all the proofs they've read, they're able to have some nonzero hit rate. You have to run your AIs, especially in the beginning, when you're just starting to spin the centrifuge. You have to run them a lot and have a high failure rate, but you get some successes.

Those successes can fold back into the training data. With that overall flywheel starting to turn, we're now getting the AIs to be quite good at the proofs. Then we can apply that proof capacity as a reward signal to the coding problem itself. Downstream, we're now rewarding the core coding objective in part based on correctness as evaluated by these proofs.

Kathleen Fisher

So we've got a sort of multi-AI, multiple roles for AI in kind of bootstrapping this thing into success. I think it's easier to help developers encode into linear temporal logic what they mean by “all data at rest is encrypted” than it is to encode the Family and Medical Leave Act. Right? It's much smaller in scope. [laughter]

Now we have these tools that are already doing what you call auto-formalization from natural language to logic, so we can deploy those tools in these domains. It makes it remarkably easier.

Nathan Labenz

Yeah. So we can envision a world over a generation or 2 of future models where, as long as this is prioritized, given what we're already seeing in terms of logical reasoning ability, mathematical ability, and coding ability, doesn't it stand to reason for you that GPT-6 and Gemini 4 should be basically superhuman in their ability to write secure code the first time? Is that where we're headed?

Kathleen Fisher

Yes, and also Nova and the open-weight models, yes. [laughter] So, yeah, I think we're there. I mean, we're seeing that right now, and there are open math conjectures—last week, there were open problems proved. We're quickly heading there already.

We need to incentivize the production of good code and not bad code, and I do think that we need to not just create the capacity for good code; we need to move away from bad code. I think that we're likely to see increasing incidences of cyberattacks that would create the motivation to get rid of the bad. I guess we need to incentivize the creation of good code, disincentivize the creation of bad code, and then incentivize the use of good code to replace the pervasive bad code in our critical infrastructure, et cetera, so that society is much less vulnerable to cyberattack than we currently are.

Nathan Labenz

And the good news is, there are tools to help you translate your code, right?

Kathleen Fisher

Right. Generative AI can help you move from one system to another, so you can upgrade your versions of your language and then enjoy the benefits of the fixes in the runtime of the new version of the language. One of the easiest things to do in formal methods is actually prove the equivalence between 2 programs, because now you have a spec. Showing that one version of the program implements the same thing as the other program is something that we can do.

Often, when you're updating, you're moving from Java to Rust, for example, so there's a little bit of work to make sure you got the semantics of Rust and Java right. Often, people use different APIs, and it's a little harder to do that mapping, but it's much easier to move between APIs and languages now than it used to be, so that's also good news for security.

Like C to Rust, DARPA has a program called TRACTOR, which is about automatically translating from C to idiomatic Rust. That's about moving from a non-memory-safe to a memory-safe language, which is about establishing and maintaining the property that memory is safe. It's the abstraction that you intended: when you stored something in memory, it stayed the way you intended it to be.

Nathan Labenz

I guess we're really hitting our stride now. I sometimes try to coin these phrases, like “the great implementation” was sort of my phrase for: we're going to unbundle jobs into tasks and get AIs to do all these tasks. We'll sort of implement AI in all these different corners of society. Here, I'm getting the sense that there's a great verification, or a great rewrite, if not full verification.

What are the next few years like? How fast do you think this needs to happen? It seems like it might need to happen pretty fast if we really want to be secure before the bad actors are using the same capabilities to break into all the critical infrastructure. What is this next period of time? How long is the period of time, and what does it look like when we need to go through, I don't know, 60 years' worth of software and fix all these holes that our feeble human minds have left us with?

Kathleen Fisher

I think that's a question of motivation more than a question of technology, right? We're seeing, with the results of the AICC cyber competition, that AI plus cyber could find and fix bugs at speed and scale. Google released the CodeMender project; OpenAI has a similar thing, right? What we've been talking about is really showing a promise that AI-enabled code generation can rewrite code at speed and scale to a much higher standard of correctness in the relatively short term.

The way AI is improving so fast, this is just going to be the worst it's ever going to be: where we are right now. And I think that the conversation we started out with—which was that AI is going to be enabling cyberattackers at all levels of skill, at all parts of the cyberattack chain—means that the level of attacks is just going to increase.

That said, the statement that cyberattacks are increasing in severity has been true for the past, I don't know, 20 years, and we've just been like the frog getting boiled. We keep getting boiled, and we haven't responded yet, so I don't know when we're going to be like, “Holy crap, we actually need to do this now.”

Right? The capabilities are there, the tools are there. When the Y2K date problem came around, society did mobilize and did go and fix those bugs, right? So there wasn't a huge problem when the year 2000 rolled around and all of the dates that were stored in 2 digits suddenly meant something completely wonky. So I don't know when we're going to be motivated enough to use these technologies. I think the technology will be there when we get serious about doing it.

Nathan Labenz

What's your sense, Byron?

Byron Cook

I think the commercial marketplace kind of drives this, right? So how much are people willing to put up with, and how much are they willing to pay for their infrastructure? I personally choose my machines and phones based on their reputation for security. Certain makers of machines and phones take it more seriously than others, and I pay a little bit of a premium for that. I would continue to do so and would advise others to do so.

I think that the cost and difficulty of these tools is dropping pretty substantially. I'm seeing that at Amazon. The teams that previously couldn't have used these tools—I mean, teams in Amazon also have different threat models than others, and so for some teams, these tools are really appropriate, and for other teams, they're a little less so. There are teams that choose not to use formal methods and some teams that do. That barrier to entry is going down, so those teams that weren't using them before are beginning to adopt them now.

I think that will continue to happen, and then there's a big commercial push. Amazon released the Kira IDE, and its big differentiator is that it's specification-driven. There are companies trying to innovate and make products, and this is a new dimension in which to innovate. If those products are successful and people flock to them because of their capabilities, then that flywheel will drive things.

So I'm actually fairly optimistic. If you look at agentic AI, it's kind of a way of saying we're doing declarative programming. If you look at AgentCore Policy, which we announced last week at re:Invent, it's a Cedar formal specification over the envelope of what you're okay with an agent doing and not doing. That gives you a new way to declaratively specify what the systems can do.

I think that society is also beginning to appreciate, through the lens of generative AI, the notion of declarative programming as opposed to imperative programming. I think that will change how programs are written and will have different threat vectors, and we'll have to figure that out as we go along. It's pretty unstable, as far as I can tell, but I think that I'm no less worried now than I was 10 years ago. I'll say it that way.

Nathan Labenz

Okay, well, [snorts] hopefully the next year will bring some progress. Okay, so I think I have maybe 3 more questions. They're all kind of substantial; hopefully, we can get all 3 of them at least partially answered.

I guess one is: how far does this go? How long does it take, and how far does it go? If we said as a society, “Okay, we're going to stop writing new software. We're going to do the great rewrite. Here's all the formal tools that we have and the language models that can help you maximize their use and rewrite stuff,” how long do you think that would take, and how far could we get?

There are, as you well know, many other approaches, including companies that are trying to create AI hackers to go find the vulnerabilities. Could we get to a world where those strategies are rendered unnecessary because we're just so confident everything is kind of buttoned up that we don't need an AI agent to go poking around to try to find vulnerabilities? That's sort of imitating the old human way of poking and clicking and finding things and then coming back and saying, “Okay, I found something. Now we can fix it.”

Could we ever get to a point where we don't need to do that anymore because the whole system broadly has become sufficiently robust, or is that too pie in the sky? Do you think we'll always kind of have to have these different angles of attack on the problem?

Kathleen Fisher

I think belt and suspenders is a fine idea.

Byron Cook

I think it doesn't hurt very much to have AI bug-finding systems poking around, but I think you could get to a place where they weren't finding things very often. We talked about how you have people, software, and hardware. I think we can get to a place where the hardware and the people are the source of almost all of the vulnerabilities in the not-too-distant future if we went all in fixing the software.

Nathan Labenz

Yeah, that's really interesting. One of the big worries, of course, with AI broadly is what happens if the AI gets out of control, without digressing into how plausible that is. I'm always on the lookout for any sort of theory that could really work, and this seems like one line of attack where you could imagine getting to a sufficiently high level of assurance that you could say, “Look, the AI isn't going to be able to hack its way out of this box because we've done this level of assurance, and we can at least take that self-exfiltration risk off the table.”

Byron Cook

So my answer is that I find every safety technology just allows us to push even harder. I think we drive faster because our cars are safer. The commercial marketplace also drives features and speed and all these kinds of things.

I remember I worked for a company that had device drivers in user space, but because some games were slower, they moved the device drivers into kernel space. So they lost the protection. Then video device drivers just weren't checking error conditions. If the operating system failed to allocate memory to you, they just didn't care because they wanted to be high-performance in the common case.

So I think there's also a balance with availability and features. The commercial marketplace has a bunch of dimensions, and they're navigating that. They're not going all in for security.

Kathleen Fisher

Yeah, I 100% agree with Byron. If you were 100% focused on sandboxing a super-aggressive AI, formal methods would have things to help with. It would help with that. That's literally the meeting I was having before this call. The frontier is virtualization, sandboxing, and policies for AI. That's where we're pushing right now: sandboxing superintelligence. That's crazy, but that's kind of where we might need to go.

Nathan Labenz

How about, in closing, let's go back to the automated reasoning checks? The most common profile of listener to this feed, as far as I can tell, is the AI engineer. If you're somebody building generative AI solutions for businesses, maybe give me a little bit more of the pitch: what kinds of problems can they solve, and what kinds of things can they take to their stakeholders and say, “Hey, if we use automated reasoning checks, we can be sure, to a certain level of confidence at least, that we're going to implement the family-leave policy correctly”?

Then I want to do one more thing on that, just to zoom out a little bit on the societal question of how you envision this existing. I think a lot of things right now, society's wheels are greased a little bit by the fact that people can go off policy a little bit. Maybe you don't quite qualify for the family leave, but we'll make it work in this case because you've been a long-tenured employee or whatever.

Byron Cook

One could argue that's because the rules often have different interpretations. We have sociotechnical mechanisms right now. For example, if you want to build an accessory dwelling unit in Portland, Oregon—a small house in your backyard—what are you going to do? You're going to file with the city, and someone is going to look at it. To be successful there, you're probably advised to get an architect, and probably an architect who works in Portland, Oregon, not Portland, Maine, because the rules are going to be different.

That feedback mechanism raises the question: how do you know that the architect really solved for the best? There are various setback rules. If the house is a certain height, it needs to be 5 feet away from the property line, but if it's this other property, you can be right up against the property line. How do you know they got that all right? How do you know they didn't maximize what you see? You're using these intermediaries through the sociotechnical mechanisms.

I think the dream of AI—and its current failure—is that it has not been able to deliver on the ability for people to democratize access to information because of incorrectness due to hallucination. No one is going to use a transformer-based language model, ask it about the city of Portland's zoning rules, and then just start digging and building a house. They're ultimately going to have a bunch of people look at it because they don't believe it; they don't trust it.

It's tantalizingly close to allowing everyone to have access to information anytime—24/7, super-fast, and super-cheap—which democratizes access to information. It's not just for rich people who can hire an architect. To do that, we need to do the last mile. We need to make the answers actually correct, and automated reasoning checks are designed to fill that gap.

It's not creative at all. It merely defines the envelope of true and untrue answers, and it uses logic to define that infinite space. Then it allows the language model to be as creative as it wants, but it's going to map it back over to logic and prove or disprove that according to the rules.

One can imagine that these rules are open-sourced or provided by the city. There could be various models—maybe they're licensed, maybe different organizations provide their rules—and you can conjoin them. There are various models that are possible, but I think it gives access to accurate information about what's true and untrue. It also gives us an ability to argue with it, to say, “It's this axiom that makes this rule unfair.”

Then you can discuss, as a society or an organization, whether we should change this rule. You could save all the past interactions, propose changing the rule, and replay those chats to see if you're going to be happy with the differences. So it gives us tools, as a society and as organizations, to appreciate what our rules are, who they impact, and to rationalize those rules.

My hope and belief is that people will now have a much nicer way of pushing back against the rules rather than just cheating.

Nathan Labenz

Well, I think it's an interesting question: where does the wiggle room come in? What are the rules where this one absolutely can't be fudged, and this one should have wiggle room? Where does the judgment get to come in? Does the large language model get to provide judgment, or is the judgment at a higher level—actually going and talking to a person? Or is there no slack or judgment?

Byron Cook

The other thing is that not all axioms are equivalent. You can do proofs under certain axioms or certain axiomatizations, and then you can add other ones that are like second-class citizens: these are the ones we'd like to avoid, but if the only way to get to that answer is to use this one, that's fine. The final one could be, “Go talk to a human.”

What does Steve say? That can be the last axiom: Steve agrees, then okay, great. That allows us to fudge things, but—

Nathan Labenz

Get-out-of-jail-free card. Yeah, interesting. I find the promise of the scalability and speed of all these things incredible. Talk about wanting to get to some sort of housing abundance: the ability to expedite so much stuff in the case that you outlined there is incredible. The fairness would presumably be dramatically improved.

And then I do wonder what new mechanisms we will also need to put in place around this. I think Europe is doing some of this stuff with a right to appeal to a human. We don't have that stuff in the US yet, but we might come to need it.

But there is also a societal marketplace. I have moved countries to get access to resources I didn't have in the other country. People move with their feet a little bit. It may be that certain countries regulate in ways that slow things down, add cost, and add latency. Other countries may regulate in a way that makes a lot of sense: it provides fairness or transparency, but also speeds things up.

Those countries will have faster growth, or they'll meet the goals of the society. Other countries will see those countries succeeding and maybe change their regulations. So I think we're all trying to figure out how to work with these tools, but there are a lot of things that can be good, and then there are risks, and we need to figure out as a society how to deal with them.

I mean, sometimes human judgment is good. It adds flexibility that clearly should be there. And other times, human judgment is bad because it adds bias.

Kathleen Fisher

Yeah, exactly. And in a way that can torch the process in a way that’s bad.

Nathan Labenz

Yeah. Yeah, definitely. No easy answers. I think that’s a constant theme of The Cognitive Revolution as a whole. The big challenge for society is that we’re learning how hard it is to figure out what truth is.

Well, that’s all I had. Do you guys want to maybe each give one closing thought or touch on anything we haven’t touched on, keeping in mind the sort of AI engineer profile? If there’s anything else you would want to impart or a call to action, or even just a pitch for the product, one more pitch for the product would be welcome, too. And we can leave it there.

Byron Cook

Yeah, so I’ll start. There’s this notion of neurosymbolic AI, which is the combination of the automated reasoning we’ve been talking quite a bit about, but also the cognitive techniques. I think much of the magic is at the intersection. How do you do inference, reasoning over nondeterministic automata at the same time?

I think it’s a peanut butter-and-chocolate moment where, if the two are combined, they really have a multiplicative effect on each other. Traditionally, there have been silos: there have been automated reasoning and formal methods nerds, and then there are the nerds who work on statistical approaches. They kind of didn’t speak the same language; they didn’t go to the same conferences.

I think what’s amazing right now is that those areas are kind of blurring back together in a way that was envisioned in the early ’50s, and it’s a pretty exciting time.

Kathleen Fisher

Yeah, I would say the same thing. Formal methods and AI are two great tastes that go better together. They have different strengths and weaknesses, right? Formal methods give you guarantees but are not very flexible and are hard to use, and AI is very flexible and easy to use but often not trustworthy.

So, if we can figure out how to put them together, you can get the best of both worlds. DARPA’s I2O has a number of programs that are exploring different combinations of using those technologies to get exactly that—the best of both worlds. I mean, there are lots of different ways of combining them, and the magic is in exactly what combination, in what circumstance, to get exactly that: the chocolate and peanut butter.

Nathan Labenz

Yeah, love it. That’s an inspiring vision. I really like it. I’ve got a lot more to learn, as you guys can tell from my baseline coming into this conversation, but I really appreciate you both for taking the time to educate me and all of us. Kathleen Fisher, Byron Cook, thank you for being part of The Cognitive Revolution.

Kathleen Fisher

Thank you.