I asked this a lot when I first got mine. I timed a lot of 20-80mph runs, and came to the conclusion that it is linear. I have run 87, 91, and 93. I clocked my CX5 as linearly faster using these, by very very small margins that equate to the hp one would expect. Of course it's a car, and I used my phone to video and t hen look at the milliseconds of timestamp. That is very imprecise, but it DID show what one expects from linear between 227 and 250.
So now let's look at "common sense"...
The car does not see the pump and say "Oh, bruh, he selected 93!". The gas t ank nor fuel system do not have a build-in lab to calculate that, either.
What I strongly suspect happens, is that Mazda has a very VERY robust pre-detonation detection system within the SA engine's programming. Mazda has a TON of data they monitor on these. It is NOT your old mid 90's port injection cam-in-block motor. I suspect that the timing and cam phasing or whatever else is constantly being adjusted. As such, as soon as ANY little bit of pre-detonation is detected, the software backs off. So within a certain parameter (say, "X degrees timing advance, valve event"), it is constantly adjusting for more top-end power (down low it doesn't really matter). So no, you can't run 100 octane and get 280hp, as 250hp is "the ceiling", likely, with all adjustments "wide open" and detonation not being a factor, but you may technically get 247.781 bhp if your 93 octane is watered down a bit by some 91 in your tank still, or whatever, as the engine is infinitely variably controlled between 227-250bhp output possibilities, to take advantage of the most you're giving it.