NeurIPS 2026QuestionsPapersAreasAboutMarkdown

Flipping Bits, Not Gradients: Sharpness-Aware Minimization Directly on the Boolean Hypercube

Ba-Hien Tran

NeurIPS page · Open on the map

Category: Optimization & Federated Learning › Neural Network Optimization · Type: new method · Keywords: binary neural networks, sharpness-aware minimization, Boolean hypercube, discrete optimization, generalization, robustness

Areas: Optimization & Algorithms › Optimization Dynamics › Edge of Stability

Summary

BOLD-SAM is a sharpness-aware optimizer that operates directly on the Boolean hypercube for binary-weight networks, improving accuracy and robustness.

Explained to a 5-year-old

We have a computer brain that uses only on/off switches. It can get stuck in a bad spot where small changes make it think wrong. We created a new way to move those switches so it checks all possible tiny flips and picks the best one. This helps the brain work better and not get confused when it sees new things. Because it only flips bits, it uses less energy and works faster.

Explained to a 5-year-old, longer

A computer brain is like a big puzzle made of tiny pieces that can be either on or off. When we train it, we want it to remember things well so it works on new puzzles too. The usual way to help it remember uses smooth changes, but those changes don't match the puzzle's on/off nature. We invented a training trick that works directly on the puzzle's on/off grid. It looks for the hardest spots by trying to flip a few pieces at a time. Then it moves those pieces to make the puzzle easier. This process checks many possible flips without using complicated math. The new method is backed by theory that shows it will improve the puzzle's performance. In experiments, the brain gets better at solving familiar puzzles and also handles new, unseen puzzles better. It works on many different kinds of puzzles and computer models. Because it only flips bits, it needs less computer power and runs faster. This makes training powerful AI models easier and greener.

For a technical reader

Traditional Sharpness-Aware Minimization perturbs model parameters in continuous space, which does not accurately reflect the discrete nature of binary neural networks. This paper proposes a new optimizer that operates directly on the Boolean hypercube by exploring perturbations via Hamming balls and performing greedy ascent followed by bit-flip descent. The method provides theoretical guarantees linking the discrete interaction Hessian to approximation quality and convergence rate, and connects flatness to curvature measures. Empirical results show consistent gains in clean accuracy and out-of-distribution robustness across multiple architectures and datasets. The approach is lightweight, requiring only bit-flip operations, making it suitable for resource-constrained deployment of binary models.

Problem

Applying Sharpness-Aware Minimization to binary-weight networks is challenging because continuous perturbations do not accurately reflect the discrete loss landscape on the Boolean hypercube. This leads to suboptimal generalization and robustness.

Method

The approach replaces the continuous ℓp-ball with a k-bit Hamming ball to probe the discrete loss landscape, performs a greedy ascent to find sharp directions, and then conducts a sharpness-aware descent by flipping bits to reduce loss. This discrete min-max optimization is solved efficiently without relying on continuous relaxations.

Results

The approach achieves higher clean accuracy and better out-of-distribution robustness compared to standard binary training and latent-space SAM baselines.

Contributions

The paper provides a theoretically grounded sharpness-aware optimizer for the Boolean hypercube, with PAC-Bayes, compression, and distributionally robust optimization justifications, approximation and convergence guarantees, and empirical validation across diverse architectures and datasets.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction