Traditionally, in Programming-by-example (PBE) the goal is to synthesize a program from a small set of input-output examples. Lately, PBE has gained traction as a few-shot reasoning benchmark, relaxing the requirement to produce a program artifact altogether which allows transductive methods to directly the missing output sample. Transduction and induction are complementary reasoning modes--where induction derives general rules from examples, transduction leverages the examples directly to infer specific outputs without intermediate generalization. Yet existing approaches either treat them as mutually exclusive or couple them in hybrid structures where one paradigm dictates a fixed trajectory for the other -- undermining the latter's reasoning potential and creating cascading errors. We move away from these hierarchical models and introduce cooperative transductive-inductive problem solving: by interleaving both reasoning modes and ensuring neither unconditionally dominates the other, we preserve the search autonomy and reasoning capacity of each paradigm. We instantiate this concept in TIIPS. Across three PBE domains, TIIPS consistently outperforms state-of-the-art baselines and generates programs that more closely mirror ground-truth trajectories in both syntax and semantics, indicating a better match to the intended program behavior. Our findings highlight cooperative reasoning as a promising new direction for harnessing the full power of symbolic, inductive and neural, transductive reasoning.
翻译:传统上,示例编程的目标是从少量输入-输出示例中合成程序。近来,示例编程作为一种少样本推理基准受到关注,其放宽了必须生成程序产物的要求,从而允许转导方法直接预测缺失的输出样本。转导与归纳是互补的推理模式——归纳从示例中推导一般规则,而转导则直接利用示例推断特定输出,无需中间泛化步骤。然而,现有方法要么将它们视为互斥,要么在混合结构中耦合二者,使一种范式为另一种设定固定轨迹——这削弱了后者的推理潜力并导致级联错误。我们摒弃这些分层模型,提出协同转导-归纳问题解决:通过交错两种推理模式并确保任一模式均不无条件主导,我们保留了每种范式的搜索自主性与推理能力。我们在TIIPS中实现了这一概念。在三个示例编程领域中,TIIPS始终优于最先进的基线方法,并生成在语法和语义上更接近真实轨迹的程序,表明其与预期程序行为更匹配。我们的研究结果凸显了协同推理作为一种有前景的新方向,可充分发挥符号化、归纳式与神经化、转导式推理的完整潜力。