Prompting Large Language Models with Divide-and-Conquer Program for Discerning Problem Solving

Yizhou Zhang, Lun Du, Defu Cao, Qiang Fu, Yan Liu · DOI

Abstract

Large Language Models (LLMs) based on the Transformer architecture face a "Parallelism Tradeoff," where fixed computational depth limits their ability to solve problems with long solution paths or deceptive contexts. While sequential prompting methods like Chain-of-Thought (CoT) provide intermediate reasoning steps, they are prone to error propagation and hallucinations. This paper proposes Divide-and-Conquer (DaC) prompting, a framework that decomposes tasks into parallel, independent sub-tasks. We demonstrate that DaC elevates the expressive power of LLMs from $TC^0$ to $NC^1$ and significantly improves performance in complex arithmetic and hallucination detection tasks.

Introduction

Transformers lack the recurrent structure of older models, meaning their computational depth is fixed regardless of input length. This architecture struggles with "long solution paths," such as complex mathematics or verifying facts within massive documents. Existing solutions like Chain-of-Thought (CoT) or Least-to-Most (LtM) prompting attempt to mitigate this by forcing the model to output intermediate steps. However, these methods are inherently sequential; an error in an early step propagates through the entire chain. Furthermore, in long documents, models often suffer from the "lost in the middle" phenomenon, leading to hallucinations when distracted by irrelevant information.

The Divide-and-Conquer Framework

The proposed Divide-and-Conquer (DaC) prompting strategy shifts the paradigm from sequential "thinking" to parallel "problem-solving." The framework consists of three distinct stages:

  1. Decomposition: The LLM breaks the input into parallel, homogeneous sub-tasks (e.g., splitting a long article into individual sentences or claims).
  2. Sub-task Resolution: The LLM solves each sub-task independently. This can be single-level or recursive (multi-level) for extremely large problems.
  3. Merging: The LLM assembles the independent sub-solutions into a final, coherent answer.
Comparison of prompting strategies: COT, Least-to-Most, COT-SC, Tree of Thought, and Divide-and-Conquer.

Unlike CoT, which acts as a sequential sub-problem solver, DaC functions as a parallel solver. This structural difference, as illustrated in the comparison of prompting topologies, makes the model much more robust against intermediate errors.

Theoretical Foundations and Context Efficiency

The authors provide a mathematical proof showing that while standard prompting is limited to the complexity class $TC^0$, DaC prompting elevates the model's expressive power to $NC^1$ (specifically by proving it can solve the 2-color Binary Subtree Isomorphism problem).

Crucially, DaC optimizes the Decoding Context Window Size. By isolating sub-tasks, the "active" context window remains small. This prevents the model from being overwhelmed by the full input length, theoretically and practically reducing the likelihood of hallucinations.

Empirical Evaluation: Mitigating Hallucinations

The researchers evaluated DaC against several baselines (IO, CoT, CoT-SC, LtM, and Decomposed Prompting) across three domains: Large Integer Arithmetic, HaluEval-Summary (hallucination detection), and SciFact (fact verification).

An example of how entangled problem solving leads to hallucinations versus how Divide-and-Conquer correctly identifies contradictions.

In the HaluEval-Summary benchmark, DaC achieved an F1 score of 74.84 using GPT-3.5, significantly outperforming CoT's 46.85. As shown in the comparison of "Entangled" vs. "Divide-and-Conquer" problem solving, the parallel approach allows the model to verify individual claims against specific material evidence without getting "distracted" by the overall narrative flow, which often leads to false confirmations in standard prompting.

Key Results and Insights

  • Mathematics: In large integer multiplication, DaC significantly reduced the Edit Distance (error magnitude) compared to GPT-4 using CoT or LtM.
  • Fact Verification: On SciFact, GPT-3.5 using DaC outperformed GPT-4 using standard prompting, suggesting that the prompting structure can be more impactful than raw model scale.
  • Conditions for Success: DaC is most effective when the task is computationally harder than standard instruction following (e.g., $NC^1$-complete) and contains parallelizable data prone to distraction. Conversely, for simple tasks like integer addition, the overhead of decomposition may introduce unnecessary complexity.

Conclusion

Divide-and-Conquer prompting represents a fundamental shift toward parallelized reasoning in LLMs. By breaking the dependency on sequential chains, DaC expands the expressive power of Transformers and provides a robust defense against hallucinations in long-context tasks. Future work will focus on automatically determining "DaC-readiness" for various tasks and expanding the scope to general-purpose question answering.

Summary updated

BibTeX
@misc{zhang2024prompting,
  author = {Yizhou Zhang and Lun Du and Defu Cao and Qiang Fu and Yan Liu},
  title = {{Prompting Large Language Models with Divide-and-Conquer Program for Discerning Problem Solving}},
  year = {2024},
  eprint = {2402.05359},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.05359},
}
Figure