Wall Street has found a new love. It goes by the name of artificial intelligence (AI).

Many AI stocks have skyrocketed so far this year. The tremendous returns have caused analysts to scramble to up their price targets in quite a few cases.

But there are exceptions. Here are two AI stocks that Wall Street hates -- and why they could soar higher, anyway.

1. C3.ai

Only one stock on the market lays claim to "AI" as its ticker symbol. That honor belongs to C3.ai (AI 3.02%). And its shares have blown the doors off in 2023, vaulting more than 275% higher.

However, many analysts don't seem to think C3.ai can keep this momentum going. The average 12-month price target for the stock is 32% below the current share price.

Granted, there isn't universal negativity about C3.ai on Wall Street. Three of the eight analysts surveyed by Refinitiv recommend buying the stock, with two of them rating it as a strong buy. 

Valuation is no doubt a concern with the other analysts who aren't so bullish. C3.ai isn't profitable, so we can throw earnings-based valuation metrics out the window.

The stock, though, currently trades at more than 17x trailing-12-month sales. C3.ai projects sales growth of around 15% in its current fiscal year. That's not enough to justify such a steep price-to-sales multiple

2. Palantir Technologies

Palantir Technologies (PLTR 3.73%) stands out as another AI highflier. Its shares have more than tripled so far in 2023. Palantir stock is up close to 30% just over the last month.

That performance hasn't attracted many admirers for Palantir on Wall Street, though. The average price target for the stock is more than 40% below the current share price.

Three analysts recommend selling Palantir stock. They had the same view in June and July. Four others think that the stock will underperform the broader market going forward. Six analysts rate Palantir as a hold.

However, there are a few outliers on Wall Street who like the stock. In July, one analyst recommended buying Palantir with two others rating it as a strong buy.

As was the case with C3.ai, valuation is a problem for Palantir. Its shares trade at 21x trailing-12-month sales. The company expects that its revenue will grow by around 16% at the midpoint of its guidance range. That's not bad, but it's less than required to justify such a nosebleed forward sales multiple.

Why they could soar, anyway

Just because Wall Street doesn't view these two AI stocks favorably doesn't mean they will perform badly. Actually, they could both continue to soar, anyway.

Roughly 33% of C3.ai's stock float was sold short as of July 14, 2023. It's possible that good news for the company could result in a short squeeze that sends shares much higher.

Investors might not have to wait very long to receive some positive news. C3.ai should announce its fiscal 2024 first-quarter results within the next month or so. 

Palantir is scheduled to report its 2023 Q2 results on Aug. 7, 2023. Although it's not as much of a short-squeeze candidate as C3.ai, around 6.7% of its float was sold short based on the latest data. Better-than-expected Q2 numbers would almost certainly provide a nice catalyst for the stock.

There's also the general mindset of investors to consider. Fears of a recession appear to be waning. Inflation seems to be moderating. The Federal Reserve has stated publicly that additional interest-rate hikes could be on the way, but several Wall Street economists think rates won't go higher.

The ingredients for a "risk-on" market are in place. In such an environment, investors don't mind buying stocks that offer strong growth opportunities but come with greater risk.

Some Wall Street analysts might hate C3.ai and Palantir right now. However, there's nothing like continued success to change analysts' hearts and minds.