The reasoning is the conservation of leptonic charge.
Start with a free neutron : there is no lepton. It decays into a proton, plus an electron (which conserve electric charge; the electron is a lepton), plus an anti-neutrino (which carries negative leptonic number).
In the Feynman diagram
[URL]http://upload.wikimedia.org/wikipedia/commons/8/89/Beta_Negative_Decay.svg[/URL]
you can also see the lepton number "carried in" along the arrow by the anti-neutrino, and "carried away" by the electron. By the same token, the hadronic number is conserved along the d->u line. I hope the diagram is not confusing. The anti-neutrino is really outgoing with positive energy, it is represented as a neutrino in-going (backwards in time) with negative energy.