Skip to main content

Trust-Aware Recommender System based on TBL & Fairness

Project description

⚖️ FairRecSys: Trust-Aware Fashion Recommender

License: MIT Python 3.8+

Beyond Popularity Bias: A TBL-Fair Recommendation Framework based on LLM-GNN Hybrid Architecture.

이 라이브러리는 2026 ICCT에서 발표된 "Trust-Aware Fashion Recommendation" 논문의 공식 구현체입니다.
단순 클릭 데이터가 아닌 **리뷰의 내재적 가치(Intrinsic Value)**와 **신뢰도(Trustworthiness)**를 학습하여, 스몰 브랜드와 상생하는 윤리적 추천 시스템을 구축할 수 있습니다.


🌟 Key Features (핵심 기능)

  1. Trust-Weighted Loss (신뢰도 가중 손실 함수):
    • 통계적으로 입증된 '진실성 효과(4점 > 5점)'와 '부정성 편향(1점 > 2점)'을 딥러닝 학습 과정(Loss Function)에 반영합니다.
  2. Cold-Start Solved via LLM:
    • 데이터가 없는 상품에 대해 LLM이 추론한 내재적 가치를 활용합니다.
  3. Easy-to-Use Interface:
    • 복잡한 전처리 없이 몇 줄의 코드로 TrustAwareBERT 모델을 학습시킬 수 있습니다.

🚀 Installation (설치 방법)

# Hugging Face 저장소에서 다운로드
git clone [https://huggingface.co/HabinKim/trust-aware-bert-fashion](https://huggingface.co/HabinKim/trust-aware-bert-fashion)
cd trust-aware-bert-fashion
pip install .

💻 Usage (사용 방법)

이 라이브러리는 복잡한 전처리 없이 간단하게 모델을 불러와 학습시킬 수 있습니다.

import torch
from fair_rec import TrustAwareBERT, TrustWeightedLoss, Trainer
from torch.utils.data import DataLoader

# 1. 모델 초기화 (Pre-trained BERT 로드)
model = TrustAwareBERT(pretrained_model='bert-base-uncased')

# 2. 가중 손실 함수 설정 (Study 1의 회귀분석 결과 반영)
# 신뢰도 점수(Trust Score)를 기반으로 오차를 계산합니다.
criterion = TrustWeightedLoss() 

# 3. 데이터 로더 준비 (사용자의 데이터를 여기에 넣으세요)
# train_loader = DataLoader(...)

# 4. 학습 시작
# Trainer 클래스가 학습 루프를 자동으로 관리합니다.
trainer = Trainer(
    model=model,
    train_loader=train_loader, # 실제 데이터 로더
    val_loader=None,           # 검증 데이터 로더 (선택)
    criterion=criterion,
    optimizer=torch.optim.AdamW(model.parameters(), lr=2e-5),
    device='cuda' if torch.cuda.is_available() else 'cpu'
)

# 에폭(Epoch) 수 설정 후 학습 실행
trainer.train(epochs=3)

📊 Performance (성능)

Model NDCG@10 Fairness (Gini) Sustainability CTR
Standard BERT 0.42 0.65 (High Bias) 2.1%
FairRecSys (Ours) 0.45 0.48 (Balanced) 5.4%

📜 Citation (인용)

본 라이브러리를 연구에 활용하실 경우 아래 논문을 인용해 주세요.

@inproceedings{kim2026trust,
  title={Trust-Aware Fashion Recommendation: Bridging the Gap between Behavioral Helpfulness and Deep Learning},
  author={Kim, Habin},
  booktitle={Proceedings of the International Conference on Convergence Technology (ICCT)},
  year={2026}
}

📧 Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fair_rec_sys-0.1.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fair_rec_sys-0.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file fair_rec_sys-0.1.0.tar.gz.

File metadata

  • Download URL: fair_rec_sys-0.1.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.6

File hashes

Hashes for fair_rec_sys-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3e1c91e0954e90df2e965adadbbc6dc9cf5d47779d6467a68c41df3138a47453
MD5 d57cd589e6e4c87cbd657f0a96c60ecc
BLAKE2b-256 bf438ce10723f69335e22b1e64d6ca3a48cd2df0b4b3ee3b545e7ae4c13f7062

See more details on using hashes here.

File details

Details for the file fair_rec_sys-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fair_rec_sys-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.6

File hashes

Hashes for fair_rec_sys-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d433e6c21a598891c8eaf7ee826d63688657b6453d053fdd54592a49fc053b0
MD5 8c4c01e87fc87b214107e0f68dee2b8d
BLAKE2b-256 c31a8d68165f2bef8f4c82337e0882eff9dd458aff7ddef4ad4ee823c9c5a189

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page