What about the following suggestion?
The two first unit of valence for a metal have to be attributed to its first and second electron of its ns shell. But what about the following electrons of valence. The existence of rare gas compounds suggests that the xenon shell of the rare earths elements gives this valence state. A similar possibility can be considered for the transition elements for example with the Argon shell of the elements going from Scandium to zinc see “From Ln valence to that of nd”.