Computational working paper · revised 2026-10-17. This page and the downloadable paper focus on the architecture and its limits. A performance advantage, a complete three-protein device and a new XOR principle have not been established.

The proposed architecture

An XOR gate turns on when exactly one of two inputs is present. In this model, A and B are the inputs and S is a shared switch. A alone can bind S, and B alone can bind S. When both arrive at similar concentrations, their tighter A:B pairing leaves less input available for the switch. The output is defined as the fraction of S occupied by either input: ([A:S] + [B:S]) / S_total.

A + S ⇌ A:S   → assumed ON output
B + S ⇌ B:S   → assumed ON output
A + B ⇌ A:B   → inputs unavailable to S

This is a three-component binding core, with six free or bound species. It assumes S holds only one input at a time and the A:B pair cannot bind S. These are physical requirements for a future design, not properties established by the simulation. The original plan sought actual protein sequences and a reporter. Those remain unfinished.

What changes from prior work

The closest comparison is the XNOR gate in Chen et al. (2020), Fig. 2F. Its two inputs can already bind each other. With neither input, an output protein pair associates; one input disrupts that pair; both inputs sequester each other, allowing the output pair to associate again. This model instead reads occupancy of one shared switch.

InputsChen XNOR: output pairShared-switch model
NeitherONOFF
A onlyOFFON
B onlyOFFON
BothONLOW if inputs pair sufficiently

The distinction is the arrangement and readout. Mutual sequestration is shared with prior work. These idealized truth tables are logical complements; physically inverting a reporter is an additional engineering task. This comparison does not show that either architecture performs better.

Other designsMechanism and evidenceRelation to this model
de Ronde et al., 2012Receptor-state theory includes XOR in compact heterodimeric receptors.Protein XOR is already theoretically established; fewer components cannot be claimed against the field as a whole.
Fink et al., 2019Proteolysis and designed coiled-coils implement XOR in mammalian cells.Experimental protein XOR, with a different processing mechanism and a demonstrated luciferase readout.
Parres-Gold et al., 2025Competitive-dimerization simulations include a six-monomer XOR, Fig. 2H, with one output dimer.The shared-switch core has three components but assumes a combined A:S/B:S readout. This is not a demonstrated three-versus-six device saving.

A smaller diagram carries unresolved requirements

A real readout must respond to either A:S or B:S while remaining low for free S and A:B. The proposed NanoBiT arrangement fuses LgBiT to S and leaves SmBiT free, but no engineered conformational mechanism makes either input activate it. That proposal already includes an additional protein species, and further components may be needed. The model does not count or solve that engineering.

The useful research question is whether this compact binding core can deliver a detectable output while tolerating input imbalance and affinity uncertainty. The simulations below characterize its weaknesses. They do not establish lower cost, higher speed, better robustness or novelty.

How the model works

  1. 1A mutationwhich residue changes
  2. 2Predicted ΔΔGhow binding energy shifts, kcal/mol
  3. 3A new Kdold Kd × e^(ΔΔG/RT)
  4. 4Equilibriumwho ends up bound to whom
  5. 5Truth tablefour input states, one output each

A proposed workflow. The equilibrium analysis and mutation-effect benchmark are separate exploratory pieces. They have not been connected through a concrete protein design. Topology, readout, concentrations and kinetics also introduce uncertainty.

  1. Three proteins, three bindings. The inputs A and B, and one switch S. A binds S, B binds S, and A binds B. Each binding obeys Kd = [free partner 1] × [free partner 2] / [complex], so a smaller Kd is tighter. The model excludes ternary and higher complexes; an eventual design would need to justify that exclusion.
  2. Mass action. At equilibrium each pair of partners obeys the rule below, and no protein is lost: every A is free, on the switch or in a pair. That is three equations for three unknowns.
  3. Solve it four times. Neither input, A only, B only, both. When present, each input is at 1 µM, against 0.5 µM of switch.
  4. Read the switch. The plotted output is switch occupancy. The code multiplies it by a fixed reporter factor, SmBiT / (Kd_NanoBiT + SmBiT), so at fixed reporter concentration it is linear in occupancy. This is an assumed readout, not a validated physical reporter.
  5. Score the truth table. ON/OFF is the average of the two one-input signals over the average of the two OFF signals, with a tiny floor so it never divides by zero. A table passes when both OFF states lie below, and both ON states above, 30% of that table’s mean ON signal. The threshold is recalculated for every noise draw and is not a calibrated detection limit. At the reference point, the direct one-input/both-input contrast is 4.27×; the displayed mean-ON/mean-OFF ratio is 8.5× because one OFF state is zero.
