Fail Fast, Run Faster: Shape Safe Deep Learning in Rust on Apple Silicon [pdf]
A Rust-based deep learning framework for Apple Silicon uses shape-safe tensors and compile-time checks to prevent runtime errors, leveraging Metal Performance Shaders for faster training and inference with memory safety.
Background
- **Rust** is a systems programming language focused on memory safety and performance, increasingly popular as a safer alternative to C/C++ in AI/ML infrastructure.
- **CS231n** is Stanford's famous "Convolutional Neural Networks for Visual Recognition" course. This appears to be a final project paper for the 2025 term.
- **Apple Silicon** refers to Apple's custom ARM-based chips (M1, M2, M3, M4 series), which use a unified memory architecture that differs from traditional CPU+discrete GPU setups.
- The paper explores using Rust to build deep learning components that "fail fast" (catch errors at compile-time rather than runtime) while achieving high performance on Apple's hardware — a niche at the intersection of safe systems programming and neural network inference/training on consumer hardware.