This is the 4th instar of the eastern tiger swallowtail (Papilio glaucus). I photographed it one recent evening in the woods after a late afternoon rain. It was climbing up the wet trunk of a young beech (I turned the picture sideways for your viewing pleasure).
According to Wagner (Caterpillars of Eastern North America, Princeton Field Guides, 2005), the graded lightening of the sides of this caterpillar's body from the top to the bottom is an example of countershading. This makes the parts that would receive less light appear about as light as the top receiving more light, thus rendering the caterpillar more uniform in color and, consequently, more difficult to be detected by visual predators, such as birds.
And, of course, this is what the adults look like.