It is perfectly correct and I believe more adapted in cases where there is a slight difference between the two compared entities.
For instance, you would use but when there is an idea of opposition.
Phenomenon A is assumed to be generated by XXX, but this is still under discussion.
In contrast, you would use while when the opposition is compounded with some similarities.
In that case the use of while is a smarter way to emphasise a smaller difference within a broader background within which the two compared entities bear some similarities.
Phenomenon A is generated by XXX, while phenomenon B is [instead] generated by YYY.
Another way of achieving a similar effect is to use whereas or in contrast....
It's also probably worth noting that in this case while is not an adverb any more but a coordinating conjunction.