Nerve: Technical Reference Manual — A Zero-Dependency Single-Header Multilayer Perceptron Library for ANSI C

I present Nerve, a lightweight, zero-dependency multilayer perceptron (MLP) library implemented in pure ANSI C as a single, self-contained header file. Designed for seamless integration, the library can be embedded into any C or C++ project simply by including a single file. Nerve implements the complete supervised learning pipeline, including forward propagation, backpropagation, and mean-squared-error (MSE) loss calculation. It features two first-order optimizers—stochastic gradient descent (SGD) with momentum and the Adam adaptive moment estimator (Kingma & Ba, 2015)—alongside Xavier/Glorot and He weight initialization methods. To prevent overfitting and enhance generalization, the library incorporates four core activation functions (logistic sigmoid, hyperbolic tangent, ReLU, and Leaky ReLU), L2 weight decay, and inverted dropout regularization. Furthermore, a high-level 'Easy API' enables rapid network configuration via a simple topology string (e.g., "2->8->1") and streamlined, single-call training. Experimental evaluations on canonical benchmarks demonstrate that Adam accelerates convergence by up to 18.7× relative to vanilla SGD on a four-class identity problem. Additionally, Nerve achieves a 96.7% test accuracy on the Iris dataset, and resolves a non-linearly separable three-class spiral benchmark with 98.3% accuracy using a 2-32-32-3 architecture. The library is open-source and released under the GNU General Public License v3.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-05-28
DOI
https://doi.org/10.5281/zenodo.20432307
Primary Topic
Advanced Neural Network Applications
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Nerve: Technical Reference Manual — A Zero-Dependency Single-Header Multilayer Perceptron Library for ANSI C

Fatih Küçükkarakurt
Zenodo (CERN European Organization for Nuclear Research)
Advanced Neural Network Applications
article

Nerve: Technical Reference Manual — A Zero-Dependency Single-Header Multilayer Perceptron Library for ANSI C

Fatih Küçükkarakurt
article en

Abstract

I present Nerve, a lightweight, zero-dependency multilayer perceptron (MLP) library implemented in pure ANSI C as a single, self-contained header file. Designed for seamless integration, the library can be embedded into any C or C++ project simply by including a single file. Nerve implements the complete supervised learning pipeline, including forward propagation, backpropagation, and mean-squared-error (MSE) loss calculation. It features two first-order optimizers—stochastic gradient descent (SGD) with momentum and the Adam adaptive moment estimator (Kingma & Ba, 2015)—alongside Xavier/Glorot and He weight initialization methods. To prevent overfitting and enhance generalization, the library incorporates four core activation functions (logistic sigmoid, hyperbolic tangent, ReLU, and Leaky ReLU), L2 weight decay, and inverted dropout regularization. Furthermore, a high-level 'Easy API' enables rapid network configuration via a simple topology string (e.g., "2->8->1") and streamlined, single-call training. Experimental evaluations on canonical benchmarks demonstrate that Adam accelerates convergence by up to 18.7× relative to vanilla SGD on a four-class identity problem. Additionally, Nerve achieves a 96.7% test accuracy on the Iris dataset, and resolves a non-linearly separable three-class spiral benchmark with 98.3% accuracy using a 2-32-32-3 architecture. The library is open-source and released under the GNU General Public License v3.

Zenodo (CERN European Organization for Nuclear Research)
Izmir Kâtip Çelebi University (TR)
Openalex Percentile: Top 5%
Advanced Neural Network Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.