Well, neither are complete sentences. They are fragments. Without a complete sentence, it is difficult to determine which is correct. However, I would wager that the first would win.
It is not possible to be completely certain without seeing the whole sentence, however, because the version with "compares" would work in some contexts.
There are some regions in the Middle East, however, that receive some rain during the year, sometimes more than 50 inches, compared to the desert's 4 inch average.
It is correct. Compared to is very commonly used in this way. It becomes clearer when the omitted words are included:
There are some regions in the Middle East that receive more than 50 inches of rainfall, (which can be / as) compared to the 4 inch average in the desert.