LLM-assisted coding is not deterministic. Does it matter?

6 points by vrypan


freddyb

This roughly aligns with my experience in both writing as well as analyzing code. Finding objective criteria (e.g., tests) can provide a stop gap for slop and hallucinations while only allowing valuable code to go through. Also helps focus user/human effort in what is truly valuable.

Corbin

Physics isn't deterministic. You were closest when you mentioned that chaotic systems diverge at an exponential rate from initial conditions; autoregressive language models diverge at a rate that is exponential per token. There is a barrier for each of the systems you've listed beyond which our predictions degrade into noise regardless of the quality of the underlying model: solar-system orbits are only predictable for about ten megayears, weather patterns for about two weeks, and dice (vigorously shaken in a cup) for about ten seconds.

How fast do LLMs diverge? That would be a very interesting question to study! Previously, on Lobsters, we noted that LLMs are (among other properties) sensitive to variance in initial conditions, so there ought to be an empirically-measurable Lyapunov action of some sort, but I can't find any papers which give precise numerical estimates. Personal experiments suggest divergence is at its worst after as few as ten thousand generated tokens on 3.7B parameters. Of course, force-feeding tokens from any sort of steering, harness, or conversation will more-or-less reset the state to new initial conditions, so this is a surmountable architectural obstacle.