Since neutrons have a magnetic dipole moment (μ) a material’s index of refraction depends on relative sign of μ·B.
As a result, when interacting with a magnetized surface, neutrons of one spin orientation can be made to reflect while neutrons with the opposite spin orientation do not. The unreflected neutrons can be subsequently absorbed, resulting in a high degree of polarization (>99%) in the outgoing beam.