Some turbofans have an intermediate pressure (IP) compressor located between the fan and the high pressure (HP) compressor to increase overall pressure ratio. US civil engines tend to mount the IP compressor on the LP shaft, directly behind the fan, whereas Rolls-Royce normally mount the IP compressor on a separate (i.e. IP) shaft, which is driven by an IP turbine. Either way, matching problems can arise.
The IP compressor outlet corrected flow must match the entry corrected flow of the HP compressor, which is decreasing as the engine is throttled back. At a certain IP compressor working line slope, the IP compressor outlet corrected flow remains constant. However, by adopting a shallower working line, the extra IP compressor pressure ratio at a given IP compressor entry corrected flow enables the IP compressor outlet corrected flow to decrease and match up with the falling HP compressor entry corrected flow. Unfortunately this can lead to a poor IP compressor surge margin at part flow. 
Surge margin can be improved by adding variable stators to the IP compressor and/or adding a blow-off valve between the IP and HP compressors. The former makes the IP compressor surge line shallower, swinging it away from the shallow working line, thus improving IP compressor surge margin.
At a given IP compressor pressure ratio, opening the blow-off valve forces the IP compressor entry corrected flow to increase, to a point where the IP compressor surge margin tends to be better. Effectively, opening the blow-off valve lowers the IP compressor working line. Any flow surplus to that demanded by the HP compressor passes through the blow-off valve into the bypass duct. The blow-off valve is normally only opened at throttled conditions, since it wastes energy.