Handwired
A development tool that manually translates JavaScript code into differentiable neural networks, expressing program logic with ReLU and weighted sums. The output matches the original code and is differentiable, with weights written by hand rather than obtained through training.
Timeline (last 90 days)
Cheng Lou's new project Handwired received 1313 stars less than two days after being released on GitHub, and the Twitter announcement post received more than 10,000 likes.
Handwired is positioned as manually translating JavaScript code into neural networks, requiring no training, with outputs exactly identical to the JS and fully differentiable, but no tool can automatically convert existing JS source code, so it must be translated manually.
In Handwired, a comparison operation is translated into a pair of ReLUs, and an if computes both branches simultaneously and then mixes them with a bit of 0 or 1.
Handwired's API requires declaring a value range and grid granularity for each input, and then constructs a comparison that holds exactly for every value within the declared range.
The author translated a shipping fee function containing five rules into a Handwired program, obtaining a network with 12 layers, 50 operations, and 81 weights, with zero error against the original function across 16,021,602 inputs.
After manually folding the if branches, the same shipping fee function was reduced to 7 layers and 37 active operations, with completely identical answers across 16 million inputs.
Handwired README's speed claims are aimed at batched evaluation on GPU, for example the JSON search demo processing 100,000 documents at a time.
In the Handwired network, the partial derivative of the shipping fee with respect to the per-kilogram rate is 2, with respect to the mid-tier price is 1, and with respect to all thresholds ($50 membership line, $100 line, 500 grams, 2 kilograms) is 0.
Handwired's documentation states that the comparison operation returns the derivative of a step function, which is zero everywhere except in gaps narrower than one grid step.
Using the program's own gradients and the Adam optimizer, a Handwired twin network was trained on 2000 random orders; when only prices were changed, by step 100 it had exactly learned 549, 949, and 350 per kilogram, with zero error.
5 more timeline events
All Facts (15)
The Handwired repository's tests require a Bun runtime environment.
50%UnverifiedHandwired is positioned as manually translating JavaScript code into neural networks, requiring no training, with outputs exactly identical to the JS and fully differentiable, but no tool can automatically convert existing JS source code, so it must be translated manually.
50%UnverifiedIn Handwired, a comparison operation is translated into a pair of ReLUs, and an if computes both branches simultaneously and then mixes them with a bit of 0 or 1.
50%UnverifiedHandwired's API requires declaring a value range and grid granularity for each input, and then constructs a comparison that holds exactly for every value within the declared range.
50%UnverifiedHandwired's issue #1 proposes solving the threshold unlearnability problem by estimating the gradient of each decision point near its flip position; in the two-column layout test it pushed the breakpoint from 500 to 699.9 (target 720), and the approach is currently still on a fork branch.
50%UnverifiedThe Handwired project's learned gallery demo shows a layout program with a small network embedded, with the network coefficients trained using the program's own gradients.
50%UnverifiedHandwired uses 32-bit floating point, which is sufficient for integer cents but risky for floating-point amounts.
50%UnverifiedHandwired README's speed claims are aimed at batched evaluation on GPU, for example the JSON search demo processing 100,000 documents at a time.
50%UnverifiedIn the Handwired network, the partial derivative of the shipping fee with respect to the per-kilogram rate is 2, with respect to the mid-tier price is 1, and with respect to all thresholds ($50 membership line, $100 line, 500 grams, 2 kilograms) is 0.
50%UnverifiedHandwired's documentation states that the comparison operation returns the derivative of a step function, which is zero everywhere except in gaps narrower than one grid step.
50%UnverifiedUsing the program's own gradients and the Adam optimizer, a Handwired twin network was trained on 2000 random orders; when only prices were changed, by step 100 it had exactly learned 549, 949, and 350 per kilogram, with zero error.
50%UnverifiedIn the same training, when the free shipping threshold was changed from $100 to $75 while prices stayed the same, the threshold stayed at $100 throughout 600 steps, the gradient remained zero, and the mean squared error went from 245,000 to 243,380 with almost no change.
50%UnverifiedThe author translated a shipping fee function containing five rules into a Handwired program, obtaining a network with 12 layers, 50 operations, and 81 weights, with zero error against the original function across 16,021,602 inputs.
50%UnverifiedAfter manually folding the if branches, the same shipping fee function was reduced to 7 layers and 37 active operations, with completely identical answers across 16 million inputs.
50%UnverifiedCheng Lou's new project Handwired received 1313 stars less than two days after being released on GitHub, and the Twitter announcement post received more than 10,000 likes.
50%