Show HN: Differentiable Silicon, neural net gradients into a device simulator A Tesseract Hackathon 2026 project from Pasteur Labs and ISI (Track 3: Hybrid ML + Mechanistic Models) built a differentiable pipeline that backpropagates a spiking neural network's heartbeat-classification loss through a circuit model and into Synopsys Sentaurus, the closed-source TCAD device simulator, to compute ∂L/∂(process parameters) for a ferroelectric transistor synapse. Because Sentaurus has no adjoint, the derivative is manufactured by directed finite-difference probes of the real solver, crossing three automatic-differentiation regimes (none, PyTorch, JAX) plus an SSH hop to a CentOS 7 host running Python 2.7.5. Gradient descent on those numbers cut balanced cross-entropy from 1.3996 to 1.0177 and raised accuracy from 0.250 to 0.688 on 16 intra-patient beats in 64 solver calls, while widening the device memory window from 0.415 to 0.576 V at a cost in switching sharpness from 71 to 97 mV/dec; on the inter-patient DS2 test set balanced accuracy is 0.302. One gradient, running from the accuracy of a heartbeat classifier all the way back to the fabrication parameters of the transistor its synapses are made from. Tesseract Hackathon 2026 Pasteur Labs & ISI · Track 3: Hybrid ML + Mechanistic Models A spiking neural network classifies heartbeats from an ECG. A spiking network is one whose neurons communicate in discrete pulses over time rather than in continuous numbers, which makes it a natural fit for hardware: you can build its synapses out of real devices instead of simulating them in software. The device here is a ferroelectric transistor . A ferroelectric is a material that holds an electrical polarization after you remove the field that created it, and flips to the other polarization when you push hard enough the other way. Put a film of one in a transistor's gate and the transistor's conductance remembers which state it was left in, which is what makes it usable as a synapse. How the device behaves depends on how it was manufactured: how thick that ferroelectric film is, how long the gate is, how heavily the channel is doped. Each of those changes the device, and therefore changes how well the network classifies. That dependency is normally broken by hand. A device engineer picks a figure of merit, maximises it in a physics simulator, and hands over a device. An ML engineer takes the device as given and trains on whatever arrives. Neither one ever sees the other's objective. This repository closes that loop with a derivative. It takes the classification loss at the far end and pushes it backwards through the spiking network, through the circuit that turns a device into a neuron, and into the device simulator itself, arriving at ∂L/∂ process parameters : a number for how much the classifier improves per nanometre of ferroelectric film. Then it runs gradient descent on those numbers and finds a better device. The last hop is the hard one. The simulator is Synopsys Sentaurus , a TCAD solver Technology Computer-Aided Design: the physics codes the semiconductor industry uses to predict how a device will behave before anyone fabricates it . It is a closed-source Fortran and C++ binary with no derivative of any kind, and it is driven from csh over an SSH hop to a CentOS 7 host carrying Python 2.7.5 and nothing else. So the gradient in this repository crosses three mutually unaware automatic-differentiation regimes none, PyTorch, JAX , that SSH hop, and that binary. Every forward value here is ground truth from the real solver. Only the derivative is manufactured , by directed finite-difference probes of that same solver: poke each input, watch how the outputs move, and assemble a Jacobian out of the answers. Descending that gradient took balanced cross-entropy from 1.3996 to 1.0177 and accuracy from 0.250 to 0.688 16 intra-patient beats; on the inter-patient DS2 test set, balanced accuracy is 0.302, see below , in 64 solver calls . On the device side the same descent widened the memory window the voltage gap between the two remembered states from 0.415 to 0.576 V , and paid for it in switching sharpness, 71 to 97 mV/dec . theta 4 fabrication knobs, normalised to 0,1 ^4 | G : R^4 - R^7 Sentaurus / DEVSIM. NO adjoint, and never will have one. v T1 sentaurus-fefet | T2 devsim-fefet, via T3 adjoint-shim y 7 figures of merit | H : R^7 - R^5 DPI transducer. Pure JAX, exact, free. v phi beta, g min, g max, th th, sig w | F : R^5 - R LSNN classifier. PyTorch. v L class-balanced cross-entropy Reading it downwards: theta is the four manufacturing parameters. y is the seven figures of merit , the summary numbers that describe how the finished device behaves memory window, switching sharpness, on and off conductance, and so on . H is the transducer, a small exact circuit model that converts those device numbers into the five parameters a neuron needs. F is the classifier, and L is its loss. An adjoint is the reverse-mode derivative that lets you run that chain backwards; a closed binary has none, which is what T3 exists to supply. A Tesseract is the unit of packaging this hackathon is built around: a component sealed in a container behind a fixed input/output schema and a standard set of endpoints, so that pieces written in different languages and frameworks can be composed and differentiated together. apply runs the component forward. abstract eval reports the shape of the output without doing the work. jacobian , jvp and vjp are the derivative endpoints, and a component that cannot differentiate itself simply does not publish them. vjp vector-Jacobian product is the one backpropagation needs; jvp is its forward-mode counterpart. | | Name | Wraps | Differentiation | Endpoints | |---|---|---|---|---| | T1 | sentaurus-fefet | Synopsys Sentaurus 2023.12, Preisach ferroelectric | none closed binary | apply , abstract eval | | T2 | devsim-fefet | DEVSIM 2.11.0 Apache-2.0 + clean-room Miller FE gate | none | apply , abstract eval | | T3 | adjoint-shim | trust-region finite differences + Broyden black-box adjoint | NumPy/JAX | apply , abstract eval , jacobian , jvp , vjp | | T4 | snn-lif-ecg | thesis LSNN 100 leaky integrate-and-fire neurons + 60 adaptive, delayed synapses on 2000 MIT-BIH ECG beats | PyTorch autograd | apply , abstract eval , vjp , jvp | T1 and T2 are the same device in two solvers, one commercial and closed, one open. T3 is the piece that manufactures a derivative for whichever of them is in play. T4 is the network, taken from the author's thesis rather than invented here, trained on beats from MIT-BIH, the standard public arrhythmia database. T3 proxies its forward pass straight to whichever oracle ORACLE URL points at, so the forward value is never a surrogate; only vjp is. The design vector is the four fabrication knobs: ferroelectric thickness, gate length, channel doping, interfacial-layer thickness. Remanent polarization and coercive field, the two numbers describing how strongly the film polarises and how hard you must push to flip it, are locked to the measured HZO film P r = 32 µC/cm², P s = 40 µC/cm², E c = 1.4 MV/cm and the optimiser refuses to move them. That restriction is the point, not a limitation. P r and E c are properties of a deposited film: you change them by depositing a different film and re-calibrating, not by asking a fab for a different number. An optimiser given them will widen the memory window by changing the material and present it as a design result. Every result here is obtained on one fixed film. The ECG number, and what it is. The headline accuracy 0.688 is measured on 16 beats 4 per class from an intra-patient split: a random 1664/336 split of 2000 curated beats, so one patient's beats can sit on both sides. The shared network is fitted on those same 16 beats, so 0.688 is not a held-out score. It is the number the optimiser improves, and it is only good for comparing devices against each other. Inter-patient re-baseline standard MIT-BIH split, de Chazal 2004: 22 records to train, 22 different records to test, paced records left out . Same 4-knob optimum, same network recipe, fitted on DS1 only and scored on DS2 only, nothing retuned on DS2. Balanced accuracy mean of the per-class recalls; 0.25 is chance for 4 classes is 0.302 , down from 0.688. The headline got worse, and it was never a held-out number to begin with. | DS2 recall | N | F | S | V | balanced accuracy | |---|---|---|---|---|---| | 4-knob optimum, fitted on DS1 | 0.878 | 0.010 | 0.008 | 0.310 | 0.302 | | start device, same weights | 1.000 | 0.000 | 0.000 | 0.005 | 0.251 | Beats per class N / F / S / V; Q too few to score : DS1 45,854 / 414 / 944 / 3,788 Q 8 ; DS2 44,246 / 388 / 1,837 / 3,220 Q 7 . For context, the same old network on its own 336 held-out intra-patient beats at the optimum scores 0.482 balanced accuracy, so the 0.688 was already optimistic before the patient split. The beats were cut from PhysioNet and delta-encoded again the thesis files carry no record id , so this is a re-encoding, not the thesis files. Script: scripts/inter patient ecg rebaseline.py ; numbers in results/runs/inter patient ecg rebaseline.json . Details and the full before/after: docs/D3 RECALIBRATION.md https://github.com/hozaifa1/differentiable-silicon/blob/main/docs/D3 RECALIBRATION.md . The four tiers differ in what you have to install and what you are allowed to run. Tier A needs nothing but Python. Tier B adds Docker. Tier C replays banked commercial-solver output with neither. Tier D is for readers who hold a Sentaurus license themselves. Tier A: no Docker, no license. The complete pipeline against an analytic mock oracle, in-process via Tesseract.from tesseract api . Proves every wire, every schema, every gradient hop. uv sync --extra snn --group dev && uv run pytest --extra snn is not optional: T4 is the PyTorch end of the gradient path, so torch is a requirement of Tier A, and uv sync --group dev alone leaves the test collection failing on ModuleNotFoundError: No module named 'torch' . Timed on a fresh clone into a fresh venv, not estimated: uv sync 74 s, then 352 s cold / 314 s warm for the 152 tests that run 6 skip without DEVSIM . The cold/warm gap is small because results/cache/mock/ is only 124 KiB. Nearly all of that time is the spiking network itself, 111 timesteps per beat in float64. Budget six minutes, not two. Tier B: Docker, no license. The solver moves into a container, and the machine running the pipeline stops needing one. Three commands, no login: docker pull ghcr.io/hozaifa1/devsim-fefet:latest tesseract serve ghcr.io/hozaifa1/devsim-fefet:latest --port 8101 -e MKL NUM THREADS=1 -e OMP NUM THREADS=1 -e MKL THREADING LAYER=SEQUENTIAL -e DIFFSILICON CACHE ROOT=/tmp/diffsilicon-cache The first three are not decoration. MKL picks its pivoting by thread count, and on a machine where that count is large the factorization inside DEVSIM dies with a divide-by-zero after Newton has already converged to 1e-13. The solves here are small, so one thread costs nothing. The fourth gives the container's cache somewhere writable. Without it the records are not kept and the returned values are identical. ORACLE URL=http://localhost:8101 uv run pytest tests/test tier b served.py -v Note what is not in that environment: no --extra devsim , no BLAS, no license. The solver is in the container; the host only orchestrates. Swapping the closed-source commercial solver for the open one is one environment variable. Nothing else in the pipeline changes not the shim, not the transducer, not the network, not the optimiser because sentaurus-fefet and devsim-fefet publish a byte-identical frozen schema. tests/test tier b served.py https://github.com/hozaifa1/differentiable-silicon/blob/main/tests/test tier b served.py is that claim tested across the wire rather than asserted: the served container's OpenAPI schema against the frozen one, the returned figures of merit against the values DEVSIM gave on the development machine 1%, on a different OS with a different BLAS underneath , a guard that fails if anything falls back to the analytic mock, and jax.grad all the way to dL/dθ with nine container solves in the middle. It runs on every push as the Tier B job in CI https://github.com/hozaifa1/differentiable-silicon/actions/workflows/ci.yml . That job pulls the published image with docker logout ghcr.io in front of it, so a package that quietly went private fails there, before it ever reaches you. All five images are on GHCR and public. The digests below were read with an anonymous pull token, so they are what an unauthenticated clone resolves too, and the devsim-fefet line is the exact image the green Tier B job pulled and ran the gradient through. Pin by digest, as ghcr.io/hozaifa1/