[A]·[S] = Kd(A:S)·[A:S]      A_total = [A] + [A:S] + [A:B]
[B]·[S] = Kd(B:S)·[B:S]      B_total = [B] + [B:S] + [A:B]
[A]·[B] = Kd(A:B)·[A:B]      S_total = [S] + [A:S] + [B:S]

The project solves these with a generic root finder. For this page I solved the same equations a different way: treat the free switch as the one unknown, split A and B around it with a quadratic, and bisect until every molecule is accounted for. It conserves mass to numerical precision and is fast enough to redraw the map while a slider moves. It agrees with the project's numbers wherever the project's solver converges, and the tests check it. You can read it: model.js.

Where XOR works

The map above shades every combination of switch Kd (up) and pair Kd (across) by how much signal leaks when both inputs are present. Lime is a clean gate. Three things stand out.

The pair has to be far tighter than the switch

At the reference model the switch has a Kd of 5 µM and the pair 10 nM, five hundred times tighter. The table shows what happens as the pair loosens, with everything else held.

Pair tighter than switch byPair KdBoth-inputs leakClean?
equal5 µM157%No
3×1.7 µM136%No
10×500 nM105%No
30×170 nM74%No
100×50 nM47%No
500×10 nM23%Yes
5,000×1 nM8%Yes

My starting notes had it the other way round: a loose pair, 1 to 10 µM, so that single inputs could still light the switch. The model says a pair that loose barely forms. With the switch at 5 µM and the pair at 1 µM, the both-inputs signal is 124% of the one-input signal, which is worse than OR.

Leak falls with the square root of the pair's Kd

What matters is how much input is left over once the pair has formed. With A and B equal, the free amount is about the square root of the pair’s Kd times the input concentration, when most input is paired and switch occupancy is low. A pair a hundred times tighter leaves ten times less input, and so leaks ten times less. Going from 10 nM to 1 nM to 0.1 nM takes the leak from 23% to 7.9% to 2.5%. At fixed, balanced concentrations and equal switch affinities, a tighter pair reduces equilibrium leak. This does not remove input imbalance or unequal-affinity failures. Real designed pairs only get so tight, and where that limit sits is an experimental question this model cannot answer.

A weak switch is cleaner, and dimmer

With the switch at 100 nM, one input fills 85% of it, and a 1 nM pair still leaks 44%. With the switch at 5 µM, the same pair leaks 8%, but one input fills only 16% of the switch. The model has no noise floor, so it cannot say how dim is too dim. The dashed line on the map marks where one input occupies less than 10% of the switch; that line is a guide, not a result.

0%10%20%30%40%50%0 µM1 µM2 µM3 µM4 µMB added, with A fixed at 1 µMshare of the switch occupiedB equals AA alone: 16%both: 3.6%B twice A: 16%
  • No pairing
  • Pair 10 µM
  • Pair 10 nM
  • Pair 0.1 nM
The gate reads balance, not presence. With a tight pair, the output falls from 16% to 3.6% as B rises to match A, then climbs back as B passes it. At twice the A, the leftover B occupies the switch as much as A alone did. Without pairing, more B just means more output. Switch Kd 5 µM, A 1 µM, 0.5 µM of switch. From the project's equations.

This model suppresses output near matched input amounts. Chen et al. engineered cooperativity to reduce sensitivity to certain component imbalances. Those are different architectures and experiments: no matched robustness comparison has been performed. Here, B at twice A already restores an ON-like occupancy.

Assumed affinity uncertainty

If a starting affinity is known, a mutation-induced binding-energy change converts it to a new affinity through Kd_new = Kd_start × eΔΔG/RT, with RT = 0.592 kcal/mol at room temperature. An energy error of 1 kcal/mol changes this ratio by 5.4-fold. A mutation-effect predictor does not itself provide an absolute affinity for a newly designed pair.

