  We present a study on the physical properties of compact star-forming
galaxies (cSFGs) with $M_{*}\geq10^{10}M_{\odot}$ and $2\leq z\leq3$ in the
COSMOS and GOODS-S fields. We find that massive cSFGs have a comoving number
density of $(1.0\pm0.1)\times10^{-4}~{\rm Mpc}^{-3}$. The cSFGs are distributed
at nearly the same locus on the main sequence as extended star-forming galaxies
(eSFGs) and dominate the high-mass end. On the rest-frame $U-V$ vs. $V-J$ and
$U-B$ vs. $M_{\rm B}$ diagrams, cSFGs are mainly distributed at the middle of
eSFGs and compact quiescent galaxies (cQGs) in all colors, but are more
inclined to "red sequence" than "green valley" galaxies. We also find that
cSFGs have distributions similar to cQGs on the nonparametric morphology
diagrams. The cQGs and cSFGs have larger $Gini$ and smaller $M_{20}$, while
eSFGs have the reverse. About one-third of cSFGs show signatures of
postmergers, and almost none of them can be recognized as disks. Moreover,
those visually extended cSFGs all have lower $Gini$ coefficients ($Gini<0.4$),
indicating that the $Gini$ coefficient could be used to clean out noncompact
galaxies in a sample of candidate cSFGs. The X-ray-detected counterparts are
more frequent among cSFGs than that in eSFGs and cQGs, implying that cSFGs have
previously experienced violent gas-rich interactions(such as major mergers or
disk instabilities), which could trigger both star formation and black hole
growth in an active phase.
