I am a junior PhD student in electrical engineering and I need ideas about how to handle my mentor. Whenever I go to her with an idea she rejects it saying it is wrong or not interesting. But after a few months she comes back with a slightly modified version of my earlier idea and takes credit for the full idea. She asks me to do experiments with her version of my idea. Then when we have results, she publishes them in a conference (includes me as an author), but she gives the talk at the conference saying she came up with the idea and I only did experiments.
I don't want to stop working with her because I have been working with her for two years and leaving will set me back by at least one and a half years. Can you suggest how to avoid this?
I suspect the advisor is relative young and probably not fully even aware of the problem. Her perception of events may be completely different. She may feel that she contributed the essential part of the idea to make it valuable. She may not even remember that the idea came from you originally. But that does not mean that she shouldn't be corrected and give credit to you.
This can probably be solved by communicating with her, or by communicating with someone more senior, who could have a talk with her. Are there any annual progress meetings where this could be done?
Not dealing with the problem will only exacerbate it.
It's a common psychological thing that people treat their own ideas, and others' ideas, on a different grounding. And even there is a strategy of convincing people to make them believe that they genuinely came with the idea. The thing is that in academia, it's not only about "making things work" but tracking who came with the idea first.
I disagree with JeffE's "Don't walk. Run" (perhaps for the first time),
I would talk to her, especially referring to e-mails or something when you explicitly cam with this idea, but starting a discussion, not an attack.
Surely, there are chances that:
the idea was different (seemingly subtle differences are actually big), at least in her eyes,
she honestly forgot that she came with this idea (but it is also not that impossible, that she got rather inspired and not only you, but a number of guys),
she actively wants to get all/most of the credit (perhaps not that uncommon for a group leader, but definitely bad for you).
I would approach this the same way I would have done in any workplace:
In future, all proposals from you to her would be initiated by an email, with explicit copies to an external, personal email account of yours.
In the event of any offline conversations, write a summary of your discussion and send it to her (and yourself) in the form of an email - end the email on a note that this is a formal "notes of the meeting minutes", and that she should reply if there are any discrepancies in it.
In the extreme case, if all of the above do not work, write your idea in the form of a draft paper, submit it to arxiv, wait for it to get accepted (takes a couple of days I think), and then initiate the proposal (through an email, of course!)
To clarify, I wholeheartedly agree with JeffE - an adviser is your mentor for life, and if this is the foundation of your relationship, you should break it off ASAP (no matter how many years you lose - your peace of mind isn't worth it!). Also, note that while the above steps may stop her from plagiarizing your ideas, she would still be in a position of power and can screw you over in n different ways (your defense, recommendation letters, feedback on faculty hiring committees etc). So, use my suggestions in the short-term till you find a different mentor!