In my opinion, attack is the best stat for an abstract hero, so that, as has already been said here, they can defeat the enemy faster... but on the other hand, +1 to attack is +5% damage, while increasing knowledge by 1 at the beginning of the game significantly (sometimes by 2 times, in the case of a Warlock) increases the amount of mana, and that is much more important.
Conclusion: at the beginning, knowledge is still more useful...
Added after 43 seconds
...and in general, attack.
Auto-translated