1. A computer-implemented method of compressing a set of data, the method comprising: receiving, at a hierarchy of processing nodes, a plurality of input patterns included in the set of data; at each of the plurality of the hierarchy of processing nodes, generating for each of the plurality of input patterns in an inference phase subsequent to a training phase, a set of probability values associated with a set of sequences of input patterns based on sequences of patterns learned by each of the plurality of input patterns in the training phase, wherein each probability value indicates a likelihood that an input pattern of the plurality of input patterns has a same cause as a sequence of patterns learned by each of the plurality of hierarchy of processing nodes in the training phase; and at each of the hierarchy of processing nodes, assigning an index to each of the plurality of input patterns based on the set of probability values, the index indicating a sequence of input patterns learned by each of the hierarchy of processing nodes that is most likely to have a same cause with each of the plurality of input patterns.