Ants flexibly change their behavioral modes at various levels, from individuals to whole colonies, based on external stimuli, such as finding a new food source or being attacked by predators. In this study, we investigated mode changes in the foraging behavior of garden ants, Lasius japonicus. When extracted pheromone was deposited along a circular path connected to the nest entrance and no food was supplied, a large fraction of the ants continued to walk along the path. In contrast, if a food source was placed on the same circle at the opposite edge to the nest entrance, a large fraction of ants soon came to shuttle directly between the nest and the food source using a shortcut path. We analyzed the process of shifting the foraging path from the initial circular path to the shortcut path, and found that the foragers who reached the food source in the initial stage along the circular pheromone path chose the shortcut path for their homing instead of the circular path; thereafter, the traffic along the shortcut path gradually increased both in the outward and homeward directions. This strongly indicates that the ants changed the foraging mode after the food-intake from the pheromone-following mode to another mode. The present result serves as an example of the switching of collective behavior of animals caused by that of the primarily relying information for individuals according to the input of external stimuli.