- Rating
- 4
- Clarity
- 3
- Confidence
- 3
- Originality
- 3
- Quality
- 4
- Significance
- 3
Read review
Summary
This paper proposes RESHAPE, a reward shaping method for language model query generation. The main motivation is that existing RL methods for text-to-SQL or text-to-Cypher usually rely on sequence-level rewards, such as binary correctness rewards or composite rewards. These rewards are sparse and do not tell the model which specific token caused the query to fail.
To address this problem, the authors propose to learn a token-level shaping reward. The shaping reward provides dense feedback during generation while still being aligned with the final correctness objective. The method is formulated as a bilevel optimization problem: the upper level learns the shaping reward based on the original correctness reward, and the lower level optimizes the language model using the learned token-level reward. The authors further propose a single-loop algorithm to avoid expensive nested optimization. Experiments on SQL and Cypher query generation show that RESHAPE improves over correctness rewards, composite rewards, and PRIME across several models and RL optimizers.
Strengths and weaknesses
Strengths
-
The problem is important and well motivated. Query generation is very sensitive to local token-level errors. A single wrong keyword, column name, entity, or syntax symbol can make the whole query incorrect. Therefore, moving from sparse sequence-level rewards to token-level rewards is a natural and timely direction.
-
The proposed method is more principled than manually designed partial rewards. Instead of adding heuristic format or syntax rewards, the paper learns a shaping reward that is intended to preserve alignment with the original correctness objective.
-
The bilevel formulation is interesting. It clearly separates the goal of learning a useful token-level reward from the goal of optimizing the language model policy with that reward.
-
The experiments are fairly comprehensive. The authors evaluate on SQL and Cypher query generation, multiple benchmarks, multiple base models, and multiple RL optimizers. RESHAPE consistently improves over correctness reward, composite reward, and PRIME.
Weaknesses
-
The scope of the method is somewhat limited. The motivation is very convincing for formal query generation, where a small local error can invalidate the whole output. However, it is less clear whether the same reward shaping method would be equally useful for more open-ended generation tasks, where local token errors may not directly determine final correctness.
-
The distinction between RESHAPE and existing token-level reward methods such as PRIME could be clearer. The paper explains that RESHAPE optimizes the shaping reward through its downstream effect on the policy, while PRIME learns token-level rewards via supervised objectives. However, more intuitive explanation or examples would help readers better understand the practical difference.
-
The paper relies heavily on correctness rewards from executable queries. This is reasonable for SQL and Cypher, but it may limit the applicability of the method to tasks where execution-based correctness is unavailable, noisy, or expensive.
-
The improvement is consistent, but the paper could better explain when RESHAPE helps the most. For example, is the gain mainly from fixing syntax errors, schema-linking errors, entity/property errors, or more complex logical errors? The current local error analysis is useful, but still relatively limited.
Questions
-
Could the authors clarify what types of tasks are suitable for RESHAPE, and whether the method is mainly designed for formal language generation such as SQL, Cypher, code, or DSLs?
-
Could the authors better clarify why learning a separate token-level shaping reward is different from, and better than, using a standard critic or advantage estimator? Is the main benefit from changing the reward function, the potential-based parameterization, or the bilevel update?
-
The local error analysis suggests that RESHAPE reduces entity, property, syntax, and schema-linking errors. Could the authors provide more detailed analysis of which error types contribute most to the final performance gain? In particular, does RESHAPE mainly help with local surface-form errors, or can it also improve deeper logical/query-structure errors?
Limitations
The authors have included the limitations in the submitted papers.
Paper formatting concerns
No formatting concerns
Meta-review
This paper Investigates techniques for reward shaping specifically tailored to training language models for information retrieval and query generation tasks. It aims to bridge the gap between generated query quality and downstream retrieval accuracy. A major insight validated in the review discussion is that standard RAG pipelines often suffer because query generators are optimized for semantic similarity rather than downstream retrieval utility. The authors develop a novel reward-shaping formulation that directly incorporates document rank and retrieval diversity into the reinforcement learning signal. Reviewers confirm that this technique aligns the query generator's output distribution with the structural quirks of the retriever, leading to measurable gains in recall and mean reciprocal rank (MRR) on open-domain QA benchmarks.
Main Strengths: Positive trajectory (scores 3 to 4) addressing an essential component of modular RAG architectures.
Main Weaknesses: Potential domain dependency of the shaped rewards, unclear performance against modern end-to-end RL-based query rewriting baselines, and concerns regarding reward saturation over long training runs.
The reviewers are generally constructive, noting the importance of aligning query generation with retrieval objectives. To secure acceptance, the authors should prioritize answering: (1) How does the reward shaping methodology compare against recent end-to-end training paradigms where the retriever and query generator are jointly optimized? (2) Does the shaped reward signal generalize across different document embedding models (e.g., BM25 vs. dense neural retrievers) without re-tuning the shaping hyperparameters? (3) What safeguards prevent the model from generating degenerate or keyword-stuffed queries that exploit the retriever's scoring function?
Looking past the numeric scores, the primary conceptual risk in this work is the potential alignment tax—where optimization for retrieval recall might degrade other model capability. In the rebuttal, the authors may consider providing qualitative examples of generated queries alongside quantitative fluency metrics (e.g., perplexity or human evaluation scores). Showing that the model maintains existing capabilities while improving retrieval precision will resolve any lingering doubts regarding reward misalignment.