arXiv:2607.16682cs.LGcs.AI2026-07

从零实现神经网络,帮助理解模型内部机制。

Building a Neural Network from Scratch: Implementation, Evaluation, and Optimization

论文配图:Building a Neural Network from Scratch: Implementation, Evaluation, and Optimization
图 1 · 摘自论文原文
  • 纯手工实现神经网络,无自动微分和预构建模块。
  • 在多分类任务中表现稳定,验证了正确性与泛化能力。
  • 适合教学与研究,结构清晰可扩展。

深度学习框架的普及虽加速了模型开发,却逐渐掩盖了神经网络的内部机制,导致实践与基础理解之间出现鸿沟。为此,本文提出一个完全从零实现的神经网络框架,不依赖自动微分或预构建深度学习模块。该实现包含多层架构、多种激活函数、正则化技术及前沿优化器。作为教学工具,它揭示了前向传播、反向传播、梯度动态与优化路径的原理;在多分类任务中,框架展现出稳健性能,验证了其正确性、数值稳定性与跨配置的泛化能力。其可扩展的设计与清晰的模块化结构,使其成为教育与未来研究的可靠基准。

原文摘要 · Abstract (English)

The widespread adoption of high-level deep learning libraries, while accelerating model development, has increasingly abstracted away the internal mechanics of neural networks, creating a gap between practical usage and fundamental understanding. To address this, the paper presents a self-contained neural network framework implemented entirely from scratch -- without relying on automatic differentiation or pre-built deep learning modules. The implementation encompasses all essential components, including multi-layer architectures, diverse activation functions, regularization techniques, and state-of-the-art optimizers. Beyond serving as a pedagogical instrument that demystifies forward/backward propagation, gradient dynamics, and optimization landscapes, the framework demonstrates robust performance when applied to a multi-class classification task, successfully validating its correctness, numerical stability, and generalization across varied configurations. The extensible design and clean modularity further position it as a reliable baseline for educational purposes and future research exploration.

神经网络从零实现教学工具可解释性

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