ABSL (Adaptive Bit-Shift Learning) is an experimental, 100% integer-only learning algorithm for neural networks, written from scratch in Rust.
By completely avoiding floating-point math (float
), ABSL eliminates the need for expensive FPUs (Floating Point Units). This makes it natively compatible with ultra-low-power embedded systems, 8-bit/16-bit microcontrollers, and neuromorphic hardware.
Instead of traditional learning rates, ABSL dynamically scales weight updates using an adaptive bit-shifting mechanism based on integer error magnitudes.
Historically, solving the non-linear XOR problem required continuous floating-point gradients. ABSL v1.0.0 completely shatters the myth that integer training is bound to get stuck in local minima due to harsh rounding errors.
By scaling up the hidden layer to a 2-3-1 architecture (2 Inputs, 3 Hidden Neurons, 1 Output), ABSL introduces enough high-dimensional redundancy to bypass integer quantization bottlenecks.
| Metric | ABSL v3 | ABSL v5 (v1.0.0 Core) |
|---|---|---|
| Perfect Runs (4/4 Correct) | ||
| 38.7 % | 70.1 % 🔥 | |
| Global Accuracy | ||
| 80.0 % | 91.1 % | |
| Avg. Correct Cases per Run | ||
| 3.20 / 4 | 3.64 / 4 | |
| Total Failures (0, 1, or 2 Correct) | ||
| High | 0.0 % (Always gets ≥ 3/4) |
(0,0): 88.2%(Current tuning target: eliminating low-level integer bias leakage)(0,1): 99.4% ✨**(1,0):** 99.6% ✨**(1,1):** 77.1%(Current tuning target: optimizing negative integer inhibition)
ABSL snaps continuous gradients into a discrete integer grid using native Rust performance:
impl LearningRule for ABSLv5 {
fn update(&self, error: i32, input: i32, weight: i32, _epoch: u32) -> i32 {
let shift = Self::calculate_shift(error, weight);
(((error as i64) * (input as i64)) >> shift) as i32
}
}
The shift
is dynamically calculated using bit-lengths (ilog2
) of both the error and weight magnitudes, preventing weight explosion while keeping execution blindingly fast.
I am actively working on pushing the success rate from 70.1% to 99%+.
- Implement a discrete integer damping factor (Momentum equivalent) to prevent weight oscillation.
- Scale to MNIST.
##About Me:
I'm 15 living in Germany cirrntly in 10th grade and coded al of this on a broken s22 Ultra
In the future i want to study and work even more with this topic
Costum Licene please look in LICENSE