PolyStep: Training Non-Differentiable Networks via Optimal Transport
Gradient-free optimizer that updates parameters using only forward passes via structured polytope vertices and optimal transport barycentric projection.
Metadata
- Source: arXiv:2605.01928
- Authors: An T. Le
- Published: 2026-05-03
- Category: cs.LG, cs.NE, cs.RO, math.OC
Core Methodology
Key Innovation
PolyStep is a gradient-free optimizer that trains genuinely non-differentiable models (spiking neurons, quantized layers, discrete routing, blackbox simulators) where backpropagation is inapplicable and surrogate gradients introduce bias. It achieves 93.4% accuracy on hard-LIF spiking networks, outperforming all gradient-free baselines by 60+pp and closing to within 4.4pp of surrogate-gradient Adam.
Technical Framework
- Polytope Vertex Evaluation: Each optimization step evaluates the loss at structured polytope vertices in a compressed subspace
- Softmax-Weighted Assignment: Computes assignments over the resulting cost matrix using softmax
- Barycentric Projection: Displaces particles toward low-cost vertices via barycentric projection
- Optimal Transport Connection: The update corresponds to the one-sided limit of a regularized optimal transport problem, inheriting its geometric structure without Sinkhorn iterations
Theoretical Guarantees
- Convergence to conservative-stationary points at rate O(log T/√T) on piecewise-smooth losses
- Upgraded to Clarke-stationary on headline architectures
- Extended to piecewise-constant regime via hitting-time bound
- Rates match known zeroth-order query-complexity lower bounds
Applications
- Spiking Neural Networks: Training hard-LIF neurons without surrogate gradients
- Quantized Networks: int8 quantization training
- Discrete Architectures: argmax attention, hard MoE routing, staircase activations
- Combinatorial Optimization: MAX-SAT (sustains 92%+ clause satisfaction at 1M variables)
- RL Policy Search: Matches OpenAI-ES on classical control, robust to integer/binary quantization
Implementation Guide
Prerequisites
- PyTorch or similar deep learning framework
- Models with non-differentiable components
Algorithm Steps
- Define a compressed subspace dimension d << D (parameter dimension)
- Generate structured polytope vertices in the compressed subspace
- Evaluate loss at each vertex (forward pass only)
- Compute softmax-weighted assignment over cost matrix
- Perform barycentric projection to update particles
- Map update back to original parameter space
Code Sketch
import torch
import torch.nn.functional as F
def polystep_step(model, loss_fn, data, target, n_vertices=2*d+1, temperature=1.0):
"""Single PolyStep optimization step."""
params = list(model.parameters())
flat_params = torch.cat([p.view(-1) for p in params])
D = flat_params.shape[0]
d = min(64, D) # compressed subspace dimension
# Generate polytope vertices in compressed subspace
vertices = generate_polytope_vertices(d, n_vertices)
# Evaluate loss at each vertex
losses = []
for v in vertices:
# Map vertex to parameter perturbation
delta = project_to_paramspace(v, D)
with torch.no_grad():
apply_perturbation(model, delta)
output = model(data)
loss = loss_fn(output, target)
losses.append(loss.item())
restore_model(model) # Reset to original params
# Softmax-weighted assignment
costs = torch.tensor(losses)
weights = F.softmax(-costs / temperature, dim=0)
# Barycentric projection (displace toward low-cost vertices)
update = sum(w * v for w, v in zip(weights, vertices))
# Apply update to parameters
apply_update(model, project_to_paramspace(update, D), lr=0.01)
Pitfalls
- Vertex count: n_vertices = 2d+1 is minimal; more vertices improve accuracy but increase forward passes
- Compressed dimension: d should be small (32-128) for efficiency but large enough for expressiveness
- Temperature: Controls exploration vs exploitation; needs tuning per problem
- Not for smooth networks: If surrogate gradients work well, PolyStep is unnecessary overhead
- Query complexity: O(n_vertices) forward passes per step — more expensive than gradient-based methods
Related Skills
- gradient-free-continual-learning-snn
- scalable-snn-without-backprop
- surrogate-gradient-snn-training
- quantization-spiking-neural-networks-beyond-accuracy
- density-driven-optimal-control
1---2name: polystep-optimal-transport-training3description: "Gradient-free optimization for non-differentiable networks using optimal transport (PolyStep). Trains spiking neurons, quantized layers, discrete routing without surrogate gradients. Activation: polystep, optimal transport training, gradient-free optimizer, non-differentiable networks, spiking training without backprop."4metadata:5 source: https://skillmd.com/skills/hiyenwong/polystep-optimal-transport-training6---78# PolyStep: Training Non-Differentiable Networks via Optimal Transport910> Gradient-free optimizer that updates parameters using only forward passes via structured polytope vertices and optimal transport barycentric projection.1112## Metadata13- **Source**: arXiv:2605.0192814- **Authors**: An T. Le15- **Published**: 2026-05-0316- **Category**: cs.LG, cs.NE, cs.RO, math.OC1718## Core Methodology1920### Key Innovation21PolyStep is a gradient-free optimizer that trains genuinely non-differentiable models (spiking neurons, quantized layers, discrete routing, blackbox simulators) where backpropagation is inapplicable and surrogate gradients introduce bias. It achieves 93.4% accuracy on hard-LIF spiking networks, outperforming all gradient-free baselines by 60+pp and closing to within 4.4pp of surrogate-gradient Adam.2223### Technical Framework24251. **Polytope Vertex Evaluation**: Each optimization step evaluates the loss at structured polytope vertices in a compressed subspace262. **Softmax-Weighted Assignment**: Computes assignments over the resulting cost matrix using softmax273. **Barycentric Projection**: Displaces particles toward low-cost vertices via barycentric projection284. **Optimal Transport Connection**: The update corresponds to the one-sided limit of a regularized optimal transport problem, inheriting its geometric structure without Sinkhorn iterations2930### Theoretical Guarantees31- Convergence to conservative-stationary points at rate O(log T/√T) on piecewise-smooth losses32- Upgraded to Clarke-stationary on headline architectures33- Extended to piecewise-constant regime via hitting-time bound34- Rates match known zeroth-order query-complexity lower bounds3536## Applications37- **Spiking Neural Networks**: Training hard-LIF neurons without surrogate gradients38- **Quantized Networks**: int8 quantization training39- **Discrete Architectures**: argmax attention, hard MoE routing, staircase activations40- **Combinatorial Optimization**: MAX-SAT (sustains 92%+ clause satisfaction at 1M variables)41- **RL Policy Search**: Matches OpenAI-ES on classical control, robust to integer/binary quantization4243## Implementation Guide4445### Prerequisites46- PyTorch or similar deep learning framework47- Models with non-differentiable components4849### Algorithm Steps501. Define a compressed subspace dimension d << D (parameter dimension)512. Generate structured polytope vertices in the compressed subspace523. Evaluate loss at each vertex (forward pass only)534. Compute softmax-weighted assignment over cost matrix545. Perform barycentric projection to update particles556. Map update back to original parameter space5657### Code Sketch58```python59import torch60import torch.nn.functional as F6162def polystep_step(model, loss_fn, data, target, n_vertices=2*d+1, temperature=1.0):63 """Single PolyStep optimization step."""64 params = list(model.parameters())65 flat_params = torch.cat([p.view(-1) for p in params])66 D = flat_params.shape[0]67 d = min(64, D) # compressed subspace dimension68 69 # Generate polytope vertices in compressed subspace70 vertices = generate_polytope_vertices(d, n_vertices)71 72 # Evaluate loss at each vertex73 losses = []74 for v in vertices:75 # Map vertex to parameter perturbation76 delta = project_to_paramspace(v, D)77 with torch.no_grad():78 apply_perturbation(model, delta)79 output = model(data)80 loss = loss_fn(output, target)81 losses.append(loss.item())82 restore_model(model) # Reset to original params83 84 # Softmax-weighted assignment85 costs = torch.tensor(losses)86 weights = F.softmax(-costs / temperature, dim=0)87 88 # Barycentric projection (displace toward low-cost vertices)89 update = sum(w * v for w, v in zip(weights, vertices))90 91 # Apply update to parameters92 apply_update(model, project_to_paramspace(update, D), lr=0.01)93```9495## Pitfalls96- **Vertex count**: n_vertices = 2d+1 is minimal; more vertices improve accuracy but increase forward passes97- **Compressed dimension**: d should be small (32-128) for efficiency but large enough for expressiveness98- **Temperature**: Controls exploration vs exploitation; needs tuning per problem99- **Not for smooth networks**: If surrogate gradients work well, PolyStep is unnecessary overhead100- **Query complexity**: O(n_vertices) forward passes per step — more expensive than gradient-based methods101102## Related Skills103- gradient-free-continual-learning-snn104- scalable-snn-without-backprop105- surrogate-gradient-snn-training106- quantization-spiking-neural-networks-beyond-accuracy107- density-driven-optimal-control