arXiv:2410.09206cs.NEcs.AI2024-10被引 5

构建可自组织的预测编码神经网络库,支持高效生物启发式推理。

pyhgf: A neural network library for predictive coding

  • 用JAX和Rust实现透明可调的预测编码网络模块
  • 支持结构自适应,能从意外输入中学习因果关系
  • 适合研究生物启发式智能与自组织学习的开发者

贝叶斯认知模型在计算神经科学和精神病学中获得广泛关注,未来有望拓展至人工智能领域,为具身、自适应且节能的自主代理提供通用推断框架。其中核心理论是预测编码,认为学习与行为由对感官输入原因的分层概率推断驱动。生物真实性要求此类网络依赖于简单局部计算,如精度加权的预测与预测误差。这虽使系统高效,但软件实现面临独特挑战:标准神经网络库的编译与反向传播后端常将优化算法与被优化系统分离,违背自监控、自组织、细胞生长与功能可塑等生物原则。本文提出\texttt{pyhgf}:一个基于JAX和Rust的Python库,用于创建、操作与采样动态预测编码网络。通过将网络组件封装为消息传递中的透明、模块化与可塑变量,实现任意复杂度的信念传播。其核心变量的透明性使推断过程可体现自组织原则,从而自然表达结构学习、元学习或因果发现等高级认知功能。代码、教程与文档见:https://github.com/ilabcode/pyhgf。

原文摘要 · Abstract (English)

Bayesian models of cognition have gained considerable traction in computational neuroscience and psychiatry. Their scopes are now expected to expand rapidly to artificial intelligence, providing general inference frameworks to support embodied, adaptable, and energy-efficient autonomous agents. A central theory in this domain is predictive coding, which posits that learning and behaviour are driven by hierarchical probabilistic inferences about the causes of sensory inputs. Biological realism constrains these networks to rely on simple local computations in the form of precision-weighted predictions and prediction errors. This can make this framework highly efficient, but its implementation comes with unique challenges on the software development side. Embedding such models in standard neural network libraries often becomes limiting, as these libraries' compilation and differentiation backends can force a conceptual separation between optimization algorithms and the systems being optimized. This critically departs from other biological principles such as self-monitoring, self-organisation, cellular growth and functional plasticity. In this paper, we introduce \texttt{pyhgf}: a Python package backed by JAX and Rust for creating, manipulating and sampling dynamic networks for predictive coding. We improve over other frameworks by enclosing the network components as transparent, modular and malleable variables in the message-passing steps. The resulting graphs can implement arbitrary computational complexities as beliefs propagation. But the transparency of core variables can also translate into inference processes that leverage self-organisation principles, and express structure learning, meta-learning or causal discovery as the consequence of network structural adaptation to surprising inputs. The code, tutorials and documentation are hosted at: https://github.com/ilabcode/pyhgf.

预测编码神经网络自组织

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。