The physics of actual recoil is simple -- shot mass(and powder mass, if you're being precise) x velocity vs. gun mass(weight). Smaller shot charges, slower velocities, and heavier guns all reduce recoil. So if you're shooting 1-ounce loads at the same velocity in a 12 and a 20, and the 20 weighs a pound less, it's going to recoil more.
FELT recoil is much more complex -- action type, gun fit, shooter size and skill, recoil pad selection, noise level, and many other factors are involved. A gas-operated semi-auto will usually have less felt recoil than a pump or double. The semi spreads the recoil impulse out over a longer time.
For the same shot weight, the larger diameter of a 12 supposedly produces slightly better patterns.
Clay target shooters usually prefer heavier guns to minimize recoil, as do waterfowl folks who hunt from blinds. Upland hunters who walk more than they shoot tend to prefer lighter guns.