Hacker News new | ask | show | jobs
by Avalaxy 1978 days ago
Using a neural network for things that have clear cut rules is wrong. When you know the exact rules, implement them as such, instead of bruteforcing a guesstimation. This is also why I'm sceptical of the usr of GPT-3 for all sorts of purposes where accuracy is important. Think of the code generation case. Bugs may be very subtle and may go unnoticed.
9 comments

I once (2010) had an oral exam in neural networks during which I had to design a system to solve a particular task. My solution used two neural networks connected by a simple logic circuit. The professor, who was actually a neuro scientist with little understanding of the technical, asked why not a third neural network. This was a neural network course, after all.

Thinking this was a trick question I excitedly explained how stupid it would be to build and train a network to approximate a function which could easily be precisely described with a tiny circuit or code statement.

The professor was not amused. He said that's what he would have done. After a few similar incidents he concluded the exam giving me an 8/10 saying my answers were perfectly correct but he didn't like my attitude.

Yeah, there’s a better way of saying that and it sounds like that was an expensive lesson in communication.

“Something something, it’s better to spend training time on the parts of the network where we don’t know the function beforehand than to train a subnetwork to do a function that we do know exactly at the outset.” and still you need to be ready to be asked about how to backpropogate through your hard coded function.

It's a test, you shouldn't have to sugar-coat explanations to an instructor (unless you're acting out some other scenario as part of the test).
In a test you have to prove your knowledge by transmitting symbols through language. If you don't "sugar coat" it, how do you expect that the right symbols will be interpreted by the receiver? It is part of the test to use the appropriate language to ensure the best understanding of what you are saying. Nonviolent communication tries to do exactly that and is essential to this end.

You can argue that since the professor understood what was being said, the language shouldn't matter, but it does. If again you don't use the correct language you risk offending the listener so much he can't get past that. After all you are dealing with humans, not machines, and in either case you are responsible for clear communication.

And the contrary view is that the professor has a pronounced responsibility to see past unfortunate framing and phrasing of intricate subject matter details. Both are worthwhile goals, I think.
In my university there's a professor that has an awful attitude towards students when taking exam, outright making them feel stupid (without saying anything, just from gestures and body language)... The plot twist is he does this on purpose. Many times he'll just give a passing grade, but the experience of taking an exam with him is terrible.
Don't get me wrong, I hate how university handles exposition and evaluation of subjects. It encourages exploitation of memorization and test solving techniques instead of focusing on the quality of the subject.

However, life is very rarely optimal or fair. The only effect we can productively have on the world is through how we approach it, instead of focusing energy on how our actions are interpreted. It is unfortunate, but that is the most logical outcome. Focus on yourself, not on others.

There's actually more to the story than what I intended to share to begin with.

I usually get along well with teachers and have enough tact to make do when I don't. But this person was such an extreme case. He was always grumpy, would regularly take several minutes out of lectures to call out and belittle any student who was late or he didn't think was paying attention. The only times he wasn't sour was when he was describing unethical and torturous experiments on animals. Then he was overly excited and giddy.

The exam was, as was common at that university, essentially an essay which was then reviewed by the examiner who would ask for any clarifications or push with further questions. This exam asked us to describe a system solving a fairly standard AI task using neural networks. My answer was a few pages split into a few sections: a brief overview of the whole system, followed by detailed descriptions of each part. Wherever I skipped details in the overview I'd written "(see p. X)". It took a bit of planning to get those numbers in there when writing that by hand with limited time.

When I finally gave the answer the professor skimmed through the overview and then proceeded to berate me for having neglected to write about some important detail. I politely pointed out that it was in the following section and that I'd included a page reference for things which I referred to before defining. He grumbled and kept skimming. After a while he complained about another thing he thought I really should have explained which was missing. I told him on which page he could find it and politely reminded him that he was reading the overview and that the details were in the next part.

This went on for a while and I got a bit more annoyed and a bit less polite each time, because it was getting ridiculous. After the tenth or so time I flat out told him that if he'd read past the overview, like I kept telling him, he'd find all the details there and if he didn't want to I'd be willing to describe any part of it orally but really, it is all there if he would just read it instead of complaining.

That's when he asked the question about a third network and I, still very frustrated, was relieved to get an actual question, and I was certain it was a trick question trying to get me to say I didn't think of it and then he'd call me an idiot and explain why it was unnecessary. I was really surprised it wasn't a trick and frankly a bit delighted at inadvertently insulting him.

When I told my wife (well, girlfriend at the time) she was a bit shocked that I'd been rude to a professor, but I didn't need those points and while it was very out of character for me I never regretted it.

For code, I could see it being super useful for a beefed up auto-complete. There are many times I find myself searching for things like "how do I do X in Y language" to copy a snippet that I'm sure has been written 10000x times before. I can review the code and verify its correctness by writing tests.
Either OpenAI or Microsoft demoed something similar to this some time in theist 12-18 months.

The fact that it’s not released (and also the fact that GPT-3 etc are still not publicly available) makes me suspect that these models are far too unstable for actual production use. It’s also why I’m getting a bit tired of these overhyped cherry-picked samples with seemingly nothing solid to ever back it up.

> I’m getting a bit tired of these overhyped cherry-picked samples with seemingly nothing solid to ever back it up.

Most of the times a "fantastic GPT-3 result" is shown, you have to dig a bit and then you'll find out how it was primed[0] and how many different texts they had it generate. Then the one(s) carrying out the experiment go on and pick the most shocking writings. If you read all of the outputs (there are a few articles around that show you 5 or 6 different outputs) you'll see the variations that it took duing those. I understand that 5 or 6 is actually small, to get shocking results they usually go into de dozens of tries.

[0] usually the priming phrases are given, but depending on how much of a snake-oil-salesman the person writing/giving a talk is, they may even hide this part

I use tabnine and it does a pretty nice job by using AI to re-score the outputs of (language-server + similar-words-in-codebase).
They are too expensive to run - hundreds of GB of GPU memory - so they can't be deployed for the public at large yet, kind of like the SGI workstations from 20 years ago. You can do that and more for cheap today, but not then.

I think we can get models about 1/100th the size for general use. That's also the main reason Google is developing TPUs.

> They are too expensive to run - hundreds of GB of GPU memory - so they can't be deployed for the public at large yet, kind of like the SGI workstations from 20 years ago. You can do that and more for cheap today, but not then.

I don't buy this. OpenAI literally released pricing for GPT-3, so either they grossly miscalculated their cost base (unlikely) or there's some scaling/instability/resourcing issue preventing them from doing so (much more likely).

I think it's telling that they spent the last 6 months on yet another flashy demo (DALL-E) rather than actually productionizing GPT-3. It just feels like constant smoke and mirrors.

You’re (sadly) assuming everyone would verify its correctness. Proper programming would mean one would write tests, but not everyone does. I’m guilty of it too.
Just have GPT-3 produce the tests too! :D
Please don't give the MBAs ideas.
When banks got ATMs, they thought it'd drastically cut headcount - instead it went _up_: freeing up time from doing the basics meant you had more time to focus on more profitable activities

I hope to live long enough to be mostly writing tests for a gloriously hacky code generator that gets it right 80% of the time

tests and specifications / prompt engineering
GPT-3 is a generator, that's just half the equation. It needs a discriminator (critic) to check out its outputs and in the case of program synthesis and realistic physics, a simulator. That's how humans do creative stuff - generate silly ideas then check them out.
Sounds like maybe a GAN-like ML algo could be a good choice for attempting to do code generation.
This is not like we are asking GPT what is 2 times 3. It is not even a bug. Just that the author is using quantized multiplication which takes subset of floating point space and just makes all the value closest to nearest point. So 2 can be approximated as say 2.5 if there are few points. And that is not deterministic. Also it is a known thing that something like that could occur. It is just that neural network still seem to learn.
I see where you're coming from, but given the (usual) flexibility and generality of neural neys, it's often very tempting to assume that you can just keep adding data, and I think these are good reminders that being able to do complicated things doesn't mean they can do simple things efficiently (which is a conversation that has come uo several times at work)
How is it that human brains can follow deterministic logic but neural networks can't? What's the missing piece? Is it just that people are a lot more complex than algorithms like GPT-3?
That's essentially like asking "how is it that human feet can walk up mountain slopes, but car wheels can't?"

That is, there is no relation between human brains and artificial neural networks, other than them serving similar purposes in particular environments.

I respectfully disagree - I believe this is a philosophical viewpoint that shouldn't be presented as a straightforward truth.

Unless you are a dualist, I would say that it's reasonable to view that it is in principle possible to produce an artificial network accurately emulating the function and behavior of a human brain.

If you are a dualist, then there is no further discussion to be had as we are very unlikely to ever be able to prove anything like the existence of a soul.

Apologies if you were speaking to some more subtle nuance that I was unable to pick up.

TL; DR: I'm saying that there is no structural resemblance between the human brain and artificial neural networks specifically (even though there likely is a strucutral resemblance between the human mind/brain and a computer in the general sense). You can believe in AGI and not believe it will be achieved with ANNs.

> I would say that it's reasonable to view that it is in principle possible to produce an artificial network accurately emulating the function and behavior of a human brain.

I think that claim is far too strong. As a non-dualist, I do believe that it is possible to create an artificial "brain" that has the same cognition as a human brain. However, simply rejecting dualism does not tell you anything about what the artificial brain has to be.

You can further say that a non-dualist who accepts the Church-Turing thesis must accept that there must exist a Turing machine which has the same cognition as the human brain. Since the PCs we use are Turing machines, it follows that we should be able to program one to behave like a human brain, in theory at least (disregarding hardware requirements, of course).

Still, that does not mean that a brain Turing machine has to look anything like a neural network trained through gradient descent & back propagation. This was my point: artificial neural networks and the methods we use to train them have no resemblance to the human brain, and there is no reason to believe that they are the way to create an artificial general intelligence. So, there is no reason to be surprised that a neural network, especially one as small as any of the ones we have realized so far, doesn't exhibit complex properties of the human brain.

Artificial neural networks are just a statistical model that was once inspired by a very, very simplistic idea of what biological neural networks are. As we have discovered more about biological neural networks, we've abandoned any notion of comparing ANNs with biological neural networks in terms of actual structure.

This is all not to say that it's impossible for a complex enough ANN to actually be an AGI. It's just not going to be that surprising if it won't be, if an AGI program will look significantly different, and will be trained in completely different ways.

Human brains can just barely follow deterministic logic. Computers are many orders of magnitude better at the task.

It's probably layered on top of fuzzier tasks we're better at.

Maybe a sufficiently advanced iteration of GPT could do deterministic tasks as slowly and unreliably as we can.

This is a very interesting question that I've been thinking of as well. Why can't neural network based AI learn deterministic logic? I think because it doesn't have internal representations inside its "head" so to speak. It does not know that it can manipulate such structures as we can.
Human brains make logic mistakes all the time.
This is good reason to stick with use cases where a human can verify the results, like autocomplete or something like a search engine interface.
This is a great way to find out if you are talking to a bot or not :)
Code generation only needs to generate code with n bugs where n is less than the number of bugs a human developer generates for it to have usefulness, and maybe some other factor of severity where they are generally less severe than human developers. I think it'll make neat autopilot functionality for developers but not replace the need to have someone look over and understand the code.
This is a very simplistic of what code is and the role it plays in a system.

