Reverse Engineering Apple's ANE: Open-Source Project Enables On-Device Training on the Neural Engine

An open-source project reverse engineers Apple's private APIs to unlock neural network training on the ANE.
The maderix/ANE open-source project has garnered massive attention by reverse engineering Apple's private APIs to enable neural network training directly on the Apple Neural Engine—hardware previously restricted to inference only. While the project demonstrates remarkable technical potential for on-device learning, federated learning, and privacy-preserving AI, its reliance on undocumented APIs raises significant stability and App Store compliance concerns, positioning it primarily as a research tool rather than a production solution.
A Bold Open-Source Attempt
Since its debut with the A11 chip in 2017, the Apple Neural Engine (ANE) has been a critical hardware module dedicated to accelerating machine learning tasks on Apple devices. The ANE is an Application-Specific Integrated Circuit (ASIC) designed specifically for core neural network operations like matrix multiplication and convolution. From the A11 chip's 2 cores delivering 600 billion operations per second, to the M4 chip's 16 cores achieving 38 trillion operations per second (38 TOPS), ANE's computational power has grown at a staggering pace. Unlike general-purpose GPUs, the ANE achieves massive tensor computations at extremely low power consumption through hardware-level dataflow optimization and quantization acceleration. Internally, it uses custom data formats and memory layouts—one of the reasons external developers find it difficult to bypass official frameworks and access it directly.
However, Apple has long imposed strict restrictions on ANE access—developers can only use it indirectly through Core ML, a high-level framework, and only for inference, with no ability to perform model training directly. Core ML, introduced at WWDC 2017, serves as an abstraction layer between developers and the underlying hardware. It automatically dispatches trained models (.mlmodel format) to the optimal hardware (CPU, GPU, or ANE) for inference and supports model conversion from frameworks like TensorFlow and PyTorch. But its design philosophy has always been "train in the cloud, infer on the device." While iOS 16 introduced limited on-device model update capabilities (via MLUpdateTask), this only supports fine-tuning a small number of layers—far from full training capability.
Recently, an open-source project on GitHub called maderix/ANE has shattered this barrier. By reverse engineering Apple's private APIs, the project enables training neural networks directly on the Apple Neural Engine. Written in Objective-C, it quickly amassed over 7,000 stars and 955 forks, with single-day star growth reaching the 13,000-level—a clear indication of the intense interest it has sparked in the developer community.

Why On-Device ANE Training Matters
Breaking Through Inference Limitations to Achieve a Complete Training Loop
Traditionally, the ANE has been positioned as an inference accelerator. Apple has never officially provided the ability to perform backpropagation and gradient computation on the ANE. Backpropagation is the core algorithm of neural network training—it uses the chain rule to compute the gradient of the loss function with respect to each parameter, then updates weights via an optimizer (such as SGD or Adam). Implementing training on the ANE requires not only forward inference capability but also support for gradient computation, intermediate activation storage, dynamic memory management, and optimizer state maintenance. The ANE's hardware design was originally optimized only for the forward computation path, making it a critical engineering question whether its memory bandwidth and cache architecture are suitable for the data access patterns of backpropagation.
This meant that developers who wanted to train models on Apple devices had to fall back on the GPU (via Metal) or CPU, unable to fully leverage this dedicated chip designed specifically for neural networks with an exceptionally high performance-per-watt ratio.
By reverse-analyzing private APIs, the project bypasses Core ML's abstraction layer and directly taps into the ANE's low-level capabilities. This would enable developers for the first time to complete a full training loop on Apple's dedicated neural hardware, opening up entirely new possibilities for on-device learning, federated learning, and privacy-preserving personalized models.
Federated Learning is a distributed machine learning paradigm proposed by Google in 2016. Its core idea is to keep data on user devices and only upload model updates (gradients) to a central server for aggregation. Apple already uses differential privacy techniques in scenarios like keyboard predictions and Siri optimization. If the ANE could support efficient on-device training, it would dramatically lower the energy consumption barrier for federated learning, enabling mobile devices like iPhones to perform local model updates while charging or idle—without ever exposing users' raw data.
Training Possibilities Enabled by ANE's Energy Efficiency
The Apple Neural Engine's greatest value lies in its outstanding energy efficiency. Compared to the high power consumption and heat generation of GPU training, the ANE consumes far less power at equivalent computational capacity. If training could be performed on the ANE, it would mean iPhones, iPads, and even Macs could become low-power edge training nodes—an especially compelling prospect for continuous learning in mobile scenarios.

