Detection of random signals with neural networks