Here the slider and curves specify an assumed Gaussian energy-error standard deviation σ. Each of the three affinities is perturbed independently, with log(Kd / Kd_nominal) drawn from a normal distribution with standard deviation σ / RT. The top axis is the geometric standard deviation of that multiplier. This is an illustrative sensitivity model, not a calibrated error distribution for designed proteins.

0%25%50%75%100%0.00.40.81.21.6assumed energy-error σ, kcal/molgates still clean×2.3 Kd geometric SD×5.4 Kd geometric SD×13 Kd geometric SDσ = 0.50σ = 1.10pair 10 nMpair 1 nMpair 0.1 nM
Pass rates depend on the error assumptions. Of 6,000 simulated draws at σ = 1.10 kcal/mol, approximately 33%, 56% and 63% of the 10 nM, 1 nM and 0.1 nM pair settings pass the relative truth-table criterion. At σ = 0.50, the rates are 63%, 94% and 94%. These are conditional model results, not probabilities that synthesized proteins will work. Both switch affinities vary independently in these draws.

Two things about these numbers. First, "three of four states correct" is almost free: with no input, the model's output is zero, so one state is always right. The project's scorer reports both; I use the strict one. Second, the project's notes also quote an "enrichment" of a thousand or more. It divides the XOR gate's pass rate by an OR gate's, with the OR gate's rate floored at one sample. When no OR samples pass, the quoted ratio scales with sample count. It does not establish biological enrichment. I do not use it.

σ is not MAE. For zero-mean normal errors, σ = MAE × √(π / 2), about 1.25 × MAE. At an assumed MAE of 1.10, a separate 100,000-draw check with this conversion gives approximately 26%, 44% and 53% passing, rather than the σ = 1.10 rates above. With the two switch errors perfectly correlated, the reference rate changes to about 51%. Those scenarios illustrate assumption sensitivity; none has been calibrated to actual gate designs.

The threshold matters too. The relative rule sets a fresh threshold using each simulated gate’s own mean ON signal. With a fixed threshold declared from the nominal gate instead, the reference pass rate at σ = 1.10 falls from about 33% to 19%. A real assay would also need a background level, detection limit and adequate brightness in both ON states.

A separate exploratory predictor

A separate preliminary model predicts ΔΔG from a mutation. Its data is SKEMPI 2.0, a database of measured binding changes for mutations in protein complexes. The current preprocessing retains 6,723 records, and 73% are single mutations.

The split groups rows by PDB structure ID: 49 of 333 IDs are reserved for validation. That leaves 6,072 training records and 651 validation records. Related complexes under different IDs still cross the split, and this validation set selects the best training epoch. It is not an untouched final test set.

The baseline sees each mutation as a list of amino-acid changes: which residue became which, its position number, and how hydrophobicity, charge, size and polarity changed. It sees no 3D structure. A four-layer network with 267,521 parameters learns from that, in a five-minute budget on a Mac.

  1. Always guess 01.37
  2. Always guess the training mean (+1.21)1.26
  3. Always guess the training median (+0.76)1.20
  4. Baseline network, 30 s runbest epoch1.10
  5. Baseline network, 5 min runbest epoch1.11
  6. The same 5 min runlast epoch1.26
  7. Earlier MAE targetnever reached0.50
The baseline beats guessing, barely. Mean absolute error on the 651 validation records, in kcal/mol; lower is better. A model that always says the training median is off by 1.20 on average. The network gets 1.10 (Pearson r 0.40), a gain of 0.1, about 8%. The 5-minute run reports 1.11 for its best epoch, but its last epoch sits at 1.26, no better than guessing the training mean: a pattern consistent with overfitting. The dashed bar is the earlier aspirational MAE target of 0.5. On direction, the network is right about whether binding gets stronger or weaker for 85% of the mutations that matter (more than 0.5 either way); always saying "weaker" gets 82%.
0%5%10%15%20%25%-4-20+2+4change in binding energy, kcal/mol (+ is weaker)median +0.76
Most mutations weaken binding a little. Bars: the 6,072 training records. Line: the 651 validation records, with a similar overall distribution. Values beyond ±4 are counted in the end bins. This is why a constant guess is so hard to beat: the middle of the data is where nearly everything sits.

