Pattern recognition with neuronal avalanche dynamics