Cancellation and invalidity are two distinct post-registration challenges, each based on different grounds.
Cancellation proceedings are based on grounds that arose after registration: the mark has not been genuinely used in the EU for a continuous period of five years without proper reasons, or the mark has subsequently become the common name for the product in trade, or it has become deceptive.
Invalidity proceedings are based on grounds that existed at the time of registration: either the mark should not have been registered because it failed to meet absolute registrability requirements, or it conflicted with an earlier right that was not identified or opposed during the original proceedings.
A successful cancellation removes the trademark from the register from the date the cancellation is granted. A successful invalidity declaration removes the trademark retroactively from the date of registration, treating it as if it had never been registered.