Bridging cultures that have often been distant, Julia combines expertise from the diverse fields of computer science and computational science to create a new approach to numerical computing. Julia is designed to be easy and fast. Julia questions notions generally held as "laws of nature" by practitioners of numerical computing:1. High-level dynamic programs have to be slow, 2. One must prototype in one language and then rewrite in another language for speed or deployment, and 3. There are parts of a system for the programmer, and other parts best left untouched as they are built by the experts.We introduce the Julia programming language and its design -a dance between specialization and abstraction. Specialization allows for custom treatment. Multiple dispatch, a technique from computer science, picks the right algorithm for the right circumstance. Abstraction, what good computation is really about, recognizes what remains the same after differences are stripped away. Abstractions in mathematics are captured as code through another technique from computer science, generic programming.Julia shows that one can have machine performance without sacrificing human convenience.
translated by 谷歌翻译
一般矩阵乘法或GEMM内核在高性能计算和机器学习中占据中心位置。最近的NVIDIA GPU包括Gemm加速器,如Nvidia的张量核心。他们的剥削受到双语言问题的阻碍:它需要低级编程,这意味着低程序员的工作效率或使用只提供有限组件集的库。由于建立的组件方面的REPRASING算法经常引入开销,因此图书馆缺乏灵活性限制了探索新算法的自由。因此,使用GEMMS的研究人员无法立即享受编程生产力,高性能和研究灵活性。在本文中,我们解决了这个问题。我们在科学朱莉娅编程语言中展示了三组抽象和接口来编程宝石。界面和抽象共同设计用于研究人员的需求和朱莉娅的特征,以实现足够的担忧和灵活性的充分分离,以便在不支付性能价格的情况下轻松地扩展基本宝石。将我们的Gemms与最先进的图书馆Cublas和Cutlass进行比较,我们证明我们的性能在图书馆的相同球场中,并且在某些情况下甚至超过它,而无需在CUDA C ++中编写单行代码或者组装,而不面临灵活限制。
translated by 谷歌翻译
Alphazero,Leela Chess Zero和Stockfish Nnue革新了计算机国际象棋。本书对此类引擎的技术内部工作进行了完整的介绍。该书分为四个主要章节 - 不包括第1章(简介)和第6章(结论):第2章引入神经网络,涵盖了所有用于构建深层网络的基本构建块,例如Alphazero使用的网络。内容包括感知器,后传播和梯度下降,分类,回归,多层感知器,矢量化技术,卷积网络,挤压网络,挤压和激发网络,完全连接的网络,批处理归一化和横向归一化和跨性线性单位,残留层,剩余层,过度效果和底漆。第3章介绍了用于国际象棋发动机以及Alphazero使用的经典搜索技术。内容包括minimax,alpha-beta搜索和蒙特卡洛树搜索。第4章展示了现代国际象棋发动机的设计。除了开创性的Alphago,Alphago Zero和Alphazero我们涵盖Leela Chess Zero,Fat Fritz,Fat Fritz 2以及有效更新的神经网络(NNUE)以及MAIA。第5章是关于实施微型α。 Shexapawn是国际象棋的简约版本,被用作为此的示例。 Minimax搜索可以解决六ap峰,并产生了监督学习的培训位置。然后,作为比较,实施了类似Alphazero的训练回路,其中通过自我游戏进行训练与强化学习结合在一起。最后,比较了类似α的培训和监督培训。
translated by 谷歌翻译
Array programming provides a powerful, compact, expressive syntax for accessing, manipulating, and operating on data in vectors, matrices, and higher-dimensional arrays [1]. NumPy is the primary array programming library for the Python language [2,3,4,5]. It plays an essential role in research analysis pipelines in fields as diverse as physics, chemistry, astronomy, geoscience, biology, psychology, material science, engineering, finance, and economics. For example, in astronomy, NumPy was an important part of the software stack used in the discovery of gravitational waves [6] and the first imaging of a black hole [7].Here we show how a few fundamental array concepts lead to a simple and powerful programming paradigm for organizing, exploring, and analyzing scientific data. NumPy is the foundation upon which the entire scientific Python universe is constructed. It is so pervasive that several projects, targeting audiences with specialized needs, have developed their own NumPy-like interfaces and array objects. Because of its central position in the ecosystem, NumPy increasingly plays the role of an interoperability layer between these new array computation libraries.
translated by 谷歌翻译
即使机器学习算法已经在数据科学中发挥了重要作用,但许多当前方法对输入数据提出了不现实的假设。由于不兼容的数据格式,或数据集中的异质,分层或完全缺少的数据片段,因此很难应用此类方法。作为解决方案,我们提出了一个用于样本表示,模型定义和培训的多功能,统一的框架,称为“ Hmill”。我们深入审查框架构建和扩展的机器学习的多个范围范式。从理论上讲,为HMILL的关键组件的设计合理,我们将通用近似定理的扩展显示到框架中实现的模型所实现的所有功能的集合。本文还包含有关我们实施中技术和绩效改进的详细讨论,该讨论将在MIT许可下发布供下载。该框架的主要资产是其灵活性,它可以通过相同的工具对不同的现实世界数据源进行建模。除了单独观察到每个对象的一组属性的标准设置外,我们解释了如何在框架中实现表示整个对象系统的图表中的消息推断。为了支持我们的主张,我们使用框架解决了网络安全域的三个不同问题。第一种用例涉及来自原始网络观察结果的IoT设备识别。在第二个问题中,我们研究了如何使用以有向图表示的操作系统的快照可以对恶意二进制文件进行分类。最后提供的示例是通过网络中实体之间建模域黑名单扩展的任务。在所有三个问题中,基于建议的框架的解决方案可实现与专业方法相当的性能。
translated by 谷歌翻译
大型语言模型,例如OpenAI的法典和DeepMind的字母,可以生成代码来解决以自然语言表达的各种问题。这项技术已经在至少一项广泛使用的编程编辑器扩展程序中进行了商业化:Github Copilot。在本文中,我们探讨了具有大型语言模型(LLM辅助编程)的编程与程序员协助的先前概念化相似,并且与众不同。我们借鉴了公开可用的经验报告,有关LLM辅助编程以及先前的可用性和设计研究。我们发现,尽管LLM辅助编程通过搜索和重用分享了一些编译,配对编程和编程的属性,但技术可能性和实践经验都存在根本差异。因此,应该将LLM辅助编程视为具有自己独特的属性和挑战的新方法。最后,我们借鉴了用户研究的观察结果,在该观察中,非专家最终用户程序员使用LLM辅助工具来求解电子表格中的数据任务。我们讨论可能出现的问题,并在将大型语言模型应用于最终用户编程时,尤其是对于几乎没有编程专业知识的用户。
translated by 谷歌翻译
在过去十年中,已经开发出新的深度学习(DL)算法,工作负载和硬件来解决各种问题。尽管工作量和硬件生态系统的进步,DL系统的编程方法是停滞不前的。 DL工作负载从DL库中的高度优化,特定于平台和不灵活的内核,或者在新颖的操作员的情况下,通过具有强大性能的DL框架基元建立参考实现。这项工作介绍了Tensor加工基元(TPP),一个编程抽象,用于高效的DL工作负载的高效,便携式实现。 TPPS定义了一组紧凑而多才多艺的2D张镜操作员(或虚拟张量ISA),随后可以用作构建块,以在高维张量上构建复杂的运算符。 TPP规范是平台 - 不可行的,因此通过TPPS表示的代码是便携式的,而TPP实现是高度优化的,并且特定于平台。我们展示了我们使用独立内核和端到端DL&HPC工作负载完全通过TPPS表达的方法的效力和生存性,这在多个平台上优于最先进的实现。
translated by 谷歌翻译
本文介绍了正向和反向模式的校正和高效自动分化的校正和高效自动化。自动差异是获得数值节目梯度的方法,这对于优化,不确定量化和机器学习至关重要。计算渐变的计算成本是实践中的常见瓶颈。对于使用OpenMP为多核CPU或GPU并行化的应用程序,还希望并行计算渐变。我们提出了一个框架,原因是生成的衍生代码的正确性,我们向差异化模型证明了我们的OpenMP扩展。我们在自动差异化工具磁带上实施此模型,并在我们的扩展差异化过程之后差异化的目前的测试用例。生成的衍生程序的性能在前进和反向模式优于顺序,尽管我们的反向模式通常比输入程序更差。
translated by 谷歌翻译
Automatic differentiation (AD) is a technique for computing the derivative of a function represented by a program. This technique is considered as the de-facto standard for computing the differentiation in many machine learning and optimisation software tools. Despite the practicality of this technique, the performance of the differentiated programs, especially for functional languages and in the presence of vectors, is suboptimal. We present an AD system for a higher-order functional array-processing language. The core functional language underlying this system simultaneously supports both source-to-source forward-mode AD and global optimisations such as loop transformations. In combination, gradient computation with forward-mode AD can be as efficient as reverse mode, and the Jacobian matrices required for numerical algorithms such as Gauss-Newton and Levenberg-Marquardt can be efficiently computed.
translated by 谷歌翻译
我们介绍了Netket的版本3,机器学习工具箱适用于许多身体量子物理学。Netket围绕神经网络量子状态构建,并为其评估和优化提供有效的算法。这个新版本是基于JAX的顶部,一个用于Python编程语言的可差分编程和加速的线性代数框架。最重要的新功能是使用机器学习框架的简明符号来定义纯Python代码中的任意神经网络ANS \“凝固的可能性,这允许立即编译以及渐变的隐式生成自动化。Netket 3还带来了GPU和TPU加速器的支持,对离散对称组的高级支持,块以缩放多程度的自由度,Quantum动态应用程序的驱动程序,以及改进的模块化,允许用户仅使用部分工具箱是他们自己代码的基础。
translated by 谷歌翻译
Derivatives, mostly in the form of gradients and Hessians, are ubiquitous in machine learning. Automatic differentiation (AD), also called algorithmic differentiation or simply "autodiff", is a family of techniques similar to but more general than backpropagation for efficiently and accurately evaluating derivatives of numeric functions expressed as computer programs. AD is a small but established field with applications in areas including computational fluid dynamics, atmospheric sciences, and engineering design optimization. Until very recently, the fields of machine learning and AD have largely been unaware of each other and, in some cases, have independently discovered each other's results. Despite its relevance, general-purpose AD has been missing from the machine learning toolbox, a situation slowly changing with its ongoing adoption under the names "dynamic computational graphs" and "differentiable programming". We survey the intersection of AD and machine learning, cover applications where AD has direct relevance, and address the main implementation techniques. By precisely defining the main differentiation techniques and their interrelationships, we aim to bring clarity to the usage of the terms "autodiff", "automatic differentiation", and "symbolic differentiation" as these are encountered more and more in machine learning settings.
translated by 谷歌翻译
培训和测试监督对象检测模型需要大量带有地面真相标签的图像。标签定义图像中的对象类及其位置,形状以及可能的其他信息,例如姿势。即使存在人力,标签过程也非常耗时。我们引入了一个新的标签工具,用于2D图像以及3D三角网格:3D标记工具(3DLT)。这是一个独立的,功能丰富和跨平台软件,不需要安装,并且可以在Windows,MacOS和基于Linux的发行版上运行。我们不再像当前工具那样在每个图像上分别标记相同的对象,而是使用深度信息从上述图像重建三角形网格,并仅在上述网格上标记一次对象。我们使用注册来简化3D标记,离群值检测来改进2D边界框的计算和表面重建,以将标记可能性扩展到大点云。我们的工具经过最先进的方法测试,并且在保持准确性和易用性的同时,它极大地超过了它们。
translated by 谷歌翻译
自主机器人结合了各种技能,形成越来越复杂的行为,称为任务。尽管这些技能通常以相对较低的抽象级别进行编程,但它们的协调是建筑分离的,并且经常以高级语言或框架表达。几十年来,州机器一直是首选的语言,但是最近,行为树的语言在机器人主义者中引起了人们的关注。行为树最初是为计算机游戏设计的,用于建模自主参与者,提供了基于树木的可扩展的使命表示,并受到支持支持模块化设计和代码的重复使用。但是,尽管使用了该语言的几种实现,但对现实世界中的用法和范围知之甚少。行为树提供的概念与传统语言(例如州机器)有何关系?应用程序中如何使用行为树和状态机概念?我们介绍了对行为树中关键语言概念的研究及其在现实世界机器人应用中的使用。我们识别行为树语言,并将其语义与机器人技术中最著名的行为建模语言进行比较。我们为使用这些语言的机器人应用程序挖掘开源存储库并分析此用法。我们发现两种行为建模语言在语言设计及其在开源项目中的用法之间的相似性方面,以满足机器人域的需求。我们为现实世界行为模型的数据集提供了贡献,希望激发社区使用和进一步开发这种语言,相关的工具和分析技术。
translated by 谷歌翻译
Low-rank matrix approximations, such as the truncated singular value decomposition and the rank-revealing QR decomposition, play a central role in data analysis and scientific computing. This work surveys and extends recent research which demonstrates that randomization offers a powerful tool for performing low-rank matrix approximation. These techniques exploit modern computational architectures more fully than classical methods and open the possibility of dealing with truly massive data sets.This paper presents a modular framework for constructing randomized algorithms that compute partial matrix decompositions. These methods use random sampling to identify a subspace that captures most of the action of a matrix. The input matrix is then compressed-either explicitly or implicitly-to this subspace, and the reduced matrix is manipulated deterministically to obtain the desired low-rank factorization. In many cases, this approach beats its classical competitors in terms of accuracy, speed, and robustness. These claims are supported by extensive numerical experiments and a detailed error analysis.The specific benefits of randomized techniques depend on the computational environment. Consider the model problem of finding the k dominant components of the singular value decomposition of an m × n matrix. (i) For a dense input matrix, randomized algorithms require O(mn log(k)) floating-point operations (flops) in contrast with O(mnk) for classical algorithms. (ii) For a sparse input matrix, the flop count matches classical Krylov subspace methods, but the randomized approach is more robust and can easily be reorganized to exploit multi-processor architectures. (iii) For a matrix that is too large to fit in fast memory, the randomized techniques require only a constant number of passes over the data, as opposed to O(k) passes for classical algorithms. In fact, it is sometimes possible to perform matrix approximation with a single pass over the data.
translated by 谷歌翻译
这本数字本书包含在物理模拟的背景下与深度学习相关的一切实际和全面的一切。尽可能多,所有主题都带有Jupyter笔记本的形式的动手代码示例,以便快速入门。除了标准的受监督学习的数据中,我们将看看物理丢失约束,更紧密耦合的学习算法,具有可微分的模拟,以及加强学习和不确定性建模。我们生活在令人兴奋的时期:这些方法具有从根本上改变计算机模拟可以实现的巨大潜力。
translated by 谷歌翻译
我们介绍了一种称为编程拼图的新型编程挑战,作为方案合成的客观和全面评估,并释放Python编程拼图的开源数据集(P3)。每个拼图由短Python程序$ F $定义,目标是找到一个使$ F $返回true的输入。谜题是目的,因为每个人都由其验证者$ F $的源代码完全指定,因此评估为测试候选解决方案所需的$ F $。它们不需要答案密钥或输入/输出示例,也不依赖于自然语言理解。该数据集是全面的,因为它跨越一系列困难和域的问题,从琐碎的字符串操纵问题,经典编程谜题(例如,河内塔),用于采访/竞争编程问题(例如,动态编程),在算法和数学中的长期开放问题(例如,因子)。我们开发基准枚举程序合成,GPT-3和能够解决难题的食盒求解器 - 即使没有访问任何参考解决方案 - 通过从他们自己的过去的解决方案中学习。 Codex表现最佳,解决高达18%的397个测试问题的测试问题,每次尝试和80%的问题占1,000个问题。在一个小的用户学习中,我们发现拼图解决性能和编码体验之间的正相关性,以及人类和AI求解器的难题难度之间。因此,P3的进一步改进可能对许多程序合成区域产生重大影响。
translated by 谷歌翻译
scikit-learn is an increasingly popular machine learning library. Written in Python, it is designed to be simple and efficient, accessible to non-experts, and reusable in various contexts. In this paper, we present and discuss our design choices for the application programming interface (API) of the project. In particular, we describe the simple and elegant interface shared by all learning and processing units in the library and then discuss its advantages in terms of composition and reusability. The paper also comments on implementation details specific to the Python ecosystem and analyzes obstacles faced by users and developers of the library.
translated by 谷歌翻译
行为树(BT)是一种在自主代理中(例如机器人或计算机游戏中的虚拟实体)之间在不同任务之间进行切换的方法。 BT是创建模块化和反应性的复杂系统的一种非常有效的方法。这些属性在许多应用中至关重要,这导致BT从计算机游戏编程到AI和机器人技术的许多分支。在本书中,我们将首先对BTS进行介绍,然后我们描述BTS与早期切换结构的关系,并且在许多情况下如何概括。然后,这些想法被用作一套高效且易于使用的设计原理的基础。安全性,鲁棒性和效率等属性对于自主系统很重要,我们描述了一套使用BTS的状态空间描述正式分析这些系统的工具。借助新的分析工具,我们可以对BTS如何推广早期方法的形式形式化。我们还显示了BTS在自动化计划和机器学习中的使用。最后,我们描述了一组扩展的工具,以捕获随机BT的行为,其中动作的结果由概率描述。这些工具可以计算成功概率和完成时间。
translated by 谷歌翻译
Deep learning frameworks have often focused on either usability or speed, but not both. PyTorch is a machine learning library that shows that these two goals are in fact compatible: it provides an imperative and Pythonic programming style that supports code as a model, makes debugging easy and is consistent with other popular scientific computing libraries, while remaining efficient and supporting hardware accelerators such as GPUs. In this paper, we detail the principles that drove the implementation of PyTorch and how they are reflected in its architecture. We emphasize that every aspect of PyTorch is a regular Python program under the full control of its user. We also explain how the careful and pragmatic implementation of the key components of its runtime enables them to work together to achieve compelling performance. We demonstrate the efficiency of individual subsystems, as well as the overall speed of PyTorch on several common benchmarks.
translated by 谷歌翻译
回答集编程(ASP)已成为一种流行的和相当复杂的声明问题解决方法。这是由于其具有吸引力的地址解决方案的工作流程,这是可以轻松解决问题解决的方法,即使对于计算机科学外的守护者而言。与此不同,底层技术的高度复杂性使得ASP专家越来越难以将想法付诸实践。有关解决此问题,本教程旨在使用户能够构建自己的基于ASP的系统。更确切地说,我们展示了ASP系统Clingo如何用于扩展ASP和实现定制的专用系统。为此,我们提出了两个替代方案。我们从传统的AI技术开始,并展示元编程如何用于扩展ASP。这是一种相当轻的方法,依赖于Clingo的reation特征来使用ASP本身表达新功能。与此不同,本教程的主要部分使用传统的编程(在Python中)来通过其应用程序编程接口操纵Clingo。这种方法允许改变和控制ASP的整个模型 - 地面解决工作流程。 COMENT of Clingo的新应用程序课程使我们能够通过自定义类似于Clingo中的进程来绘制Clingo的基础架构。例如,我们可能会互动到程序的抽象语法树,控制各种形式的多射击求解,并为外国推论设置理论传播者。另一种横截面结构,跨越元以及应用程序编程是Clingo的中间格式,即指定底层接地器和求解器之间的界面。我们通过示例和几个非琐碎的案例研究说明了本教程的前述概念和技术。
translated by 谷歌翻译