Skip to content

Trust propagation

Step 1 in the pipeline

Trust propagation is tasked to combine pretrusts and vouches to derive trust scores for the different users.

TrustPropagation

Bases: ABC

Base class for Trust Propagation algorithms

__call__

__call__(users: DataFrame, vouches: DataFrame) -> DataFrame

Propagates trust through vouch network

Parameters:

Name Type Description Default
users DataFrame

with columns

  • user_id (int, index)
  • is_pretrusted (bool)
required
vouches DataFrame

with columns

  • voucher (str)
  • vouchee (str)
  • vouch (float)
required

Returns:

Name Type Description
users DataFrame

with columns

  • user_id (int, index)
  • is_pretrusted (bool)
  • trust_score (float)

to_json

to_json()

NoTrustPropagation

NoTrustPropagation(pretrust_value: float = 0.8)

Bases: TrustPropagation

Implements no trust propagation. The result trust_score is directly based on the "pretrusted" status of each user.

Parameters:

Name Type Description Default
pretrust_value float

trust score to assign to pretrusted users

0.8

pretrust_value

pretrust_value = pretrust_value

__call__

__call__(users: DataFrame, vouches: DataFrame) -> DataFrame

to_json

to_json()

LipschiTrust

LipschiTrust(
    pretrust_value: float = 0.8,
    decay: float = 0.8,
    sink_vouch: float = 5.0,
    error: float = 1e-08,
)

Bases: TrustPropagation

A robustified variant of PageRank. In this algorithm, we leverage pre-trust (e.g., based on email domains) and vouching to securely assign trust scores to a wider set of contributors. The algorithm inputs pre-trust status and a vouching directed graph.

Parameters:

Name Type Description Default
pretrust_value float

The pretrust of a pretrusted user. (\(Trust^{pre}_{\checkmark}\) in paper) The algorithm guarantees that every pre-trusted user is given a trust score which is at least pretrust_value. Moreover, all users' trust score will be at most 1.

0.8
decay float

The decay of trusts in voucher's vouchees. (\(\beta\) in paper) When considering a random walker on the vouch network, (1 - decay) is the probability that the random walker resets its walk at each iteration. LipschiTrust essentially robustifies the random walk, by frequently preventing the walker from visiting too frequently visited contributors, thereby bounding the maximal influence of such contributors.

0.8
sink_vouch float

used to incentivize vouching (\(V^{sink}_{\checkmark}\) in paper) In our model we assume that each participating contributor implicitly vouches for a sink. The sink counts for sink_vouch vouchees. As a result, when a contributor with less than sink_vouch vouchees vouches for more vouchees, the amount of trust scores the contributor assigns grows almost linearly, thereby not penalizing previously vouched contributors. Vouching is thereby not (too) disincentivized.

5.0
error float

Positive, is an upper bound on error, in L1 norm. \(\epsilon_{LipschiTrust}\) in paper

1e-08

pretrust_value

pretrust_value = pretrust_value

decay

decay = decay

sink_vouch

sink_vouch = sink_vouch

error

error = error

__call__

__call__(users: DataFrame, vouches: DataFrame) -> DataFrame

to_json

to_json()

NoopTrust

Bases: TrustPropagation

Noop implementation for trust propagation: trust values are simply read from the input users.

__call__

__call__(
    users: DataFrame, _vouches: DataFrame
) -> DataFrame

to_json

to_json()

TrustAll

Bases: TrustPropagation

A naive implementation that assigns an equal amount of trust to all users.

__call__

__call__(users: DataFrame, vouches: DataFrame)