English Teachers are like MS Word's grammar checker. They should be used but not trusted.
You are correct that the first statement needs no comma before rather. Here, the expression rather than [to] a restaurant is essential information for understanding the statement. It also describes or explains grocery store, again indicating it's importance.
Commas separate parts of sentences. Because you don't want to separate the final phrase in the first example, you don't use a comma.
In the second example, rather than going out to a restaurant, you still don't need a comma before rather. Here, the expression also provides necessary information, as in the first case. The phrase is not parenthetical, and it certainly isn't an appositive.
However, you will need to follow the expression with a comma because it is serving as an introductory dependent phrase, as in "Rather than going to the store, we went to the restaurant."
But why no comma before rather in the second example? The word that turns the following expression into a noun phrase, here to be used as the direct object of decided. If we place a comma after that, we separate the expression from the noun phrase, which is not correct because it needs to be part of the noun phrase.
Bottom Line:
First example: We decided to go to the grocery store rather than to a restaurant.
Second example: We decided that rather than going out to a restaurant, we would go to the grocery store.
You might pick up a copy of Zen Comma, which has a much more thorough discussion of comma uses.
On a side note: You seem to be confused about appositive phrases. Although appositives don't provide essential information, not every non-essential phrase is an appositive. I think you mean parenthetical expressions, of which appositives are one type, or non-restrictive phrases and clauses.
Example appositive: "This toy, a 1992 Barbie doll, is a family treasure." A 1992 Barbie doll is an appositive.
Example non-restrictive clause: "Take away my life, which is as precious to me, but don't take my dignity." Which is precious to me is the non-restrictive clause.
When you include the comma, the meaning of your sentence changes:
I entered the room where the hostages were.
I entered the specific room which I knew would contain the hostages.
I entered the room, where the hostages were.
I entered a room, and I discovered the hostages in there.
To take one of your sentences:
The primal algorithms broadly correspond to implicit congestion control mechanisms where noisy feedback from the network is averaged at some sources using increase/decrease rules, which are commonly found in ...
If we add a comma before where, then we imply that in all congestion control mechanisms
noisy feedback is averaged. Actually, we could leave out the whole where clause without losing relevant information (anyone knowing enough about the subject already knows that about congestion control mechanisms).
Without the comma, the extra information makes it clear that this does not hold for all congestion control mechanisms, but it does for the ones we are talking about. We cannot remove the where clause without changing the meaning of our sentence.
Best Answer
Only one comma is required in the sentence, and that is after DUI arrests. The phrases all arrests and DUI arrests make up a coordinated complement of the preposition for, and a comma would only serve to separate them. The final word respectively is an integral part of the clause in which it occurs, and should not be separated from the rest of it.