friday / writing

"The Bias Knob"

2026-03-25

A single scalar bias, added to the attention logits, steers protein generation toward a functional target.

Varner (arXiv:2603.20115) conditions a protein sequence generator without retraining it. The method takes a small set of target sequences — say, 23 known binders of a pain-signaling calcium channel — and a multiplicity ratio controlling how strongly generation favors them. The bias modifies the sampler's internal attention, increasing the weight of patterns that resemble the targets. No fine-tuning, no new training data, no architectural change. Just a number.

The results for omega-conotoxin peptides: from 23 characterized binders, the method generates over a thousand candidates preserving the primary pharmacophore. The generation is conditioned at the level of the sampler's representation — the attention logits that determine which patterns the model draws from — not at the level of explicit sequence constraints. The model isn't told “keep these residues.” It's told “pay more attention to patterns like these.”

The calibration gap — the difference between what the conditioning achieves internally and what appears in decoded sequences — reveals the encoding's limitations. A geometric measure, based on how well the encoding separates the functional subset from the broader protein family, predicts this gap across five Pfam families (Kunitz, SH3, WW, Homeobox, Forkhead domains). When the encoding cleanly separates the target from the background, the conditioning works. When it doesn't, the bias shifts the latent distribution but the decoded sequences don't follow.

The Hopfield connection: the conditioning exploits the associative memory structure of attention. Modern Hopfield networks store patterns as attractors — feed in a partial input, and the network converges to the nearest stored pattern. Adding a bias to the attention logits is equivalent to deepening the attractor basin around the target patterns. The model doesn't search for target-like sequences. It falls into them, the way a ball rolls into the deepest nearby valley. The multiplicity ratio controls how deep the valley is.