It's not "ghost producing". You're creditted accordingly.
Say you make a sampled beat on MPC. You pass the beat on to a "producer" who arranges and sequences it into a song while adding instrumentation from keyboard, guitar, ect at key moments. He "produced" the song, you did Drum/sample programming.
Say you make a beat from scratch on a Motif or in Reason. You give the beat to a "producer" who beatboxes over the song, rearranges it in key places or even just adds a few hihats to it. He "produced" the song, you were the "keyboardist" on the record.
The biggest problem I have with this isn't the credit, it's the pay. You're doing nothing "right" to end up a 'ghost producer", you're being raped for your talent. You get B.S. work for hire pay for a big name producer to take your work that he added to and turn around and resells it to an artist for $20k(in this day and age, $50-200k in the good ol' days).
If your contracts right, you'll get splits and it's all good, but usually when you're not labeled as the "co-producer"(which you certainly are), your splits...lol, what splits?
Industry 101.