Technical Deep Dive: Reverse Engineering Apple's Private APIs
Core Challenges of Reverse Engineering
Reverse engineering Apple's private frameworks is an extraordinarily challenging endeavor. These APIs have no official documentation—interface signatures, data structures, and even calling sequences must be inferred through disassembly, symbol analysis, and extensive experimentation. The project chose Objective-C as its primary language precisely because Apple's low-level system frameworks extensively use the Objective-C runtime, making it possible to access private interfaces through runtime mechanisms (such as NSInvocation, method swizzling, etc.).
The Objective-C Runtime is a set of C language APIs that provide capabilities including dynamic method resolution, message forwarding, and class structure introspection. Reverse engineers can use tools like class-dump to export header files from private frameworks, dynamically load private libraries via dlopen/dlsym, and invoke undisclosed methods using objc_msgSend. Additionally, the LLDB debugger, Hopper/IDA disassemblers, and the Frida dynamic instrumentation tool are all commonly used reverse analysis techniques. Apple's ANE driver layer (such as the AppleH11ANEInterface kernel extension) and user-space frameworks (Espresso, ANECompiler, etc.) are all potential reverse engineering targets.
Notably, relying on private APIs carries significant stability risks. Apple may modify or remove these undisclosed interfaces with every system update, causing the project to break on new OS versions. As such, projects like this are fundamentally research-oriented and exploratory in nature, rather than stable solutions suitable for production environments.
Compliance Risks and Practical Boundaries
Using private APIs is explicitly prohibited by Apple's App Store review guidelines. Any application developed using this technology that attempts to be published on the App Store would almost certainly be rejected. Therefore, the project's practical use cases are more likely concentrated in areas like jailbroken devices, academic research, and pushing the limits of Apple hardware, rather than consumer-facing commercial products.
Community Response and the Outlook for ANE Openness
The project's immense popularity clearly demonstrates the developer community's strong desire to unlock the full potential of Apple's dedicated hardware. Apple's closed approach to the ANE has long frustrated many machine learning engineers—they possess powerful hardware but cannot fully control it.
While reverse engineering projects like this operate in a gray area, they objectively advance the exploration of hardware capability boundaries and may indirectly pressure Apple to consider opening more official interfaces in the future. In fact, Apple has been gradually expanding its machine learning capabilities in recent years, such as releasing the MLX framework and enhancing Core ML's training support.
MLX is a machine learning framework open-sourced by Apple in December 2023, designed specifically for Apple Silicon, with an API style similar to NumPy and PyTorch. It supports complete model training and inference on Mac, fully leveraging the unified memory architecture for zero-copy data sharing between CPU and GPU. The emergence of MLX signals that Apple is beginning to take seriously the developer community's demand for local AI training capabilities. However, as of now, MLX primarily utilizes GPU and CPU for computation and does not yet officially support ANE as a training backend—which also underscores the technical and strategic complexity of opening up ANE training capabilities.
Maintaining a Realistic Perspective
Regarding this project, it's advisable to maintain a balanced perspective:
- It demonstrates the technical potential of Apple's hardware and holds significant research and educational value
- However, it is not suitable for production environments, with both stability and compliance concerns
- Implementation details based on private APIs may break with system updates
- Users should fully understand the associated legal and platform policy risks before use
Conclusion
The maderix/ANE project is a courageous technical exploration that reveals training potential in the Apple Neural Engine far beyond what Apple has officially disclosed. Although its reliance on reverse-engineered private APIs introduces dual uncertainties around stability and compliance, its inspirational significance for the broader developer community cannot be underestimated—it reminds us that the capability boundaries of dedicated AI hardware may be far wider than what manufacturers choose to reveal.
In the future, as demand for on-device AI continues to grow, we may see Apple gradually open up ANE's training capabilities through official channels. Until then, open-source projects like this will continue to serve as trailblazers.
Related articles

AI Cracks a 35-Year-Old Math Problem: Discovering an Unexpected New Term
The Theo Conjecture, unsolved for 35 years, has been cracked with an unexpected new term discovered. Exploring AI's evolving role in pure math research.

AI Agents Used for Automated Network Intrusion for the First Time: Technical Breakdown and Defense Insights
Deep technical breakdown of an AI Agent-driven intrusion at a frontier AI lab, covering the full attack timeline from reconnaissance to data exfiltration, plus defense strategies.

How Much Work Can You Delegate to AI Agents? A Complete Guide to Delegation Boundaries and Trust Strategies
Explore AI agent delegation boundaries: from code completion to autonomous agents across three levels, analyzing verifiability, error costs, and context to build pragmatic trust strategies.