The mean size ( effective radius Re) of Massive Galaxies (MGs, Mstar > 1011.2Mâ) is observed to increase steadily with cosmic time. It is still unclear whether this trend originates from the size growth of individual galaxies (via, e.g., mergers and/or AGN feedback) or from the inclusion of larger galaxies entering the selection at later epochs (progenitor bias). We here build a data-driven, flexible theoretical framework to probe the structural evolution of MGs. We assign galaxies to dark matter haloes via stellar mass-halo mass (SMHM) relations with varying high-mass slopes and scatters ÏSMHM in stellar mass at fixed halo mass, and assign sizes to galaxies using an empirically-motivated, constant and linear relationship between Re and the host dark matter halo radius Rh. We find that: 1) the fast mean size growth of MGs is well reproduced independently of the shape of the input SMHM relation; 2) the numbers of compact MGs grow steadily until z âł 2 and fall off at lower redshifts, suggesting a lesser role of progenitor bias at later epochs; 3) a time-independent scatter ÏSMHM is consistent with a scenario in which compact starforming MGs transition into quiescent MGs in a few 108yr with a negligible structural evolution during the compact phase, while a scatter increasing at high redshift implies significant size growth during the starforming phase. A robust measurement of the size function of MGs at high redshift can set strong constraints on the scatter of the SMHM relation and, by extension, on models of galaxy evolution.