APERTURE_AUDIT / docs /index.html
Darkweb007's picture
Initial commit: model-agnostic SHAP/LIME explainability audit dashboard
41dfe78
Raw
History Blame Contribute Delete
10.6 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aperture Audit</title>
<style>
:root {
--accent: #8B5CF6;
--accent-dim: rgba(139,92,246,0.28);
--bg: #0C0A14;
--panel: #17131F;
--border: #2A2438;
--text: #F2F3F5;
--muted: #97A0AE;
}
* { box-sizing: border-box; }
body {
margin: 0; background: var(--bg); color: var(--text);
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
-webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 28px; }
nav {
position: sticky; top: 0; z-index: 10;
background: rgba(10,10,12,0.75); backdrop-filter: blur(10px);
border-bottom: 1px solid var(--border);
}
nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.01em; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.navlinks { display: flex; gap: 28px; font-size: 0.92rem; color: var(--muted); }
.navlinks a:hover { color: var(--text); }
.hero {
position: relative; padding: 110px 0 80px; text-align: center; overflow: hidden;
}
.hero::before {
content: ""; position: absolute; top: -220px; left: 50%; transform: translateX(-50%);
width: 900px; height: 500px; background: radial-gradient(ellipse at center, var(--accent-dim) 0%, transparent 70%);
pointer-events: none;
}
.badge {
display: inline-block; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--accent);
color: var(--accent); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; margin-bottom: 28px;
position: relative;
}
.hero h1 {
font-size: 4.2rem; line-height: 1.02; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 24px;
background: linear-gradient(180deg, #fff 0%, #d7dbe2 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
position: relative;
}
.hero p.sub {
max-width: 640px; margin: 0 auto 40px; color: var(--muted); font-size: 1.15rem; line-height: 1.6;
position: relative;
}
.cta-row { display: flex; gap: 14px; justify-content: center; position: relative; flex-wrap: wrap; }
.btn {
padding: 15px 28px; border-radius: 12px; font-weight: 700; font-size: 0.98rem; display: inline-block;
transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #0A0A0C; box-shadow: 0 8px 30px var(--accent-dim); }
.btn-secondary { background: var(--panel); color: var(--text); border: 1px solid var(--border); }
section { padding: 60px 0; border-top: 1px solid var(--border); }
.eyebrow { color: var(--accent); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; margin-bottom: 14px; }
.headline-card {
background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 36px 40px;
font-size: 1.55rem; font-weight: 600; line-height: 1.45;
}
.headline-card b { color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 20px; }
.metric-card {
background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 22px 20px;
}
.metric-value { font-size: 2.1rem; font-weight: 800; color: var(--accent); margin-bottom: 6px; }
.metric-label { color: var(--muted); font-size: 0.88rem; line-height: 1.4; }
.steps { counter-reset: step; margin-top: 24px; }
.step { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.step:last-child { border-bottom: none; }
.step-num {
counter-increment: step; flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
background: var(--panel); border: 1px solid var(--accent); color: var(--accent);
display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem;
}
.step-num::before { content: counter(step); }
.step-title { font-weight: 700; margin-bottom: 4px; }
.step-desc { color: var(--muted); font-size: 0.95rem; line-height: 1.55; }
.findings { display: grid; gap: 14px; margin-top: 20px; }
.finding {
background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--accent);
border-radius: 10px; padding: 18px 20px; font-size: 0.98rem; line-height: 1.6; color: #DCE1E8;
}
footer { padding: 50px 0 70px; text-align: center; color: var(--muted); font-size: 0.88rem; }
footer a { color: var(--accent); font-weight: 600; }
.footer-links { margin-top: 14px; display: flex; gap: 24px; justify-content: center; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (max-width: 640px) {
.hero h1 { font-size: 2.6rem; }
.navlinks { display: none; }
}
</style>
</head>
<body>
<nav>
<div class="wrap">
<div class="brand"><span class="dot"></span> APA &middot; Aperture Audit Lab</div>
<div class="navlinks">
<a href="#results">Results</a>
<a href="#method">Method</a>
<a href="#findings">Findings</a>
<a href="https://github.com/data-geek-astronomy/APERTURE_AUDIT">GitHub</a>
</div>
</div>
</nav>
<section class="hero">
<div class="wrap">
<span class="badge">RESEARCH PREVIEW &middot; APA</span>
<h1>Aperture Audit</h1>
<p class="sub">A credit-decision dashboard where every prediction ships with an exact, closed-form SHAP-style attribution &mdash; cross-checked against an independently derived LIME explanation built from scratch, not just asserted.</p>
<div class="cta-row">
<a class="btn btn-primary" href="https://huggingface.co/spaces/Darkweb007/APERTURE_AUDIT">Launch live demo</a>
<a class="btn btn-secondary" href="https://github.com/data-geek-astronomy/APERTURE_AUDIT">Read the code</a>
</div>
</div>
</section>
<section id="results">
<div class="wrap">
<div class="eyebrow">HEADLINE RESULT</div>
<div class="headline-card">Two <b>independently-derived explanation methods</b> &mdash; exact SHAP attribution and a from-scratch LIME local surrogate &mdash; agreed on the direction of every feature's effect in <b>100% of a 140-decision cross-check</b> (20 applicants &times; 7 features).</div>
<div class="grid">
<div class="metric-card"><div class="metric-value">100%</div><div class="metric-label">SHAP / LIME sign agreement across 140 feature-decisions checked</div></div>
<div class="metric-card"><div class="metric-value">7</div><div class="metric-label">credit features attributed per decision, ranked by effect size</div></div>
<div class="metric-card"><div class="metric-value">0.99</div><div class="metric-label">average LIME local surrogate fidelity (R&sup2;)</div></div>
<div class="metric-card"><div class="metric-value">2</div><div class="metric-label">independently-derived explanation methods per decision</div></div>
</div>
</div>
</section>
<section id="method">
<div class="wrap">
<div class="eyebrow">METHOD</div>
<h2 style="margin:0 0 6px; font-size:1.6rem;">Two explanations, cross-checked, not just one asserted</h2>
<p style="color:var(--muted); max-width:640px; margin:0 0 10px;">Logistic regression is chosen deliberately: it's the case where SHAP attribution has an exact closed form, making it possible to verify the second, sampling-based method against it.</p>
<div class="steps">
<div class="step"><div class="step-num"></div><div><div class="step-title">Train</div><div class="step-desc">A logistic regression credit model is trained on synthetic applications with a known ground-truth generating function.</div></div></div>
<div class="step"><div class="step-num"></div><div><div class="step-title">Attribute (SHAP)</div><div class="step-desc">Each feature's exact contribution to a decision is computed in closed form: coefficient &times; (value &minus; population mean).</div></div></div>
<div class="step"><div class="step-num"></div><div><div class="step-title">Attribute (LIME)</div><div class="step-desc">Independently, 400 small random perturbations around the applicant are run back through the real model, and a local weighted regression recovers a second explanation with zero knowledge of the model's internals.</div></div></div>
<div class="step"><div class="step-num"></div><div><div class="step-title">Cross-check</div><div class="step-desc">The two explanations are compared feature by feature, on direction and magnitude, using the same additive formula for both.</div></div></div>
<div class="step"><div class="step-num"></div><div><div class="step-title">Narrate</div><div class="step-desc">The top 3 drivers of each decision are surfaced in plain language &mdash; the level of detail EU AI Act-style regulations require for high-stakes automated decisions.</div></div></div>
</div>
</div>
</section>
<section id="findings">
<div class="wrap">
<div class="eyebrow">FINDINGS</div>
<h2 style="margin:0 0 20px; font-size:1.6rem;">What the synthetic test runs showed</h2>
<div class="findings">
<div class="finding">An initial version of the cross-check compared raw LIME coefficient signs against SHAP's deviation-adjusted contributions &mdash; an apples-to-oranges mismatch that produced only 2/7 agreement. Fixing the comparison to use the same formula for both raised agreement to 100%.</div>
<div class="finding">Recovered model coefficients matched the sign of the synthetic data's true generating weights on all 7 features (e.g. late payments and debt-to-income both correctly learned as negative effects on approval).</div>
<div class="finding">LIME's local surrogate fidelity stayed above 0.99 R&sup2; across sampled applicants, meaning the local linear approximation captures the real model's behavior almost exactly in each applicant's neighborhood.</div>
</div>
</div>
</section>
<footer>
<div class="wrap">
<div>All data on this page is synthetic &mdash; part of a 5-project AI engineering portfolio.</div>
<div class="footer-links">
<a href="https://huggingface.co/spaces/Darkweb007/APERTURE_AUDIT">Live demo</a>
<a href="https://github.com/data-geek-astronomy/APERTURE_AUDIT">GitHub repo</a>
</div>
</div>
</footer>
</body>
</html>