EXCLUSIVE

The famed producer behind Madonna's "Vogue" says he's getting the short end of the stick -- to the tune of half a million bucks -- because the record label's out for payback.

Shep Pettibone, producer extraordinaire -- who's worked with Madge, Janet Jackson, Paula Abdul and a ton of other artists -- says WB Music Corp owes him a ton of back royalties for the 1990 mega hit.

It appears everything was fine up until 2012 ... when Shep and WB were sued for allegedly jacking "Vogue" from someone else. In his lawsuit, Shep says they both came out victorious in that case, but the label spent a ton on lawyers -- more than $700k, according to docs.

The mega producer says WB's been withholding royalties since then to cover that massive legal bill. Translation: we forked out the dough to defend your song ... now you owe us.

Shep ain't buyin' that theory though, and says his contract with the label doesn't give them the right to hold back his "Vogue" dollars.