File size: 3,070 Bytes
2a95347
94769b3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2a95347
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="data:,">
<title>Next Federation</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<main>
  <header>
    <h1>Next Federation</h1>
    <p>Clients hold differently distributed handwritten-digit data and never share it. Change how skewed the clients are and how often they drop out, then rerun FedAvg, FedProx and local-only training. All clients are simulated inside this browser tab.</p>
    <div class="badges"><span class="badge warn">Simulation: no real devices</span><span class="badge">Live in-browser training</span><span class="badge">UCI digits (CC BY 4.0)</span><a class="badge" href="https://huggingface.co/thelamapi/Next-Federation">Model repo</a></div>
  </header>
  <div class="grid">
    <section class="card">
      <h2>Clients</h2>
      <label for="alpha">Label skew, Dirichlet α (small = each client sees few digits): <b id="alpha_v"></b></label>
      <input type="range" id="alpha" min="0" max="8" step="1" value="2">
      <label for="drop">Dropout: chance a client's update is lost each round: <b id="drop_v"></b></label>
      <input type="range" id="drop" min="0" max="0.6" step="0.05" value="0.2">
      <label for="clients">Clients: <b id="clients_v"></b></label>
      <input type="range" id="clients" min="4" max="20" step="1" value="10">
      <label for="rounds">Rounds: <b id="rounds_v"></b></label>
      <input type="range" id="rounds" min="5" max="40" step="1" value="20">
      <label for="seed">Seed: <b id="seed_v"></b></label>
      <input type="range" id="seed" min="0" max="30" step="1" value="1">
      <div class="row" style="margin-top:10px"><button id="run">Run simulation</button></div>
      <p class="status" id="status">Loading…</p>
    </section>
    <section class="card">
      <h2>Client data (digit classes per client)</h2>
      <canvas id="dist"></canvas>
      <h2 style="margin-top:12px">Global test accuracy by round</h2>
      <canvas id="curve"></canvas><div id="cl"></div>
    </section>
  </div>
  <div class="grid" style="margin-top:12px">
    <section class="card"><h2>Accuracy on each client's own test data</h2><canvas id="bars"></canvas>
      <p class="small muted">Blue FedAvg, green FedProx, grey local-only model of that client.</p></section>
    <section class="card"><h2>Summary</h2><div class="scroll"><table id="tbl"></table></div>
      <p class="small muted">Traffic counts model downloads to every client and uploads that arrive (float32 weights).</p></section>
  </div>
  <section class="card" style="margin-top:12px"><h2>Recorded benchmark</h2><img src="preview.png" alt="Benchmark summary" style="width:100%;border-radius:8px"></section>
  <footer>Federated learning is simulated in a single process; no data leaves your browser and no devices are contacted.</footer>
</main>
<script src="nlrt.js"></script>
<script src="nlui.js"></script>
<script src="core.js"></script>
<script src="app.js"></script>
</body>
</html>