Sutra is a typed, purely functional programming language whose compiled forward pass is a PyTorch neural network. The compiler beta-reduces the whole program -- primitives, control flow, string I/O -- to one fused tensor-op graph over a frozen embedding substrate. Rotation binding, unbind, bundle, polynomial Kleene three-valued logic, and tail-recursive loops all lower to tensor operations; the Kleene connectives are Lagrange-interpolated polynomials exact on the {-1, 0, +1} truth grid. Validation is one fact tested two ways. (1) The same program runs on four frozen embeddings spanning two modalities -- three text encoders (nomic-embed-text, all-minilm, mxbai-embed-large) and one protein language model (ESM-2) -- and decodes bundles at 100% accuracy through width k=8 on every substrate, where the textbook Hadamard product has already collapsed (2.5% on mxbai-embed-large, 7.5% on all-minilm). (2) PyTorch autograd flows through the actually compiled graph: a fuzzy-rule classifier written in .su trains from random init (18.7 +/- 9.5%; chance = 20%, five classes) to 100.0 +/- 0.0% (three seeds) by backpropagating through the emitted graph, the symbolic source unmodified. A weighted variant additionally trains a scalar cosine gain and writes it back into the .su source as a numeric literal; recompiling reproduces the trained behaviour to ~2e-7 per logit, so the trained model is itself legible, recompilable code. The same artifact is therefore both a logic program and a trainable neural network.


翻译:摘要:Sutra是一种带类型的纯函数式编程语言,其编译后的前向传播过程是一个PyTorch神经网络。编译器将整个程序(包括原语、控制流、字符串I/O)通过β规约归约为一个在冻结嵌入基座上的融合张量操作图。旋转变换、解绑、捆绑、多项式Kleene三值逻辑以及尾递归循环均被降级为张量操作;其中Kleene联结词通过拉格朗日插值多项式精确适配{-1,0,+1}真值网格。验证采用同一事实的两种测试方式:(1) 同一程序在横跨两种模态的四种冻结嵌入上运行——三个文本编码器(nomic-embed-text、all-minilm、mxbai-embed-large)和一个蛋白质语言模型(ESM-2)——并在宽度k=8的所有基座上以100%准确率解码捆绑结果,而教科书级哈达玛积已在mxbai-embed-large(2.5%)和all-minilm(7.5%)上失效;(2) PyTorch自动微分通过实际编译的计算图流动:一个用.su编写的模糊规则分类器从随机初始化(18.7±9.5%;随机概率20%,五分类)通过反向传播生成的计算图训练至100.0±0.0%(三个随机种子),符号源代码保持不变。加权变体额外训练标量余弦增益,并将其作为数值常量写回.su源文件;重新编译后训练行为复现精度达每个logit约2e-7,因此训练后的模型本身就是可读、可重编译的代码。同一制品既是一个逻辑程序,又是一个可训练的神经网络。

0
下载
关闭预览

相关内容

【NeurIPS2025】大型语言模型中关系解码线性算子的结构
专知会员服务
10+阅读 · 2025年11月2日
Transformer它就是个支持向量机
专知会员服务
38+阅读 · 2023年9月7日
华为等发布《视觉Transformer转换器》综述论文,21页pdf
专知会员服务
86+阅读 · 2020年12月25日
综述:基于GAN的图像翻译模型盘点
GAN生成式对抗网络
21+阅读 · 2019年9月2日
面试题:请简要介绍下tensorflow的计算图
七月在线实验室
14+阅读 · 2019年6月10日
SNN,像你的大脑一样工作
中国科学院自动化研究所
80+阅读 · 2018年11月7日
用PyTorch实现各种GANs(附论文和代码地址)
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
《无人地面战车(UGV)的崛起》报告
专知会员服务
5+阅读 · 7月16日
美陆军任务式指挥人工智能解决方案
专知会员服务
7+阅读 · 7月16日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员