Critical and resonance phenomena in neural networks