Experience is based on how many of what type of units you kill. This thread shows the experience values of each unit...
http://bbs.evony.com/showthread.php?t=97972

I hope that helps.

edit: Here's the key part of the post that you are interested in...
As you all know (I hope) the most common way to get experience for your hero is to send him/her on an attack. Thanks to a post by captain virk, with information from aom12, and I have also tested this information as well. In order to find out how much experience your hero will get multiply the number of troops you KILL in battle, not the total amount of troops lost on both sides.

Worker - 2.25
Warrior - 3.05
Scout - 6.95
Pikeman - 9
Swordsman - 13.5
Archer - 13.5
Cavalry - 28.5
Cataphract - 87.5
Transporter - 29.75
Ballista - 100
Battering Ram - 137.5
Catapult - 290
Trap - 8.75
Abaitis - 16.75
Archer's Tower - 54.5
Rolling log - 63
Defensive Trebuchet - 166
4.5 million experience is just over 15,000 catapults. That could easily not be 10% of an army. I doubt it would even be 10% of your total units.