Hmmm, that's a tricky one. I'm guessing you're talking about a night goblin riding character riding on a giant cave squig with Guzzla's battle brew.
In this case I'm pretty sure that the movement rules for Stupidity would override their normal compulsive movement. Since the actual stat line for the giant cave squig lists their movement value as 3d6, that will have to be what the stupidity move is based on. The giant cave squig is a monstrous mount so it does face a specific direction which would be used to determine the "straight ahead" direction of movement. End result: the squig moves half the distance rolled on 3d6 straight ahead in the direction he is currently facing.
If you are talking about a unit of squig hoppers that has become stupid due to a spell or other ability, then the result is a bit more painful. Squig hoppers are skirmishers and do not face in a specific direction for determining "straight ahead" and so get moved in a random direction based on a scatter die. Definitely a situation you want to avoid here.
These are, of course, not official rulings (except the random direction movement on skirmishers), but seem like the most sensible way to interpret the two sets of rules.