Built a password strength checker with a 728K-parameter neural network from scratch in Go (no ML libraries)
Hey r/golang!
Built **LeAi** - a password strength checker using a deep learning model implemented entirely from scratch in Go (no PyTorch/TensorFlow).
**Performance:**
- 1,400+ passwords/second
- 728K parameters (5-layer network: 11→512→512→512→256→256→1)
- Zero dependencies
- Benchmarked on 20K passwords in 13.8 seconds
**Technical highlights:**
- Manual backpropagation implementation
- Gradient clipping to prevent exploding gradients
- He initialization for weights
- ReLU + sigmoid activations
**Why it's interesting:**
Wanted to understand neural networks fundamentally, so I built everything from scratch. Most challenging part was dealing with NaN/Inf during training and implementing proper gradient flow.
**Try it:**
- GitHub: https://github.com/Nesbesss/LeAi
- Live: https://www.nesbes.me
- MIT licensed
Example:
```bash
curl -X POST http://localhost:8080/check \
-H "Content-Type: application/json" \
-d '{"password":"test123"}'
# {"is_bad":true,"confidence":99.99%,"message":"Weak password"}
Open to feedback and optimization suggestions!
Posted Oct 10, 2025, 7:25 PM UTC