Scientists have built an AI tool that can decode how different parts of the brain talk to each other.