Yolo 비전 선전
선전
지금 참여하기
용어집

인간 피드백을 통한 강화 학습(RLHF)

인간 피드백을 통한 강화 학습(RLHF)이 어떻게 AI 모델을 인간의 가치에 부합시켜 더 안전하고 스마트한 AI를 만드는지 알아보세요.

Reinforcement Learning from Human Feedback (RLHF) is an advanced machine learning technique that refines artificial intelligence models by incorporating direct human input into the training loop. Unlike standard supervised learning, which relies solely on static labeled datasets, RLHF introduces a dynamic feedback mechanism where human evaluators rank or rate the model's outputs. This process allows the AI to capture complex, subjective, or nuanced goals—such as "helpfulness," "safety," or "creativity"—that are difficult to define with a simple mathematical loss function. RLHF has become a cornerstone in the development of modern large language models (LLMs) and generative AI, ensuring that powerful foundation models align effectively with human values and user intent.

RLHF의 핵심 구성 요소

RLHF 프로세스는 일반적으로 원시 예측 능력과 인간과 조화된 행동 간의 격차를 해소하기 위해 설계된 3단계 파이프라인을 따릅니다.

  1. 지도형 미세조정(SFT): 워크플로는 일반적으로 사전 훈련된 기초 모델로 시작됩니다. 개발자는 전문가들이 작성한 질문-답변 쌍과 같은 소규모의 고품질 데모 데이터셋을 사용해 초기 미세조정을 수행합니다. 이 단계는 모델에 작업에 필요한 일반적인 형식과 어조를 가르쳐 기준 정책을 수립합니다.
  2. Reward Model Training: This phase is the distinguishing feature of RLHF. Human annotators review multiple outputs generated by the model for the same input and rank them from best to worst. This data labeling effort generates a dataset of preferences. A separate neural network, called the reward model, is trained on this comparison data to predict a scalar score that reflects human judgment. Tools available on the Ultralytics Platform can streamline the management of such annotation workflows.
  3. Reinforcement Learning Optimization: Finally, the original model acts as an AI agent within a reinforcement learning environment. Using the reward model as a guide, optimization algorithms like Proximal Policy Optimization (PPO) adjust the model's parameters to maximize the expected reward. This step aligns the model's policy with the learned human preferences, encouraging behaviors that are helpful and safe while discouraging toxic or nonsensical outputs.

실제 애플리케이션

RLHF has proven critical in deploying AI systems that require high safety standards and a nuanced understanding of human interaction.

  • 대화형 AI와 챗봇: RLHF의 가장 두드러진 적용 분야는 챗봇이 유용하고, 무해하며, 정직하도록 조정하는 데 있습니다. 편향되거나 사실과 다르거나 위험한 출력에 대해 불이익을 부여함으로써, RLHF는 대규모 언어 모델(LLM)의 환각 현상을 완화하고 알고리즘적 편향의 위험을 줄입니다. 이를 통해 가상 비서는 합법적인 질의에는 유용함을 유지하면서도 유해한 지시를 거부할 수 있습니다.
  • 로봇공학과 물리적 제어: RLHF는 텍스트를 넘어 복잡한 물리적 작업에 대한 완벽한 보상 함수를 정의하는 것이 어려운 로봇공학 분야의 AI로 확장됩니다. 예를 들어, 혼잡한 창고 내 이동을 학습하는 로봇은 어떤 경로가 안전하고 어떤 경로가 혼란을 야기했는지에 대한 인간 감독자의 피드백을 받을 수 있습니다. 이러한 피드백은 단순히 목표 완성에만 기반한 심층 강화 학습보다 로봇의 제어 정책을 더 효과적으로 개선합니다.

RLHF와 표준 강화 학습 비교

RLHF의 특정한 유용성을 이해하기 위해서는 전통적인 강화 학습(RL) 과 구분하는 것이 도움이 된다.

  • 표준 RL: 전통적인 설정에서 보상 함수는 종종 환경에 의해 하드코딩됩니다. 예를 들어, 비디오 게임에서 환경은 명확한 신호(+1 승, -1 패)를 제공합니다. 에이전트는 이 정의된 마르코프 결정 과정(MDP) 내에서 자신의 행동을 최적화합니다.
  • RLHF: 창의적인 이야기 쓰기나 예의 바른 운전과 같은 많은 실제 시나리오에서 "성공"은 주관적입니다. RLHF는 하드코딩된 보상을 인간의 선호도에서 도출된 학습된 보상 모델로 대체함으로써 이 문제를 해결합니다. 이는 "품질"이나 "적절성"과 같은 명시적으로 프로그래밍하기 불가능한 추상적 개념의 최적화를 가능하게 합니다.

지각과 피드백 루프의 통합

시각적 응용 분야에서 RLHF 기반 에이전트는 행동 전에 환경 상태를 인지하기 위해 컴퓨터 비전(CV) 에 의존하는 경우가 많다. YOLO26과 같은 강력한 탐지기는 인지 계층으로 기능하며, 정책 네트워크가 행동을 선택하는 데 사용하는 구조화된 관측값(예: "3미터 지점에서 장애물 탐지")을 제공한다.

The following Python example illustrates a simplified concept where a YOLO model provides the environmental state. In a full RLHF loop, the "reward" signal would come from a model trained on human feedback regarding the agent's decisions based on this detection data.

from ultralytics import YOLO

# Load YOLO26n to act as the perception layer for an intelligent agent
model = YOLO("yolo26n.pt")

# The agent observes the environment (an image) to determine its state
results = model("https://ultralytics.com/images/bus.jpg")

# In an RL context, the 'state' is derived from detections
# A reward model (trained via RLHF) would evaluate the action taken based on this state
detected_objects = len(results[0].boxes)

print(f"Agent Observation: Detected {detected_objects} objects.")
# Example output: Agent Observation: Detected 4 objects.

강력한 인식 모델과 인간 피드백을 통해 정교화된 정책을 결합함으로써 개발자는 지능적일 뿐만 아니라 인공지능 안전 원칙과 엄격하게 부합하는 시스템을 구축할 수 있습니다. 확장 가능한 감독 기술에 대한 지속적인 연구, 예를 들어 헌법적 인공지능( Constitutional AI)과 같은 접근법은 대규모 인간 주석 작업의 병목 현상을 줄이면서 높은 모델 성능을 유지하는 것을 목표로 이 분야를 지속적으로 발전시키고 있습니다.

Ultralytics 커뮤니티 가입

AI의 미래에 동참하세요. 글로벌 혁신가들과 연결하고, 협력하고, 성장하세요.

지금 참여하기