Two important themes of "Leiningen Versus the Ants" are self-reliance and individualism. Lieningen, the protagonist, has made his success on intelligence, choosing to think through obstacles instead of acting emotionally:
...Leiningen had met and defeated drought, Hood, plague... This unbroken success he attributed solely to the observance of his lifelong motto: The human brain needs only to become fully aware of its powers to conquer even the elements.
Throughout, Leiningen shows the ability to think and act for himself, instead of letting others choose his fate. He refuses to bow under the report of devastating ants approaching, and refuses to let the District Commissioner sway him from defense. Through it all, he chooses to rely on himself and his intellect, and wins through sheer willpower.
Second, but of equal importance, is the theme of individualism. Leiningen and the men who work for him fight against the ants by using their brains to make choices, instead of falling prey to collective hysteria. The ants are a perfect example of collectivism, having no goal further than destruction, and no strength by themselves; they fight and die as a group, and care nothing for each other:
Many thousands were already drowning in the sluggish creeping flow, but they were followed by troop after troop, who clambered over their sinking comrades, and then themselves served as dying bridges to the reserves hurrying on in their rear.
(Stephenson, "Leiningen Versus the Ants," classicshorts.com)
While the ants have numbers, Leiningen has reason, and is able to overpower them with nature's brute force, swayed to his will/. The ants are natural, and so is the river that destroys them; it takes only the power of the individual to recognize how two extraordinary forces can be used to cancel each other out.