You likely need more octane. Lean and detonation are not the same thing. You can jet up a ton and still get detonation.
Detonation is PRE Ignition. Being lean is not having enough fuel (ENERGY) for the load/demand.
Ethanol has a TON of octane, something like 114 (E-85). But if you run e-85 you will need to jet up because the amount of usable energy in it is less than gasoline. Energy is measured in BTU's. E-85 has roughly 82,000 BTU's per gallon. Gasoline has about 114,000 BTU's per gallon. Straight Ethanol has about 76,000 BTU. Oxygenated blend gasoline has about 111,000 BTU. Diesel has about 130,000 BTU,
Obviously you cannot run diesel but that is why a diesel motor typically gets better fuel economy and why E-85 gets less economy than gasoline. Diesel requires less fuel to do the same work and E-85 requires more fuel to do the work.
Back to my point....
91 oxygenated fuel (10% ethanol) is still 91 octane, but the BTU's in it are less. Meaning you will need more fuel to do the same work. Detonation is a lack of octane.
When you go up in elevation you have less atmospheric pressure, thus you have less motor compression as well. So in theory you don't need as much octane at higher elevations. Now if you go to a high compression head you are effectively increasing motor compression. So now you again need more octane. This is why you can increase compression more at higher elevations without race fuel than at low elevations. Really you are just making up for the compression you lost from the gain in elevation and loss of atmospheric pressure.
I would certainly look into your fuel source. Make sure you are not getting water, bad fuel or dirt. You can buy test kits for $25 or so, cheap insurance.