CrashLoopBackOff

joined 7 months ago
[–] CrashLoopBackOff@lemmy.ca 1 points 3 weeks ago

What if the lack of comments were because comments weren't proportionally representative?

Someone sees a discussion that interests them, so they see what the top comments are. But if the Hive Mind(tm) has spoken (even if just by awarding the top two or three comments to the same viewpoint), will they engage, or will they go somewhere else?

Remove the Hive Mind, and maybe you'll get more engagement?

[–] CrashLoopBackOff@lemmy.ca 2 points 3 weeks ago (1 children)

I was thinking of it as a drop-in replacement for "hot" just so that it doesn't require any changes on the UI to implement. I'm a bit rusty with UI development, lol. The frontends wouldn't have to add a new button, and the Lemmy API wouldn't need to add a new sort type. That said, maybe that sort of thing is easy to do?

As far as it would work, Thiele's elimination rules is computed roughly as follows (I'm assuming that only upvotes are counted; I haven't considered yet if the process works if disapprovals count as a vote of "-1" or how the process could remain scalable if an abstention counts as a vote of "0.5":

begin with the list of posts, list of users, and list of votes

# initial weighting, takes O(E)
for each post:
    for each vote on the post:
        lookup the user that voted on the post
        based on the number of votes the user has given, determine how much the user would be made "unhappy" if the current post was removed
        # the basic idea here is that if the user didn't vote for a post, then they won't care if its removed
        # if the user did vote for a post, but also voted for 100 others, then they probably won't care if one gets removed as long as 99 remain
        # if the user did vote for a post, but only voted for 2 or 1 others, then they'll care more if this one gets removed
        # if this is the only post the user voted for, then they'll care a lot if it gets removed
        # LiquidFeedback uses a formula of "1/r", where r is the total number of votes the user has given
        # as posts get removed, the votes get removed too, so surviving votes get more weight
        # for the sake of efficiency, I'll probably use a formula like "if r > 20 then 0 else 1/r" so that users only start to contribute weight to posts once they only have 20 approvals left. Replace 20 with a constant of your choice
        add the user's resistance to the post being removed to the post

# initial heap construction, takes O(C)
construct a min-heap of the posts based on the sum of the users' resistances to the post being removed

# iterative removal of posts
while posts remain in the heap: # O(C)
    remove the first post in the heap - this has the least resistance to this post being marked 'last' in the current set # O(logC)
    yield the removed post

    for each vote for the removed post: # in total, O(E) - every vote is iterated once, across the entire lifetime of the heap
        lookup the user that voted on the post
        compute this user's resistance to this post being removed
        remove this vote from the user
        based on the number of remaining votes the user has given, compute the user's resistance to the next post being removed
        compute how much the user's resistance to their next post being removed increased (let this be "resistance increase")
        if "resistance increase" is nonzero (based on my formula, this will happen whenever they have less than 20 votes remaining, but not if they have more than 20 votes remaining):
            for each vote for a different post by this user:
                increase the post resistance to removal by "resistance increase"
                perform an "increase_key" operation on the min-heap for this post # this will be O(logC)

               # worst-case, each user will perform 20 + 19 + 18 + ... "increase_key" operations - 
               # they only begin once there are 20 votes remaining 

               # when they have 20 votes remaining, they have 20 increase_key's to do
               # when they have 19 votes remaining, they have 19 increase_key's to do
               # etc.

               # because this is a constant, it doesn't contribute to the time complexity analysis.
               # so each user performs at worst a constant number of O(logC) operations
               # so the overall time complexity of the "increase_key" operations is O(VlogC)

For this algorithm, the yield the removed post statement will return the sorted posts in reverse order. So worst to best. You could also interpret that statement as "Give the post a rank in the final sorting of count(posts) - (i++)".

Thiele says that process can be used to elect a committee of size N by stopping your removal when N votes remain. But because it's a "house monotonic" process (electoral speak for "increasing the size of the committee by one and re-running an election is guaranteed not to cost any existing members their seat), I figure it could be repurposed to produce a ranking as well - the top one item is "best one", the top two items are the best two, the top three are the best three, etc.

To make the above process work for approvals that decay over time, we'd just treat a decayed approval as a partial approval. I still have some work to do on how exactly to integrate partial approvals into the "resistance to removing each post" calculations without ruining my time complexity. But basically it's a proportional score voting election instead of proportional approval.

[–] CrashLoopBackOff@lemmy.ca 4 points 3 weeks ago* (last edited 3 weeks ago) (3 children)

