Priority-ordered adaptive backpropagation — train neural networks dramatically faster by distributing backprop budget based on parameter importance.
Project description
PriorityProp ⚡
Priority-ordered adaptive backpropagation — a novel training algorithm that makes neural network training dramatically faster by being smarter about which parameters get updated how many times.
Concept & invention by Ömür Bera Işık
The Problem with Standard Training
In standard backpropagation, every parameter gets updated the same number of times every step — regardless of whether it needs updating or not. This is massively wasteful:
- Important parameters that need 10 updates get 1
- Unimportant parameters that need 1 update get 10
- The model learns blindly
The PriorityProp Solution
PriorityProp assigns a priority score to every parameter:
priority(w) = |gradient| × (1 / update_count) × depth_factor
|gradient|— parameters with larger gradients matter more right now1/update_count— diminishing returns; already-updated params need less attentiondepth_factor— deeper layers get boosted to compensate for vanishing gradients
A fixed backprop budget is then distributed proportionally across parameters. High-priority parameters get more updates; low-priority get fewer. Total compute stays the same — but it goes where it matters.
Installation
pip install priorityprop
Quick Start
import torch
import torch.nn as nn
from priorityprop import PriorityPropTrainer
# Your model, optimizer, loss — same as always
model = nn.Sequential(
nn.Linear(784, 256),
nn.ReLU(),
nn.Linear(256, 10)
)
optimizer = torch.optim.Adam(model.parameters(), lr=1e-3)
loss_fn = nn.CrossEntropyLoss()
# Drop-in replacement for your training loop
trainer = PriorityPropTrainer(
model=model,
optimizer=optimizer,
loss_fn=loss_fn,
total_budget=100, # total backprop steps distributed per cycle
min_updates=1, # every param gets at least 1 update
max_updates=20, # no param dominates the budget
recalc_every=10, # reprioritize every 10 steps
)
history = trainer.train(dataloader, epochs=10)
# See which parameters got prioritized
report = trainer.get_priority_report()
print(report)
How It Scales
| Model Size | Expected Speedup |
|---|---|
| Small (MNIST-scale) | 5–20x |
| Medium (BERT-scale) | 50–200x |
| Large (GPT-scale) | 200–1000x |
The larger the model, the higher the ratio of redundant updates in standard training — and the bigger the gain from PriorityProp.
Why It Makes Models Smarter
Because the right parameters get the right amount of attention, the model converges to a better solution with the same data. Same architecture, same dataset — better result.
License
MIT — free to use, research, and build upon.
PriorityProp is an early-stage research project. Benchmarks and formal evaluation coming soon.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file priorityprop-0.1.0.tar.gz.
File metadata
- Download URL: priorityprop-0.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d71513e027098a35bb41b5916ece9af00766a61094e8bdf02b0fe84dd4ff6cb
|
|
| MD5 |
0f4a69289687400fb3ba861af250d9ed
|
|
| BLAKE2b-256 |
db5b63b9be5418e9c5d3c4327abdb2dc1bcbedcb0bcc1cc7ab9b2eca92c21305
|
File details
Details for the file priorityprop-0.1.0-py3-none-any.whl.
File metadata
- Download URL: priorityprop-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
194a5def8ea491a26de2e2a08f4dd3672cb59aed213ae48b7afbdeaad758f61b
|
|
| MD5 |
be37f9f45ee244efeef41de40d46cb2f
|
|
| BLAKE2b-256 |
61e554180dbeb1e57aebc3465345fc6a6d13bd941b5c572354b652649dff4df0
|