Nanophotonic circuits, tiny chips which filter and steer light, suffer from small random variations which degrade the transmission of light. Researchers have now found a way to compensate those variations, which may lead to energy savings in datacenters and computer equipment.