{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/improving-the-validity-of-automatically","title":"Improving the Validity of Automatically Generated Feedback via Reinforcement Learning","arxiv_id":"2403.01304","date":"2024-03-02","proceeding":null,"authors":["Alexander Scarlatos","Digory Smith","Simon Woodhead","Andrew Lan"],"abstract":"Automatically generating feedback via large language models (LLMs) in intelligent tutoring systems and online learning platforms has the potential to improve the learning outcomes of many students. However, both feedback generation and evaluation are challenging: feedback content has to be valid especially in subjects like math, which requires models to understand the problem, the solution, and where the student's error lies. Feedback also has to be pedagogically valid to reflect effective tutoring strategies, such as explaining possible misconceptions and encouraging the student, among other desirable features. In this work, we address both problems of automatically generating and evaluating feedback while considering both correctness and alignment. First, we propose a rubric for evaluating math feedback and show that GPT-4 is able to effectively use it to annotate human-written and LLM-generated feedback. Second, we propose a framework for feedback generation that optimizes both correctness and alignment using reinforcement learning (RL). Specifically, we use GPT-4's annotations to create preferences over feedback pairs in an augmented dataset for training via direct preference optimization (DPO). We show that our methods significantly increase the correctness and alignment of generated feedback with Llama 2, an open-source LLM, qualitatively analyze our generation and evaluation systems using case studies, and outline several areas for future work.","url_abs":"https://arxiv.org/abs/2403.01304v2","url_pdf":"https://arxiv.org/pdf/2403.01304v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"improving-the-validity-of-automatically","repo_url":"https://github.com/umass-ml4ed/feedback-gen-dpo","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"math","task_name":"Math"},{"task_slug":"misconceptions","task_name":"Misconceptions"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"},{"task_slug":null,"task_name":"valid"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"gpt-4","method_name":"GPT-4"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.01304","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.01304"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/umass-ml4ed/feedback-gen-dpo","reach":{"status":"ok"}}],"summary":{"ran":9,"unverified":4},"by_repo_kind":{"official":{"samples":13,"ran":9,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":13,"samples":[{"code_sha256_prefix":"7e37d709fb1141d2","entry":"clean_whitespace","repo":"umass-ml4ed/feedback-gen-dpo","repo_kind":"official","path":"feedback_dataset.py","file_url":"https://github.com/umass-ml4ed/feedback-gen-dpo/blob/HEAD/feedback_dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7e37d709fb1141d2"}},{"code_sha256_prefix":"142b6a27e89b148d","entry":"expand_rows","repo":"umass-ml4ed/feedback-gen-dpo","repo_kind":"official","path":"feedback_dataset.py","file_url":"https://github.com/umass-ml4ed/feedback-gen-dpo/blob/HEAD/feedback_dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"142b6a27e89b148d"}},{"code_sha256_prefix":"32fe9ec6a920dbd2","entry":"feedback_prompt_input","repo":"umass-ml4ed/feedback-gen-dpo","repo_kind":"official","path":"create_reward_dataset.py","file_url":"https://github.com/umass-ml4ed/feedback-gen-dpo/blob/HEAD/create_reward_dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"32fe9ec6a920dbd2"}},{"code_sha256_prefix":"ae7826c477041916","entry":"feedback_prompt_input_sol","repo":"umass-ml4ed/feedback-gen-dpo","repo_kind":"official","path":"create_reward_dataset.py","file_url":"https://github.com/umass-ml4ed/feedback-gen-dpo/blob/HEAD/create_reward_dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ae7826c477041916"}},{"code_sha256_prefix":"962fe5e7b6a783dd","entry":"feedback_prompt_output","repo":"umass-ml4ed/feedback-gen-dpo","repo_kind":"official","path":"create_reward_dataset.py","file_url":"https://github.com/umass-ml4ed/feedback-gen-dpo/blob/HEAD/create_reward_dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"962fe5e7b6a783dd"}},{"code_sha256_prefix":"fca5d04c2f6ba6c9","entry":"format_input","repo":"umass-ml4ed/feedback-gen-dpo","repo_kind":"official","path":"reward_model_dataset.py","file_url":"https://github.com/umass-ml4ed/feedback-gen-dpo/blob/HEAD/reward_model_dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fca5d04c2f6ba6c9"}},{"code_sha256_prefix":"31e2f3ed91401af8","entry":"format_input_enc","repo":"umass-ml4ed/feedback-gen-dpo","repo_kind":"official","path":"reward_model_dataset.py","file_url":"https://github.com/umass-ml4ed/feedback-gen-dpo/blob/HEAD/reward_model_dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"31e2f3ed91401af8"}},{"code_sha256_prefix":"8bffebe98b61c348","entry":"get_saved_cache","repo":"umass-ml4ed/feedback-gen-dpo","repo_kind":"official","path":"llm.py","file_url":"https://github.com/umass-ml4ed/feedback-gen-dpo/blob/HEAD/llm.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8bffebe98b61c348"}},{"code_sha256_prefix":"107bcb2dd90aff86","entry":"load_data","repo":"umass-ml4ed/feedback-gen-dpo","repo_kind":"official","path":"train_reticl.py","file_url":"https://github.com/umass-ml4ed/feedback-gen-dpo/blob/HEAD/train_reticl.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"107bcb2dd90aff86"}},{"code_sha256_prefix":"1c2a77c38afe9780","entry":"get_stats","repo":"umass-ml4ed/feedback-gen-dpo","repo_kind":"official","path":"analyze_reward_dataset.py","file_url":"https://github.com/umass-ml4ed/feedback-gen-dpo/blob/HEAD/analyze_reward_dataset.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1c2a77c38afe9780"}},{"code_sha256_prefix":"94152c91edb8e94e","entry":"get_tokenizer","repo":"umass-ml4ed/feedback-gen-dpo","repo_kind":"official","path":"reward_model.py","file_url":"https://github.com/umass-ml4ed/feedback-gen-dpo/blob/HEAD/reward_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"94152c91edb8e94e"}},{"code_sha256_prefix":"59c7d2e02b3c4856","entry":"load_dataset","repo":"umass-ml4ed/feedback-gen-dpo","repo_kind":"official","path":"reward_model_dataset.py","file_url":"https://github.com/umass-ml4ed/feedback-gen-dpo/blob/HEAD/reward_model_dataset.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"59c7d2e02b3c4856"}},{"code_sha256_prefix":"ca23aa0b59dd9b4d","entry":"load_dataset","repo":"umass-ml4ed/feedback-gen-dpo","repo_kind":"official","path":"count_tokens.py","file_url":"https://github.com/umass-ml4ed/feedback-gen-dpo/blob/HEAD/count_tokens.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ca23aa0b59dd9b4d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}