Emergence of associative learning in a neuromorphic inference network