  It has been known that heterogeneous networks are vulnerable to the
intentional removal of a small fraction of highly connected or loaded nodes,
which implies that, to protect a network effectively, a few important nodes
should be allocated with more defense resources than the others. However, if
too many resources are allocated to the few important nodes, the numerous
less-important nodes will be less protected, which, when attacked all together,
still capable of causing a devastating damage. A natural question therefore is
how to efficiently distribute the limited defense resources among the network
nodes such that the network damage is minimized whatever attack strategy the
attacker may take. In this paper, taking into account the factor of attack
cost, we will revisit the problem of network security and search for efficient
network defense against the cost-based attacks. The study shows that, for a
general complex network, there will exist an optimal distribution of the
defense resources, with which the network is well protected from cost-based
attacks. Furthermore, it is found that the configuration of the optimal defense
is dependent on the network parameters. Specifically, network that has a larger
size, sparser connection and more heterogeneous structure will be more
benefited from the defense optimization.
