CoolFace
Apppublic

ATISHAY005/openenv-feed-ranking

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
App README

๐Ÿš€ Value-Aware RL Feed Ranking Environment (OpenEnv)

๐Ÿ“Œ Overview

This project implements a real-world reinforcement learning environment for feed ranking systems. It simulates how modern recommendation systems balance user engagement, diversity, and responsible AI objectives such as value alignment and toxicity reduction.

The environment follows the OpenEnv specification, enabling agents to interact through standard APIs: step(), reset(), and state().


๐Ÿง  Motivation

Real-world recommendation systems (e.g., social media feeds) face a fundamental challenge:

Maximizing engagement while ensuring responsible and aligned content delivery.

This project models that trade-off using a multi-objective reward system, making it suitable for studying alignment, fairness, and long-term user behavior in AI systems.


๐Ÿ—๏ธ Architecture

This system models a value-aware RL pipeline for feed ranking:

[image]

Key Components:

  • โ€”User State Representation (embeddings, preferences, fatigue)
  • โ€”Candidate Post Selection
  • โ€”Ranking Policy (Agent)
  • โ€”User Behavior Simulator
  • โ€”Reward Function (multi-objective)
  • โ€”Evaluation / Grader System

โš™๏ธ Environment Design

๐Ÿ”น Observation Space

The environment state is defined as: UserState:

user_embedding (vector representation) history (past interactions) interest (engagement level) fatigue (content saturation) value preferences (alignment sensitivity)


๐Ÿ”น Action Space

The agent selects:

Top-K ranked posts

Example:

[action] = [post1, post2, post_3]


๐Ÿ”น Reward Function

The reward captures multiple objectives:

  • โ€”โœ… Engagement (click / watch)
  • โ€”โœ… Value Alignment
  • โ€”โœ… Diversity
  • โ€”โŒ Toxicity Penalty
  • โ€”โŒ Fatigue Penalty
Hard Task Reward:

Reward = 0.5 * Engagement

  • โ€”0.2 * Alignment
  • โ€”0.1 * Diversity
  • โ€”0.2 * Toxicity
  • โ€”0.1 * Fatigue

๐ŸŽฏ Tasks

TaskObjective
๐ŸŸข EasyMaximize engagement
๐ŸŸก MediumEngagement + Diversity
๐Ÿ”ด HardEngagement + Alignment + Toxicity + Fatigue

๐Ÿงช Evaluation

The environment includes an agent grader to evaluate performance across all tasks.

Output Format (required for automated evaluation):

START STEP task=easy score=... STEP task=medium score=... STEP task=hard score=... END


๐Ÿ“Š Key Insight

As task complexity increases from Easy โ†’ Hard, performance decreases.

This demonstrates the real-world trade-off between engagement optimization and responsible AI objectives, a core challenge in modern recommendation systems.

๐Ÿงฐ Tech Stack

  • โ€”Python
  • โ€”NumPy
  • โ€”Reinforcement Learning Concepts
  • โ€”Simulation-based Evaluation

๐Ÿš€ How to Run

โ–ถ๏ธ Local Execution

bash
python main.py

## ๐Ÿ“š References

This work draws inspiration from recent advances in reinforcement learning and value-aware ranking systems:

1. *Multi-Stage Feed Ranking Systems*  
   https://arxiv.org/pdf/1906.03109  

2. *Value-Aware Reinforcement Learning for Alignment*  
   https://arxiv.org/pdf/2601.20083  

3. *Sequential Optimization and Ranking in Dynamic Systems*  
   https://arxiv.org/pdf/2509.14434v1  

   ---

# ๐Ÿš€ FINAL STEPS

git add README.md git commit -m "Fix HF README config" git push hf clean-branch:main --force