I’m not sure that’s entirely correct. I’m most certain about the last part.
Specializations have evolved many times and across many different lineages, and to say that non-specialized ants are more closely related to the ancestral species ignores the evolutionary history that separates all the extant lineages.
Also, how do you define specialization? If you mean large, eusocial colonies, that’s primarily where these fertile workers can be found, particularly in colonies under stress. But I wouldn’t call a large colony like that more specialized. If anything, the smaller colonies that mutualize with plants are more specialized, (although that is partly due to heavy control by the plants themselves.)
EDIT: I don’t want this to sound aggressive, I just want to understand where you’re coming from so I know we’re on the same page when it comes to how we describe specialization or colony size.