There are many implementations that can fulfill a set of requirements. Not all of them are created equal. The ways in which they behave as the system changes can be wildly different. Well-written code will be able to handle those changes gracefully. Poorly-written code may end up proving brittle and bug-prone. Generated code will be completely unpredictable.

Imagine you're trying to build a street network for a city. Some designs are much more predictable than others. If you've played Factorio, the distinction between a spaghetti base and one that has some design is abundant. Even if they currently fulfill the same requirements now, the ability to improve upon and reason about how it will behave after changes is vastly different.

I don't know what you're arguing against but it sure isn't what I wrote.

"Code generation only needs to generate code with n bugs where n is less than the number of bugs a human developer generates for it to have usefulness, and maybe some other factor of severity where they are generally less severe than human developers."

Point to the part you're arguing against because you way extrapolated what "have usefulness" means I think.

It's of limited usefulness if it just leads to a system that will end up performing worse / less predictably.
This is a perfect satire of the logic people use to advocate self driving cars being rushed into production.

Only every time I read something similar, I think "surely no programmer could think this". Are you a programmer?

I sure am, and if I can code gen 90% of the boiler plate away I'll do it happily. Besides attacking me, do you have any point you'd like to make?
Do you want to die when your self driving car crashes? Debug issues when your app des at 12am? Same concept.
I don't want to die when I crash my own car, and I already debug my own apps at 12am. If your argument is that things need to be perfect than my god you must never leave your home! I'd trust a machine to drive more accurately than most people I see on the highway.

