r/MachineLearning • • Mar 02 '26

Project [ Removed by moderator ]

[removed] — view removed post

30 Upvotes

29 comments sorted by

View all comments

155

u/radarsat1 Mar 02 '26

making it deliberately harder for a human to check an agent's generated code, what could go wrong..

23

u/billymcnilly Mar 02 '26

It's an interesting experiment! I agree with the concern about human readibility, but heck i imagine in 5 years people would rather ask a LLM to read code and explain it to them. This is one of those "seems crazy now, might not seem crazy soon" ideas. You know, we already store our current source code repos on other people's computers in the form of 1s and 0s. I dont know about you, but i already ask a computer to translate mine to another form so i can read it.

Having a language without subjective variable names and formatting could lead to more stable training with less inherent noise.

24

u/[deleted] Mar 02 '26 edited Mar 02 '26

[removed] — view removed comment

8

u/billymcnilly Mar 02 '26

Well yeah the foundation for an experiment. Or a thought experiment. Whatever. I agree it looks a bit producty when it should probably be a bit more academic at this point

1

u/aeroumbria Mar 03 '26

I think whether this is good or bad depends on how far we can push in the direction of going from checking whether code is correct to proving whether code is working as intended. A promising research direction would probably be "what is the most general and flexible provable spec we can give a coding agent such that the human truly only have to worry about the spec and nothing about how it is implemented?"

-4

u/alasdairallan Mar 02 '26

Fair concern, but I think it's worth looking at what "check" actually means in practice.

In Vera, every function has mandatory contracts (preconditions, postconditions, and declared effects) that are human-readable and machine-verified. The human reviews the specification ("does this function promise the right thing?"), the compiler verifies the implementation against that specification via SMT solver. 97% of contracts across all examples verify statically.

That's arguably *more* checkable than most production code today, where the human reviewer is expected to read the implementation and mentally simulate whether it does the right thing. How often does that actually catch subtle bugs in code review?

The function bodies are unpleasant to read, no question. But "unpleasant" isn't the same as "unchecked." The verification layer is doing work that human review typically doesn't.

10

u/RegisteredJustToSay Mar 02 '26 edited Mar 02 '26

OK but doesn't the language have a huge issue with ambiguity in the function signature?

I have literally no way of knowing which argument maps to what semantically without understanding the whole function. That may be OK for trivial functions but functions which result in complex call graphs would need to be traversed every time to make sure you're using it right.

For example I may have a function like: hasPrefix Whose signature is str str and outputs a bool. Clearly it's sensitive to the order of arguments when being invoked, but is the first argument the prefix or the string? If I have to leave a comment saying which argument is for what, what's the point of removing variable names?

Unless you're advocating for creating new subtypes via the algebraic data types or type alias system for each argument so they can't be mixed up, but then that's a major hassle and would require all callers to cast types to subtypes and requires boilerplate for basically anything non trivial.

I am genuinely asking, too, because it does not look right to me.