Create

Sign in to ReadmeX

or

How we handle your data: Privacy Policy

ReadmeX

Your AI reading companion

What would you like to catch up on?

Pick a briefing, or ask your own question.

Your community and people briefings stay personal to you.

Story

Codex Builds a Readable Handwritten Digit Recognizer

AI summary

A community experimenter asked Codex to create a digit recognizer for mouse-drawn input on a 32×32 grid, with fixed weights and hand-written geometry rather than an optimizer. The final 808-line Python program recognized 1,709 of 1,797 scikit-learn handwritten-digit samples after resizing and preprocessing, scoring 95.10%. However, the experimenter revised rules after inspecting labeled errors on the same samples, so this was a development score rather than independent validation.

In-depth insight

The experiment demonstrates that Codex can produce a substantive, human-readable coding project, while its revised rules on the evaluation set mean the reported accuracy should not be treated as evidence of general performance.

I’d read that LLMs can write neural-network weights directly, and I wanted to see what that meant in practice. So I asked Codex to build a recognizer for digits I could draw with my mouse on a 32×32 grid. It could design the weights and write rules, but it couldn’t use an optimizer or use benchmark drawings as templates. Codex started with pen strokes. It wrote formulas for different ways of drawing each digit, varied their slant and thickness, and simulated what happens when a coarse scan makes a small gap disappear. Each synthetic drawing became a detector: a numerical vector that scores how closely a new drawing matches it. The final recognizer combines fixed detector weights and hand-written geometry. The first version scored 66.4%. The final one got 1,709 of 1,797 correct (95.10%) on scikit-learn’s handwritten digits, resized from 8×8 to 32×32 and converted to black and white. The recognition code, including weight generation, is 808 lines of Python, about 35.6 kB. We inspected labeled mistakes and revised the rules on those same 1,797 drawings, so 95.1% is a development score. What I wanted to find out was whether Codex could turn a visible difference between two digits into a detector I could read and understand. I set the challenge and tried it with my own handwriting. Codex wrote the code and ran the evaluations. You can try it yourself with uv run draw_shapes.py. https://github.com/jesper-adolfsson-001/digits-by-hand submitted by /u/GenJeppo [link] [comments]

#Codex#scikit-learn handwritten digits dataset

Original · 1 min readRead the original
Group chat

No comments yet. Start the conversation.