Unproductive to roll against vastly superior BJJ players?
You're right that youre probably not getting a lot out of those rolls because they are just too far ahead of you. Try to make them better by ASKING THEM how you could have done better every time you get submitted.
I think it's important to build on your knowledge of jiu-jitsu and make sure you have a solid grasp of the basic fundamentals. You would be surprised at how many people with your level of experience don't know how to do a simple hip escape from the mount. This is usually the fault of the instructor in not providing an easy to follow curriculum for his student to follow. The instructor also needs to make sure his students actually know and can perform such techniques even if only in demonstration.
Keep in mind that upper belt is training too. Sometimes I beat the crap out of lower belts, but GENERALLY I let them work and use it as opportunity for me to work certain things (like guard retention or back escapes). So if for example they are using correct technique on a guard pass I may let them pass...then work restoring guard.
If you're just catching random purple, brown and black belts once in a while and they're just destroying you you're right, it can be hard to find the value in it. However, if you don't shy away from the upper belts and roll with them every chance you get, chances are you'll earn their respect and develop a rolling relationship with them and they will start to roll with you in a way that is beneficial to you and them.
I know the feeling well being just a 2 year white belt. But like others have already said once you change your mindset into a learning type mindset. At first it was frustrating because you seem like just a grappling dummy for them. Once I started asking questions however every higher belt I roll with is eager to offer suggestions/guidance. Sometimes during the roll sometimes after. I have found it to be very valuable for my type of learning. It especially helps me to pay attention to what they are doing to me to understand what I should be doing should to others.
You will get better rolling with the best people. The phrase "small victories" should pop up in your head after every roll. Every roll try to gain an inch.
You have to ask yourself the right questions though, it's not "why can't I beat him" it's "why can't I undue his left handed grip" etc. Ask, research, try again, fail, repeat, possibility succeed.
Sometimes upper belts are douchey. Sometimes they are responding to your douchiness. In general, if I'm rolling against someone who is vastly inexperienced and is reasonably cool, I'll give them room to work and play a lot nicer. If the person comes in super aggressively, I won't GIVE them anything and instead will work hard to frustrate and thwart everything.
I'm wondering if maybe they aren't responding to how you're approaching the roll. It might be worth a talk. Perhaps they have the philosophy that it's their chance to shut everything down or really do crazy stuff, or perhaps they simply aren't aware, or perhaps they honestly don't want to roll with you and are trying to stop you asking? All are possible, so it's impossible to know without actually seeing what's going on.
I don't hesitate to roll with black belts, or anyone higher ranked than me. The brown belt coach goes hard against me (possible I actually bruised my diaphragm from his KOB) but I know why - it's because my black belt coach wants me to be more aggressive and try harder, and prior to this, it was more akin to just hanging out and lightly training. For me, it's productive. However, he doesn't roll that way with most other people. He tailors it to them, as does our black belt. That's what makes me think either they are responding to something you're doing or they don't want to roll with you or they are just being thoughtless.
If nothing else you have learned you have a LONG way to go.
Victory against someone vastly superior is measured differently - it took 2 minutes instead of 40 seconds for them to submit me - that's a victory for your progress.
Never be afraid to ask what should you have done. Some people are douches and won't ever be helpful, others may be the nicest people but are having an off day and you did something unintentional and they took it wrong (happened to me).
Anyway keep showing up and roll with higher belts when you can.