Humans aren't special, in fact more often than not we're sloppy, subject to fatigue, and a whole bunch of other negative things.

That considered, I had a pretty strict qualifier in my above post which means the machine must perform better than the average human in the respective task and therefore I'd be more likely to die driving my own car than a machine meeting my prerequisites.

> I'd trust a machine to drive more accurately than most people I see on the highway. Humans aren't special, in fact more often than not we're sloppy, subject to fatigue, and a whole bunch of other negative things.

Humans are much, much, much more capable than the absolute state-of-the-art robots when it comes to doing things in an uncontrolled environment.

https://www.youtube.com/watch?v=g0TaYhjpOfo

This is naive. The point is that code is a well defined system with clear rules that can be expressed through logic and mathematics. GPT is suited to approximate systems where the rules are not well defined. Until AI can actually learn the principles of logic, it may not be useful for code generation on a meaningful scale, other than things just like simple auto-completions.

Not only that, AI would also have to learn the principles of system design, performance, security, readability, maintainability. That's what makes "good" software. It's a far stretch to say that AI could achieve anything of the sort based on current abilities.

Good thing I didn't say it would, I'm really not sure what you think I wrote.
Your only metric of "good" code generation is # of bugs. My assertion was that this is not accurate.

I also disagree with the premise that code generation by AI will be very useful for programmers, for the reasons stated above.

It's clearly not if you read the rest of that sentence, that's my metric for it to be useful. My metric for it being good is much deeper. Which is why I questioned what you responded with.

We are already at the point of useful and context aware code generation anyway which is why I've found everyone on this thread questioning it to be kind of funny, Microsoft was demoing complex generations a year ago. So we're well on our way.

https://www.pscp.tv/Microsoft/1OyKAYWPRrWKb?t=29m19s

https://www.infoworld.com/article/3518429/jetbrains-taps-mac...

I disagree that that is enough to be useful. To give a deliberately extreme example: if it produces code which has half the number of bugs as a human, but it only outputs Malbolge source code, nobody else will be able to fix those bugs which remain.