The repository also sets up an automated improvement loop on top of this: an AI agent edits only the training file, runs a five-minute experiment, and keeps the change if the validation error falls, with the scoring file frozen so the agent cannot change how it is graded. That setup is built. I have no logged runs of it, so I claim no improvement from it.

The benchmark needs repair. Of the 651 validation records, 480 have an explicit SKEMPI hold-out PDB link to a training structure, spanning 25 of the 49 validation IDs. The retained data also include 186 affinity bounds treated as exact values, including 16 validation records. Repeated measurements and per-record temperatures need deliberate handling. The current 1.10 MAE is a best-validation baseline under this preprocessing, not an established accuracy for unrelated or de novo protein interfaces.

No candidate’s three absolute affinities have been predicted and validated through this workflow. A starting Kd, suitable interface information, independent testing and uncertainty calibration would be needed before this predictor could guide a real protein gate.

Where it stands

The project remains paused at the computational stage. The contribution documented here is a specified shared-switch model and an analysis of its failure modes. A lower component count for a complete device, a new XOR mechanism and a performance advantage have not been established.

  1. Reconcile the physical architecture. The old design file specifies separate binding surfaces, while these equations exclude simultaneous binding. A sequence-level design must establish the intended steric exclusion or other mechanism.
  2. Engineer the readout. Show how either A:S or B:S activates an observable output with low background, and count every required component.
  3. Compare on equal terms. Use matched input ranges, fixed detection thresholds, brightness requirements and affinity uncertainties to compare architectures.
  4. Validate prediction and experiment. Repair the mutation benchmark if pursuing design, obtain baseline affinities, and measure the intended interactions and all four input states.

Weaknesses and limits

  • No protein gate built or tested. There are no completed component sequences, measured affinities or experimental truth tables for this proposal.
  • Excluded complexes are assumptions. The six-species model permits only free A, B and S, plus A:S, B:S and A:B. Ternary complexes, homodimers, larger assemblies and nonspecific binding are omitted.
  • The reporter is unresolved. Occupied switch is counted as output. The fixed NanoBiT factor does not establish input-dependent conformational switching, background suppression or detectability.
  • It is sensitive to balance. In the reference model, B at twice A restores an ON-like output. The four-point truth table does not establish robustness over broad concentration ranges.
  • A clean ratio can be too dim. Weak switch binding reduces unwanted occupancy but also lowers the ON level. No experimental noise floor is available.
  • Equilibrium does not establish response speed. Association rates, dissociation rates, kinetic trapping, expression, degradation and cellular resource competition are unmodeled. A tighter pair is not evidence of a faster reversible gate.
  • The noise distribution is assumed. Zero-mean Gaussian errors, independence and the per-draw threshold define the reported pass rates. Predictor MAE does not validate those assumptions or their transfer to new proteins.
  • The predictor remains preliminary. It has 267,521 parameters but no protein sequence or 3D context. Residue position is divided by 500, amino-acid identities use scaled indices, and the interface flag is zero. Two unseeded runs do not establish run-to-run uncertainty. Its 85% sign accuracy compares with 82% for always predicting weaker binding; 73% of training records are single mutations.
  • Numerical checks have a defined scope. The original root finder disagreed with a mass-conserving solution on 11 of 3,000 extreme parameter sets at the stated comparison tolerance. The reference table was independently reproduced, and 150 asymmetric comparisons agreed with a separate positive-variable solver. Numerical agreement does not validate the physical assumptions.
  • The scoring rule is a choice. This page uses the 30% relative rule. The old solver demo uses 10% OFF and 50% ON thresholds and scores the reference 3/4. The illustrated 8.5× mean-ON/mean-OFF ratio is not an experimentally measured dynamic range.

Credits and sources

This is a personal computational working paper. The binding equations use standard mass action. Chen et al. provide an important designed-protein framework and the direct XNOR comparison; the prior work below establishes other protein-XOR mechanisms. SKEMPI supplies the mutation-affinity records. NanoBiT is a proposed assay concept, not a demonstrated readout for this gate.