It has been shown recently that the dynamical V -band mass-to-light ratios of compact stellar systems with masses from 10 ^ { 6 } \mathrm { M } _ { \odot } to 10 ^ { 8 } \mathrm { M } _ { \odot } are not consistent with the predictions from simple stellar population ( SSP ) models . Top-heavy stellar initial mass functions ( IMFs ) in these so-called ultra compact dwarf galaxies ( UCDs ) offer an attractive explanation for this finding , the stellar remnants and retained stellar envelopes providing the unseen mass . We therefore construct a model which quantifies by how much the IMFs of UCDs would have to deviate in the intermediate-mass and high-mass range from the canonical IMF in order to account for the enhanced M / L _ { V } ratio of the UCDs . The deduced high-mass IMF in the UCDs depends on the age of the UCDs and the number of faint products of stellar evolution retained by them . Assuming that the IMF in the UCDs is a three-part power-law equal to the canonical IMF in the low-mass range and taking 20 % as a plausible choice for the fraction of the remnants of high-mass stars retained by UCDs , the model suggests the exponent of the high-mass IMF to be \approx 1.6 if the UCDs are 13 \mathrm { Gyr } old ( i.e . almost as old as the Universe ) or \approx 1.0 if the UCDs are 7 \mathrm { Gyr } old , in contrast to 2.3 for the Salpeter-Massey IMF . If the IMF was as top-heavy as suggested here , the stability of the UCDs might have been threatened by heavy mass loss induced by the radiation and evolution of massive stars . The central densities of UCDs must have been in the range 10 ^ { 6 } - 10 ^ { 7 } \mathrm { M } _ { \odot } \mathrm { pc } ^ { -3 } when they formed with star formation rates of 10- 100 \mathrm { M } _ { \odot } \mathrm { yr } ^ { -1 } .