This is exactly the info I'm looking for, thanks! I knew there'd have to be some kind of scheduled task to recompute the rankings (IIRC the lemmy docs say ~10 minutes for recomputing ranks), I just wasn't sure where it was.

The change that would require the least effort to implement my voting system (whether the lemmy maintainers would accept the change notwithstanding) would be to target the schedule task, and introduce a server-wide configuration option that would allow admins to pick whether they're using Block Approval (what we have now) or Proportional Approval (what I'm introducing) based algorithms for their server's "hot" algorithm. No API or frontent changes required. Then, work towards community mods being able to set that on a per-community basis.

Something for me to experiment with, anyway.

[–] CrashLoopBackOff@lemmy.ca 1 points 3 weeks ago (2 children)

I don't think it would work for my specific algorithm, unfortunately. To compute PAV, I need access to the "raw votes" of each individual user.

PAV doesn't need to know the identity of the user behind each upvote, but it does need to be able to correlate which upvotes originated from the same user so that once a user is determined to be "satisfied" by having a comment they upvoted given a high rank, all of their other upvotes need to be deweighted for the remainder of the process to "make room" for other users' opinions.

I checked the Lemmy API docs, and while that information is available at /api/v4/post/like/list and /api/v4/comment/like/list, so I could have a frontend that scraped every comment and then every like of every comment in a community (ignoring how inefficient that would be), but both of those endpoints are tagged as "Admin-only".

Plus, even if I could do that, to compute the rankings my process does need the upvotes of every comment in a post (or every post in a community) before it knows which one is on top, which seems too much to put on a client.

[–] CrashLoopBackOff@lemmy.ca 1 points 3 weeks ago (6 children)

Then the conversation would be dominated by whoever has the most time to make posts, which isn't what I'm going for. I'd rather have a method that satisfies Proportional Representation.

 

How would I add a new ranking algorithm to Lemmy as a contributor? I'm a developer by trade, but unfamiliar with Rust and the codebase of Lemmy specifically. It doesn't seem like Lemmy has a concept of 'ranking plugins', so whatever I do would have to involve an MR.

Specifically, I'd like to introduce a ranking system that approximates Proportional Approval Voting, specifically using Thiele's elimination methods, like is used in LiquidFeedback.

I'm pretty sure that with a few tweaks to Thiele's rules, I can compute a complete ranking of all comments in a thread in O(ClogC + E + VlogC), where C is the number of comments, E is the total number of likes, and V is the number of users. This would also support partial approvals, upvotes could decay with age.

I believe this would mitigate the tendency towards echo chambers that Lemmy inherits from Reddit. Lemmy effectively uses Block Approval Voting with decays to rank comments and posts, leading to the same people dominating every conversation.

 

Typical Republican argues that polarizing governance is actually a good thing.

 

The more people use Fedecan services, the more Fedecan will attract bots.

Which means Fedecan will have to do something for users to prove that they are human. When I joined, you guys had a registration prompt with manual review, but I imagine the prompts you gave could be automatically bypassed by an LLM fairly easily.

The naive solution is to do something like collecting government IDs like Facebook tried at one point. But that'll just drive people away who don't trust Fedecan with that info.

What would be your thoughts (admin thoughts, and community thoughts) to implement some 'proof of unique personhood' process with something like Canada Post Identity+? Basically, Canada Post verifies that users are human and is responsible for taking care of PII, and Fedecan just trusts Canada Post to not let the same user register multiple times. If done well, I think 'Canada Post proves that every user account on this site is a unique human' could be a real selling point for lemmy.ca and pixelfed.ca

Full disclosure, I heard about it in a Reddit thread of people complaining about bugs in it while they try to vote in the Liberal party election. But I bet this is just early adopter bugs, and the Liberal party clearly trusts it with their leadership elections.

Regardless, I think proof of unique personhood is a problem Fedecan will have to solve, and a solution through something as Canadian as the post office just seems more elegant than having the Fedecan admins reinvent the wheel.

I realize you guys (admins) are probably quite busy with IRL work and the Pixelfed launch, so if there was interest in this but no admin capacity to investigate further, I could volunteer to reach out to Canada Post and see what they could offer for non-profit use, including what it would cost Fedecan.

Thoughts?

EDIT: for people concerned about "but then CSIS knows which account is mine", an anonymous credential system like U-Prove could be used to prove "1 lemmy.ca user = 1 unique real person", while cryptographically guaranteeing it is impossible to link any particular lemmy.ca user to any particular human identity.

 

TLDR: Score Voting is good.

Canadians want national unity.

The ideal of the Good Parliamentarian claims that politicians should, once elected, represent all their constituents and not just their core base, and that a governing party should, once elected, represent the nation as a whole, and not just their members.

