The recent surge in artificial intelligence (AI), characterized by the prominence of large language models (LLMs), has ushered in fundamental transformations across the globe. However, alongside these advancements, concerns surrounding the legitimacy of LLMs have grown, posing legal challenges to their extensive applications. Compounding these concerns, the parameters of LLMs are often treated as intellectual property, restricting direct investigations. In this study, we address a fundamental challenge within the realm of AI legislation: the need to establish the authenticity of outputs generated by LLMs. To tackle this issue, we present zkLLM, which stands as the inaugural specialized zero-knowledge proof tailored for LLMs to the best of our knowledge. Addressing the persistent challenge of non-arithmetic operations in deep learning, we introduce tlookup, a parallelized lookup argument designed for non-arithmetic tensor operations in deep learning, offering a solution with no asymptotic overhead. Furthermore, leveraging the foundation of tlookup, we introduce zkAttn, a specialized zero-knowledge proof crafted for the attention mechanism, carefully balancing considerations of running time, memory usage, and accuracy. Empowered by our fully parallelized CUDA implementation, zkLLM emerges as a significant stride towards achieving efficient zero-knowledge verifiable computations over LLMs. Remarkably, for LLMs boasting 13 billion parameters, our approach enables the generation of a correctness proof for the entire inference process in under 15 minutes. The resulting proof, compactly sized at less than 200 kB, is designed to uphold the privacy of the model parameters, ensuring no inadvertent information leakage.
翻译:近年来,以大型语言模型(LLM)为显著特征的人工智能(AI)浪潮,已在全球范围内引发根本性变革。然而伴随这些进步,围绕LLM合法性的担忧日益加剧,为其广泛部署带来了法律挑战。更复杂的是,LLM的参数常被视为知识产权而限制直接检验。本研究聚焦于AI立法领域的根本挑战——验证LLM生成输出的真实性。为此,我们提出zkLLM,据我们所知这是首个专门为LLM定制的零知识证明方案。针对深度学习中长期存在的非算术运算难题,我们引入tlookup——一种专为深度学习非算术张量运算设计的并行化查找参数,能在不产生渐近开销的前提下提供解决方案。在此基础上,我们进一步提出zkAttn,一种专为注意力机制设计的零知识证明,在运行时间、内存占用和精确性之间实现精心平衡。借助完全并行化的CUDA实现,zkLLM成为实现LLM高效零知识可验证计算的重要里程碑。值得注意的是,对于拥有130亿参数的LLM,我们的方法能在15分钟内完成完整推理过程正确性证明的生成。最终生成的证明体积紧凑(小于200 kB),且能确保模型参数隐私,杜绝意外信息泄露。