Generalization of learning by synchronous waves: from perceptual organization to invariant organization