So why is national unity a fleeting thing that emerges only in response to external threats, like American rhetoric about annexation and economic coercion, and why does it dissipate and devolve into factionalism once the threat is resolved (or when political campaigns simply drown the threat out)?

Because the Westminster System, in its present form, is institutionally biased towards division.

There are two reasons:

  1. Within individual constituencies, a narrow majority of voters is enough to guarantee a win, and
  2. In Parliament, a narrow majority of constituencies is enough to form government and pass law.

These have a common root cause:

Acquiring a narrow majority of something is the most efficient way to achieve the maximum reward.

If the easiest path to a win is to get the support of half-plus-one, who cares if you alienate everyone else on the other side?

The Solution: the Score Bonus System

This proposal suggests an incentive-based solution to create national unity:

The Score Bonus System: award a winner-take-all block of seats to the party that achieves the highest average score nationally in a Score Voting election.

Under this system, Canada's existing single-member districts are replaced with about half as many dual-member districts, each containing one 'constituency' seat and one 'national' seat.

In each district, candidates stand either as a 'constituency' candidate or as a 'national' candidate.

Voters mark their ballots by assigning numerical scores between 0 and 9 to each candidate, where higher scores indicate stronger approval.

Unlike ranking systems, this allows voters to express support for multiple candidates simultaneously.

Sample Ballot, Mapleford North, filled in by a sample voter

Seat Party Candidate Score (0 to 9)
Constituency Brown Party Jaclyn Hodges 5
Taupe Party Dexter Preston 0
Independent Cecelia Olson 9
Janice Fritz 5
National Brown Party Isreal Robles 7
Gale Sloan 8
Taupe Party Royce Brown 0
Beige Party Billie Burton 9

Each district's 'constituency' seat goes to the 'constituency' candidate with the highest average score in the district.

The collection of all districts' 'national' seats form the 'winner-take-all' block, which is awarded in full to the party with the highest nationwide score.

When a party has multiple candidates competing in the same constituency:

  • When computing nationwide averages, the score of its best candidate in each constituency is used.
  • If the party wins the highest nationwide average, its best candidates from each constituency win the 'national' seats.

However, if no party achieves a national average score of at least 50%, the 'national' seats instead go to the 'national' candidate with the highest average score in the constituency, effectively falling back to the 'constituency' method.

Seat Type Breakdown

Seat Type Seat Count Winning Candidate From Each Constituency
Constituency 172 (one per constituency) 'Constituency' candidate with highest score within constituency
National 172 (one per constituency) If any party has >50% approval nationwide: best 'national' candidate from party with highest score nationwide; otherwise: 'national' candidate with highest score within constituency
Total 344 (two per constituency)

Example Election Results

Constituency Results, Mapleford North

Seat Party Candidate C. Score N. Party Score
Constituency Brown Party J. Hodges 65% N/A
Taupe Party D. Preston 20% N/A
Independent C. Olson (Constituency Seat Winner) 80% N/A
J. Fritz 70% N/A
National Brown Party (Winning Party) I. Robles (Eliminated by G. Sloan) 65% 75%
G. Sloan (National Seat Winner) 75%
Taupe Party R. Brown 15% 55%
Beige Party B. Burton 80% 65%

National Results

Constituency Brown Party Score Taupe Party Score Beige Party Score
Mapleford North 75% 15% 80%
Rivermere South 70% 70% 20%
Ashbourne Springs 80% 55% 25%
...
National Average 75% (Winner) 55% 65%

Takeaways from example election results:

  • All three parties exceeded the 50% minimum average score threshold to be eligible for the 'national' seats.
  • C. Olson, an Independent, won the constituency seat for Mapleford North by having the highest average score (80%) of any candidate in the constituency. The next best constituency candidate was J. Fritz, a fellow Independent, who got an average score of 70%.
  • The Brown Party won all 172 national seats by having the highest national average score (75%) of any party in the nation. The next best national party was the Beige Party, which got a national average score of 65%.
  • The Brown Party ran two candidates in Mapleford North: I. Robles and G. Sloan. Of these candidates, G. Sloan had the higher score, of 75%, so I. Robles was eliminated and G. Sloan contributed his 75% constituency score to the party's national average.
  • G. Sloan was the surviving 'national' candidate nominated by the Brown Party in Mapleford North. Because the Brown Party won all national seats, G. Sloan won the 'national' seat for Mapleford North.
  • Candidates running for constituency seats do not affect the scores of national parties

Why This System?

Consider two things true for all elections:

  1. Winning votes is expensive.
  2. The candidate with the most votes wins.

