High-order behavior in learning gate networks with lateral inhibitions