arXiv:2605.01123cs.AI2026-05中稿 · ACL被引 2

用强化学习让AI模仿教授批改代码的语气,又不丢准确性。

PERSA: Reinforcement Learning for Professor-Style Personalized Feedback with LLMs

论文配图:PERSA: Reinforcement Learning for Professor-Style Personalized Feedback with LLMs
图 1 · 摘自论文原文
  • 用人类偏好数据训练奖励模型,仅微调顶层网络提升风格可控性
  • 在三个评测集上风格匹配度达96.2%,内容正确率100%
  • 适合需要个性化教学反馈的教育AI场景

大语言模型可在教育场景中提供自动反馈,但如何在保持诊断准确性的同时使模型风格与特定教师一致仍具挑战。本文研究如何通过强化学习从人类反馈(RLHF)调整基于Transformer的LLM,使其生成符合教授评分语调的编程反馈。提出PERSA框架,结合监督微调、成对偏好奖励建模和近端策略优化(PPO),并刻意限制更新范围至风格相关组件。基于对Transformer内部结构的分析,采用参数高效微调,仅更新顶层Transformer块及其前馈层,减少全局参数漂移,增强风格可控性。在APPS、PyFiXV和CodeReviewQA三个代码反馈基准上评估,使用风格一致性与保真度双重指标。在Llama-3和Gemma-2两种基座模型上,PERSA均实现最强风格迁移,如在APPS上风格一致性分数(SAC)从基础模型的34.8%提升至96.2%,内容正确率(CA)达100%。整体上,PERSA为个性化教育反馈提供了兼顾内容准确与教师语调一致性的实用路径。

原文摘要 · Abstract (English)

Large language models (LLMs) can provide automated feedback in educational settings, but aligning an LLMs style with a specific instructors tone while maintaining diagnostic correctness remains challenging. We ask how can we update an LLM for automated feedback generation to align with a target instructors style without sacrificing core knowledge? We study how Reinforcement Learning from Human Feedback (RLHF) can adapt a transformer-based LLM to generate programming feedback that matches a professors grading voice. We introduce PERSA, an RLHF pipeline that combines supervised fine-tuning on professor demonstrations, reward modeling from pairwise preferences, and Proximal Policy Optimization (PPO), while deliberately constraining learning to style-bearing components. Motivated by analyses of transformer internals, PERSA applies parameter efficient fine-tuning. It updates only the top transformer blocks and their feed-forward projections, minimizing global parameter drift while increasing stylistic controllability. We evaluate our proposed approach on three code-feedback benchmarks (APPS, PyFiXV, and CodeReviewQA) using complementary metrics for style alignment and fidelity. Across both Llama-3 and Gemma-2 backbones, PERSA delivers the strongest professor-style transfer while retaining correctness, for example on APPS, it boosts Style Alignment Score (SAC) to 96.2% (from 34.8% for Base) with Correctness Accuracy (CA) up to 100% on Llama-3, and Gemma-2. Overall, PERSA offers a practical route to personalized educational feedback by aligning both what it says (content correctness) and, crucially, how it says it (instructor-like tone and structure).

教育AI风格迁移RLHF代码反馈

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。