As the emission source of the vacuum arc, cathode spots have a significant influence on the interelectrode plasma. The plasma distribution is directly influenced by the position distribution of cathode spots, which is further determined by the dynamic behavior of cathode spots. Under the transverse magnetic field, the most important behavior is the directional motion. In particular, the direction of movement can be changed. For a single cathode spot, it will move in the retrograde direction, i.e., in the anti-Ampere direction. However, for a group of cathode spots, things change so that they can move together in the ampere-force direction. Apparently, these two directions are driven by two different forces. This interesting phenomenon has attracted much research attention, but cannot be well explained and simulated. To solve this problem, this work takes into account the competitive relationship between the above two forces, and applies a clustering algorithm to detect the group of cathode spots. In this way, the simulation result shows a rotation of multiple cathode spots at the transverse magnetic field contact, which is quite consistent with the experimental observation.