U.S. stocks edged lower on Tuesday, pulling back from modest gains on weakness in small-cap and momentum names after U.S. Federal Reserve Chair Janet Yellen expressed concerns about their valuations.

In the monetary policy report accompanying her Congressional testimony, Yellen said, "equity valuations of smaller firms as well as social media and biotechnology firms appear to be stretched."

The Russell 2000 small-cap index lost 1.1 percent and the Global X Social Media ETF dropped 1.9 percent. Facebook shares lost 2 percent to $66.55.

"She signaled in her comments about extreme valuations in biotech and social media. And that seems to be an addendum to her text," said Fred Dickson, chief market strategist at D.A. Davidson & Co in Lake Oswego, Oregon.

"It's very unusual for the Fed chairman to take a micro view of a specific industry group. Usually the comments are very top level. So I think the Fed is a little more in tune with what has been bothering the market. My thought is it's late, but not too late in terms of recognition."

According to the BofA Merrill Lynch Fund Manager Survey for July, 61 percent of global asset managers are overweight equities, the highest reading since early 2011, but 21 percent see stock markets as overvalued, the highest reading since 2000.

Wall St had posted modest gains in the early portion of trading on the back of earnings reports from JPMorgan Chase , up 4.2 percent to $58.64, and Goldman Sachs, up 0.6 percent to $168.09.

But fellow Dow component Johnson & Johnson lost 1.2 percent to $104.17. The diversified healthcare reported higher-than-expected quarterly results on sizzling sales of its new Olysio treatment for hepatitis C, but cautioned the pill will lose steam later this year.

S&P 500 profits are seen growing 5.2 percent in the second quarter, according to Thomson Reuters data, down from the 8.4 percent growth forecast at the start of April. Revenue is seen up 3.2 percent. S&P 500 companies reporting earnings after the close include Yahoo Inc and Intel Corp.

The Dow Jones industrial average fell 4.27 points or 0.03 percent, to 17,051.15, the S&P 500 lost 4.1 points or 0.21 percent, to 1,973 and the Nasdaq Composite dropped 26.13 points or 0.59 percent, to 4,414.29.

In a flurry of economic data releases, the New York Fed's Empire State index OF general business conditions rose to 25.60, the highest level since April 2010, from 19.28 in June and above the 17 estimate.

Retail sales rose 0.2 percent last month after an upwardly revised 0.5 percent advance in May, shy of the estimate calling for a 0.6 percent rise. However, core sales, which correspond most closely with the consumer spending component of gross domestic product, rose 0.6 percent for the month.

In addition, import prices edged up 0.1 percent in June, shy of the 0.3 percent estimate, after increasing by a revised 0.3 percent in May.