Boosting the Efficiency of Parametric Detection with Hierarchical Neural Networks