I think your problem is in the drain pipes. If you have a partially clogged pipe just past where your drain connects to theirs, you'll get a temporary back flow. The stack on the drain may be clogged, too, helping to build up the odor. The stack is a pipe that runs to your roof to vent gas from the drain. Probably your common drain pipes need to be snaked out. You might be able to do this yourself with a hand snake if the clog is close your sink drain.
You say they are upstairs neighbors. Is this a house that used to be a single family home that was converted to apartments or an apartment house. Either way, it's really the landlord's problem, but if they are using a washing machine in a place it wasn't designed for, it will overload the drains and cause your backwash and no amount of snaking drains can fix that.