If a voter can support only one candidate at a time, then the cheapest winning strategy for a candidate is to acquire a slim majority, to the exclusion of nearly half the voters. Any more would be wasteful; any less no longer guarantees a win.

If a voter can instead support many candidates at a time, then a narrow majority no longer guarantees a win: all of a candidate's supporters may also approve of a competitor. A candidate with 60% approval loses to a candidate with 70% approval. This forces candidates into a competition not for the exclusive support of a narrow majority, but for the approval of as many as possible.

The only way a minority group can be excluded under electoral systems with concurrent voter support is if the minority group is so fundamentally incompatible with a candidate's current base that adding the minority would cost them more members from their current base than the minority adds. If adding the minority would result in a net increase in voter support, a candidate must include them, or lose to a competitor who does, even if that candidate already has the support of a majority. Because that majority might be just as satisfied with the competitor.

Electing single representatives

First Past the Post and Instant Runoff voting both fall into the first category (voters support one candidate at a time). Instant Runoff is effectively a sequence of First Past the Post elections; in each round, voters support their top choice. A narrow majority under either system guarantees a win. Hence, Division.

Compare with Score Voting. Voters support many candidates concurrently. Hence, Unity.

Electing multiple representatives

Traditional constituency elections, regardless how votes are counted within each constituency, and Proportional Representation both suffer from the same exclusive-voter-support problem as FPTP and IRV: Each seat is awarded to one representative, so parties and coalitions compete for a narrow majority within the legislature.

While Proportional Representation ensures the makeup of the legislature is proportional to the makeup of the electorate as a whole, it fails to incentivize the ruling coalition to include more than half of said representatives, or by extension, more than half of the nation. Therefore, as long as a ruling coalition is confident in its majority, it will ignore social and economic problems that impact voters outside of said majority, even in Proportional Representation.

Instead, the Score Bonus System creates a nationwide single-winner election to effectively elect the ruling party as a whole, and using Score Voting for this election creates an incentive for this party to include the interests of as many as possible.

Electoral Systems Review

System Optimal strategy Effect
Single Seat FPTP Secure a narrow majority of votes. Division & Exclusion
Single Seat IRV Secure a narrow majority of votes. Division & Exclusion
Single Seat Score Appeal to as many voters as possible. Unity & Inclusion
Traditional Constituency Elections Secure a narrow majority of districts. Division & Exclusion
Proportional Representation Secure a narrow majority of voters. Division & Exclusion
Score Bonus System Appeal to as many voters as possible. Unity & Inclusion

Why combine the winner-take-all component with per-constituency elections?

Because:

  • It maintains a constituency-first element to politics, even in the winner-take-all segment of Parliament. The ruling party, with a majority given to it through the winner-take-all segment, has a representative from each constituency.
  • Allowing multiple candidates from the same party to run in the same constituency forces candidates to compete with fellow party members to best represent a constituency
  • Having some seats that are elected only by constituency voters ensures each constituency has a representative accountable only to them
  • The national seats only being awarded if a party gets >50% approval lets us fall back to conventional 'coalition government formation' with constituency-elected representatives if the winner-take-all election fails to produce a party with at least majority support. This avoids a party with, say, 35% nationwide approval, getting an automatic Parliamentary majority.
  • Having both constituency and national elections occur on the same ballot avoids unnecessary complexity for the voters. Voters get a single Score Voting ballot.The ballot is as complex as is required to implement Score Voting, but no more complicated than that.

What next

I realize we're not getting Score Voting in Canada any time soon. It's not well known enough, and the 'winner-take-all block of seats' component may scare people away.

Plus, no politician content with their party having an effective monopoly on opposing the other side would ever consider supporting an electoral system as competitive as this.

Instead, I offer this electoral system to anyone who wants to take advantage of an "oh won't somebody do something" vibe to organize something, but wants to avoid their organization getting burned by the faulty electoral systems we have today.

A protocol for building a unified chapter-based organization:

  1. Launch regional chapters
  2. Each regional chapter randomly selects N interested participants, plus one or two 'chapter founders', to act as delegates to meet in a central location or online. The first conference will bootstrap the organization's 'internal parties'. Subsequent conferences evolve into a recurring networking event.
  3. Like-minded delegates, possibly assisted by 'political speed-dating', form 'internal parties'
  4. In each chapter, 'internal parties' nominate candidates for chapter and national seats.
  5. Each member scores each candidate in their chapter
  6. The highest scored 'chapter seat' candidate in each chapter becomes the chapter's local representative
  7. The highest scored 'internal party' across the organization as a whole wins one 'national' representative in each chapter
  8. Canadians, Unite!

Thoughts?