I believe certain fish have memories capable of recognizing individuals. My experience with this has been in freshwater. At one time I had numerous tanks with large cichlids. In one tank a female managuensis paired up with a smaller male labiatus. Eventually, I located a large male managuensis that I paired her up with, in their own tank. Around a year later, As my passion for the marine increased, I was forced to combine various tanks of fish. Immediately upon placing the pair in with the labiatus, the female quickly(<1 hour) reestablished her bond with the labiatus and they started to beat on the larger, typically much more aggressive male managuensis.
Along similar lines, I've often noticed that if I have to remove a fish due to aggression, It often can never rejoin the community it was removed from, even after reaching full size. They always seem to get beat on relentlessly, as if the others remembered that they were able to "chase it off" before.
Just my experience.