Update SNLDA for arbitrary tree structure