Skip to content

Add BondsPenalty hyperparam#181

Closed
opentaco wants to merge 1 commit intomainfrom
feature/bonds_penalty
Closed

Add BondsPenalty hyperparam#181
opentaco wants to merge 1 commit intomainfrom
feature/bonds_penalty

Conversation

@opentaco
Copy link
Contributor

Add BondsPenalty hyperparam

Given recent issues with (partially) blacklisted validators getting poor dividends, we've been exploring the possibility of adjusting the validation bonds penalty to improve their dividends.

Bonds penalty: Weight higher than consensus gets clipped, and bonds calculated from this then also get clipped, which means dividends get clipped. Cabal that sets weights on its own poor servers have their bonds cut and receive less dividends.
Validation advantage: Setting weight on the highest performing servers, means that dividends will be relatively better. Cabal that sets weights on its own poor servers will get less dividends because those servers get less incentive.

Suggestion: Adjust bonds penalty per netuid, with a default zero penalty, keep validation advantage.
Expected result: Partially blacklisted validators that set more weights on a fewer set of servers will enjoy full bonds on those, instead of getting bonds cut like when validation penalty applies.

Security guarantees:
A foremost concern is how this will affect the consensus security guarantees, so we simulate that as part of the subtensor integration tests with the _map_consensus_guarantees() function, and do a comparison with/without bonds penalty.
We observe as slight erosion of guarantees, at one point quantified as a 73% -> 79% honest utility increase required @ 60% honest stake to retain at least 60% emission. This is acceptable given that we gain significant alleviation of poor dividends due to blacklisting.

Copy link
Contributor

@Eugene-hu Eugene-hu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; when do you think we can release this update taco?

// Calculate weights for bonds, apply bonds penalty to weights.
// bonds_penalty = 0: weights_for_bonds = weights.clone()
// bonds_penalty = 1: weights_for_bonds = clipped_weights.clone()
let weights_for_bonds: Vec<Vec<I32F32>> = interpolate( &weights, &clipped_weights, bonds_penalty);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if the bonds penalty = 0.5, will the interpolate function return an average between weights and clipped weights?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is correct, the unit tests for interpolate has examples of this.

@opentaco opentaco requested a review from shibshib August 24, 2023 16:02
@opentaco
Copy link
Contributor Author

opentaco commented Aug 24, 2023

LGTM; when do you think we can release this update taco?

Once outstanding approvals are granted, it can be merged.
@shibshib please merge before the next chain upgrade.

}

#[pallet::call_index(59)]
#[pallet::weight((Weight::from_ref_time(14_000_000)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this benchmarked? If not, will add it to the list of features that need benchmarking before we push latest chain upgrade.

Copy link
Contributor

@camfairchild camfairchild Aug 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was not Edit: not my PR, oops

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this benchmarked? If not, will add it to the list of features that need benchmarking before we push latest chain upgrade.

No it wasn't benchmarked, but copied the time of another u16 hyperparam.

@welikethestock welikethestock deleted the feature/bonds_penalty branch November 29, 2023 00:18
@Rubberbandits Rubberbandits restored the feature/bonds_penalty branch November 29, 2023 00:21
@Rubberbandits Rubberbandits reopened this Nov 29, 2023
@unconst unconst closed this Mar 27, 2024
@unconst unconst deleted the feature/bonds_penalty branch March 27, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants