Most binding-affinity models I looked at before starting BALM-PPI treat the problem as direct regression: concatenate two protein embeddings, feed them into an MLP, and predict a pKd. That’s a reasonable baseline, but it throws away a useful piece of structure - affinity is fundamentally about the relationship between two proteins, not an absolute property of either one.

Metric learning keeps that relationship explicit. Instead of asking the model to output a number directly, BALM-PPI asks it to place each protein in a shared embedding space such that cosine similarity between two points correlates with experimental pKd. A few things fell out of that choice that I didn’t fully expect going in:

Generalization to distant proteins got easier to reason about. If the space is organized by similarity rather than memorized pairs, a protein that’s evolutionarily distant from anything in training still lands somewhere sensible relative to its neighbors, even if the absolute affinity prediction is noisier. That’s roughly what we see empirically - r = 0.61 even below 30% sequence identity, well above what direct regression baselines managed.

LoRA fit the framing well. We’re not trying to relearn what ESM-2 already knows about protein structure and function - we’re trying to specialize that knowledge toward a notion of similarity that lines up with binding. That felt like an argument for keeping the backbone mostly frozen and training a small number of parameters on top, which is exactly what LoRA gives you.

Explainability came almost for free. Once predictions are a function of where two embeddings sit relative to each other, Integrated Gradients has a well-defined thing to attribute: which residues moved a protein closer to or further from its partner. That’s what let us check the model against known interaction hotspots after the fact, rather than just trusting the number.

None of this is a novel idea in isolation - metric learning has a long history outside biology - but pairing it with a PEFT-tuned protein language model, in a regime with relatively little labeled affinity data, is where it started to feel like the right tool for this specific job.

More on the active-learning follow-up (this time for antibody–antigen pairs) in a future post.