Instructions to use areai51/propensity-one-audience with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use areai51/propensity-one-audience with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("areai51/propensity-one-audience", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Propensity One audience
Research preview. Given a product description, this model estimates which demographic segments are more likely to buy it. It is BAAI/bge-small-en-v1.5 (33M parameters) fine-tuned on observed purchases from Open e-commerce 1.0 (CC0): 1.85 million Amazon.com purchases, 2018-2022, by 5,027 US consumers who also answered a demographic survey.
The output is a lift per segment: P(segment | product bought) / P(segment). A lift of 1.5 for "age 18-24" means people aged 18-24 buy this product 1.5 times as often as the average shopper in the data.
It is not a probability of buying. The data has purchases only, with no record of who saw a product and passed.
Use
from huggingface_hub import snapshot_download
import sys
path = snapshot_download("areai51/propensity-one-audience")
sys.path.insert(0, path)
from propensity_one_audience import PropensityOneAudience
model = PropensityOneAudience(path)
model.lift("RGB mechanical gaming keyboard")["age"]
# {'18-24': 2.24, '25-34': ..., '65+': 0.15}
model.profile_lift("RGB mechanical gaming keyboard", {"age": "18-24", "gender": "male"})
model.top_segments("Anti-aging retinol night cream for mature skin")
Attributes and values: age (18-24, 25-34, 35-44, 45-54, 55-64, 65+), gender (female, male), income (household,
USD: <25k, 25-50k, 50-75k, 75-100k, 100-150k, 150k+), education (no_degree, bachelor, graduate), hh_size
(1, 2, 3, 4+), region (US census region).
How good is it?
Tested on 510 people and 15,552 product families that were both absent from training.
The test: given only a person's demographics and two products, one they bought and one that someone else bought, which did they buy? The other product is drawn in proportion to purchases, so popularity alone scores 50%.
| model | any two products | two products from the same Amazon category |
|---|---|---|
| this model | 0.616 [0.6018, 0.6322] | 0.555 [0.5407, 0.5688] |
| lookup table on Amazon's product category | 0.586 | 0.500 by construction |
| chance | 0.500 | 0.500 |
By attribute (AUC for predicting the buyer's value from the product text; 0.5 = no signal):
| attribute | AUC | log-loss gain over the prior (95% CI) |
|---|---|---|
| gender | 0.641 | +0.046 [0.034, 0.060] |
| age | 0.577 | +0.022 [0.013, 0.032] |
| education | 0.555 | +0.011 [0.006, 0.016] |
| hh_size | 0.552 | +0.010 [0.005, 0.016] |
| income | 0.545 | +0.015 [0.009, 0.020] |
| region | 0.515 | +0.001 [-0.001, 0.003] |
Gender and age carry most of the signal. Region carries none that could be measured; the loader lists it under
no_signal and leaves it out of top_segments.
Calibration. Across all test cases, binned by predicted lift:
| predicted lift | 0.63 | 0.86 | 0.94 | 1.00 | 1.06 | 1.16 | 1.35 | 1.77 |
|---|---|---|---|---|---|---|---|---|
| observed lift | 0.69 | 0.88 | 0.95 | 0.99 | 1.04 | 1.15 | 1.34 | 1.59 |
Extreme lifts are overstated a little. For a profile of several attributes, the chance that the first of two products is the one bought is sigmoid(0.69 x score difference): expected calibration error 0.009 on test.
Limits
- Relative, not absolute. A lift compares segments; it says nothing about how many people will buy.
- One retailer, one country, one period. Amazon.com, US, 2018-2022.
- A recruited panel, not a probability sample: younger and more educated than the US population. Lifts are relative to that panel's average shopper.
- Trained on product listing titles. Text that names the product works. Ad copy that only teases, without saying what is sold, gives the model nothing to read, and lifts come out near 1.
- Shared accounts. 29% of the accounts are used by more than one person, which blurs the labels. On single-user accounts the pair accuracy is 0.638.
- Modest accuracy. 62% against 50% for chance: useful for comparing segments across many products, not for judging one person.
- It does not predict how people respond to an ad. For ranking ad copy by click-through see Propensity One.
Sensitive attributes
The source survey also asked about race, Hispanic origin, sexual orientation, substance use, health conditions and life events such as pregnancy. The training pipeline never reads those fields, and the model has no outputs for them. Gender is female / male only because the 127 other answers were too few to estimate; those people remain in the data with gender missing. Do not use the model to infer an individual's characteristics from what they bought, or to exclude people from housing, employment, credit or similar offers.
Training
One pass over 698,930 person-product rows (3,706 people), batch 128, AdamW (encoder 3e-5, heads 1e-3), cross-entropy per attribute, rows weighted by 1 / sqrt(purchases of that person). One temperature per attribute and one for profiles are fitted on validation people. Splits are two-sided: people and product families (same ASIN or same first five title words) are each assigned to one split, and a row is used only when both agree.
Code, evaluation and the design record (ADR-0016): the propensity-one repository, snapshot openecom_brx-pipe-0.4.0.
Licence and attribution
Model weights: MIT, as the base model. Training data: Open e-commerce 1.0, CC0 1.0. Berke, A., Calacci, D., Mahari, R., Yabe, T., Larson, K. & Pentland, S. "Open e-commerce 1.0, five years of crowdsourced U.S. Amazon purchase histories with user demographics." Scientific Data 11, 491 (2024).
- Downloads last month
- 33
Model tree for areai51/propensity-one-audience
Base model
BAAI/bge-small-en-v1.5