File size: 40,080 Bytes
e2409ff | 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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 | const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "Qian";
pres.title = "GRN-Guided Cascaded Flow Matching";
// === Color Palette ===
const C = {
navy: "0B1D3A",
deepBlue: "0E3B5C",
teal: "0D7377",
seafoam: "14B8A6",
mint: "99F6E4", // brightened for dark bg readability
gold: "F59E0B",
orange: "F97316",
coral: "EF4444",
white: "FFFFFF",
offWhite: "F0F4F8",
lightGray: "E2E8F0",
midGray: "94A3B8",
darkGray: "334155",
textDark: "1E293B",
textMid: "475569",
accent1: "3B82F6", // blue for expression
accent2: "F59E0B", // gold for GRN/latent
accent3: "10B981", // green for bio
subtitleOnDark: "A7F3D0", // bright mint-green for subtitles on navy
};
const cardShadow = () => ({ type: "outer", blur: 4, offset: 2, angle: 135, color: "000000", opacity: 0.10 });
// Slide number — placed safely out of content area
function addSlideNum(slide, num) {
slide.addText(String(num), {
x: 9.3, y: 5.2, w: 0.5, h: 0.3,
fontSize: 8, color: C.midGray, align: "right", fontFace: "Calibri",
});
}
// Section divider — centered vertically, improved contrast
function addDividerSlide(title, subtitle, num) {
const s = pres.addSlide();
s.background = { color: C.navy };
s.addShape(pres.shapes.RECTANGLE, { x: 0.7, y: 2.0, w: 0.8, h: 0.06, fill: { color: C.seafoam } });
s.addText(title, {
x: 0.7, y: 2.2, w: 8.6, h: 1.0,
fontSize: 36, fontFace: "Georgia", color: C.white, bold: true, margin: 0,
});
if (subtitle) {
s.addText(subtitle, {
x: 0.7, y: 3.3, w: 8.6, h: 0.6,
fontSize: 16, fontFace: "Calibri", color: C.subtitleOnDark, margin: 0,
});
}
addSlideNum(s, num);
return s;
}
// Content slide — title with teal top bar
function addContentSlide(title, num) {
const s = pres.addSlide();
s.background = { color: C.offWhite };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.06, fill: { color: C.teal } });
s.addText(title, {
x: 0.6, y: 0.15, w: 8.8, h: 0.55,
fontSize: 22, fontFace: "Georgia", color: C.textDark, bold: true, margin: 0,
});
addSlideNum(s, num);
return s;
}
let slideNum = 0;
// ============================================================
// SLIDE 1: Title
// ============================================================
slideNum++;
{
const s = pres.addSlide();
s.background = { color: C.navy };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: C.seafoam } });
s.addShape(pres.shapes.RECTANGLE, { x: 0.7, y: 1.2, w: 1.2, h: 0.06, fill: { color: C.gold } });
s.addText("GRN-Guided\nCascaded Flow Matching\nfor Single-Cell Perturbation Prediction", {
x: 0.7, y: 1.4, w: 8.6, h: 2.2,
fontSize: 30, fontFace: "Georgia", color: C.white, bold: true, margin: 0,
lineSpacingMultiple: 1.35,
});
s.addText("Gene Regulatory Network meets Flow Matching", {
x: 0.7, y: 3.75, w: 8.6, h: 0.4,
fontSize: 14, fontFace: "Calibri", color: C.subtitleOnDark, italic: true, margin: 0,
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.7, y: 4.35, w: 2.5, h: 0.02, fill: { color: C.midGray } });
s.addText("Group Meeting | 2026.03", {
x: 0.7, y: 4.5, w: 8.6, h: 0.4,
fontSize: 12, fontFace: "Calibri", color: C.lightGray, margin: 0,
});
addSlideNum(s, slideNum);
}
// ============================================================
// SLIDE 2: Section — Task
// ============================================================
slideNum++;
addDividerSlide("1. Task", "Single-Cell Perturbation Prediction", slideNum);
// ============================================================
// SLIDE 3: Virtual Cell + Perturbation Types
// ============================================================
slideNum++;
{
const s = addContentSlide("Virtual Cell & Perturbation Types", slideNum);
// Virtual Cell callout
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 0.9, w: 4.2, h: 1.15, fill: { color: C.white }, shadow: cardShadow() });
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 0.9, w: 0.07, h: 1.15, fill: { color: C.teal } });
s.addText([
{ text: "Virtual Cell", options: { bold: true, fontSize: 13, color: C.teal, breakLine: true } },
{ text: "AI model simulating real cell behavior: given genotype, environment, perturbation \u2192 predict molecular state changes. Perturbation prediction is its most critical subtask.", options: { fontSize: 10.5, color: C.textMid } },
], { x: 0.75, y: 0.95, w: 3.8, h: 1.05, valign: "top", fontFace: "Calibri", margin: 0 });
// Three perturbation type cards (right)
const types = [
{ title: "Drug Perturbation", desc: "Small molecules / drugs (L1000/LINCS)", color: C.accent1 },
{ title: "Cytokine Perturbation", desc: "Cytokines (IL-6, TNF-a, IFN-g) signaling", color: C.accent3 },
{ title: "Genetic Perturbation", desc: "CRISPR KO / CRISPRa OE / RNAi KD", color: C.accent2 },
];
const cardX = 5.0, cardW = 4.5, cardH = 0.7;
types.forEach((t, i) => {
const yy = 0.9 + i * (cardH + 0.12);
s.addShape(pres.shapes.RECTANGLE, { x: cardX, y: yy, w: cardW, h: cardH, fill: { color: C.white }, shadow: cardShadow() });
s.addShape(pres.shapes.RECTANGLE, { x: cardX, y: yy, w: 0.07, h: cardH, fill: { color: t.color } });
s.addText(t.title, {
x: cardX + 0.2, y: yy + 0.05, w: 4.0, h: 0.28,
fontSize: 11.5, fontFace: "Calibri", bold: true, color: C.textDark, margin: 0,
});
s.addText(t.desc, {
x: cardX + 0.2, y: yy + 0.35, w: 4.0, h: 0.3,
fontSize: 9.5, fontFace: "Calibri", color: C.textMid, margin: 0,
});
});
// Focus banner
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 3.4, w: 9.0, h: 0.5, fill: { color: C.navy } });
s.addText("This work: genetic perturbation (Perturb-seq) = CRISPR perturbation + scRNA-seq readout", {
x: 0.7, y: 3.42, w: 8.6, h: 0.46,
fontSize: 11.5, fontFace: "Calibri", color: C.white, bold: true, margin: 0, valign: "middle",
});
// Task formalization
s.addText([
{ text: "Task: ", options: { bold: true, color: C.teal, fontSize: 13 } },
{ text: "x_ctrl + perturbation ID \u2192 predict x_pert (x \u2208 R^G, G \u2248 5000 HVG)", options: { color: C.textDark, fontSize: 12, fontFace: "Consolas" } },
], { x: 0.5, y: 4.05, w: 9.0, h: 0.35, fontFace: "Calibri", margin: 0 });
// Key challenges
s.addText([
{ text: "Drug screening acceleration | Combinatorial explosion: N genes \u2192 N(N-1)/2 combos | ", options: { fontSize: 10, color: C.textMid, breakLine: false } },
{ text: "No paired data (destructive measurement)", options: { fontSize: 10, color: C.coral, bold: true } },
], { x: 0.5, y: 4.45, w: 9.0, h: 0.35, fontFace: "Calibri", margin: 0 });
}
// ============================================================
// SLIDE 4: Section — Existing Methods
// ============================================================
slideNum++;
addDividerSlide("2. Existing Methods", "And their common blind spot", slideNum);
// ============================================================
// SLIDE 5: Methods Overview Table
// ============================================================
slideNum++;
{
const s = addContentSlide("Existing Methods: Overview", slideNum);
const methods = [
{ name: "Additive Shift", cat: "Baseline", approach: "Mean shift: x = x_ctrl + delta_mean", issue: "Ignores cell heterogeneity" },
{ name: "scGPT", cat: "Foundation Model", approach: "Masked token completion (fine-tune)", issue: "Encodes absolute state, not change" },
{ name: "Geneformer", cat: "Foundation Model", approach: "In-silico: delete gene token", issue: "Heuristic, no learned dynamics" },
{ name: "CPA", cat: "Dedicated Model", approach: "VAE: basal + perturbation (additive)", issue: "Linear additivity too strong" },
{ name: "GEARS", cat: "Dedicated Model", approach: "GNN on GO graph + cross-attention", issue: "Static prior graph, deterministic" },
{ name: "STATE", cat: "Dedicated Model", approach: "Stacked attention on expression", issue: "Deterministic, no GRN modeling" },
{ name: "CellFlow", cat: "Flow Matching", approach: "FM + pretrained embedding cond.", issue: "Embedding = absolute state" },
{ name: "scDFM", cat: "Flow Matching", approach: "Conditional FM + DiffPerceiver", issue: "No GRN understanding" },
];
const hY = 0.85;
const cols = [
{ x: 0.5, w: 1.5, label: "Method" },
{ x: 2.0, w: 1.5, label: "Category" },
{ x: 3.5, w: 3.2, label: "Approach" },
{ x: 6.7, w: 2.8, label: "Key Limitation" },
];
// Header
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: hY, w: 9.0, h: 0.35, fill: { color: C.teal } });
cols.forEach(c => {
s.addText(c.label, {
x: c.x + 0.08, y: hY, w: c.w - 0.08, h: 0.35,
fontSize: 10, fontFace: "Calibri", bold: true, color: C.white, valign: "middle", margin: 0,
});
});
// Data rows
const rowH = 0.37;
methods.forEach((m, i) => {
const ry = hY + 0.35 + i * rowH;
const bgColor = i % 2 === 0 ? C.white : "F8FAFC";
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: ry, w: 9.0, h: rowH, fill: { color: bgColor } });
s.addText(m.name, {
x: cols[0].x + 0.08, y: ry, w: cols[0].w - 0.08, h: rowH,
fontSize: 9.5, fontFace: "Calibri", bold: true, color: C.textDark, valign: "middle", margin: 0,
});
s.addText(m.cat, {
x: cols[1].x + 0.08, y: ry, w: cols[1].w - 0.08, h: rowH,
fontSize: 9, fontFace: "Calibri", color: C.textMid, valign: "middle", margin: 0,
});
s.addText(m.approach, {
x: cols[2].x + 0.08, y: ry, w: cols[2].w - 0.08, h: rowH,
fontSize: 9, fontFace: "Calibri", color: C.textDark, valign: "middle", margin: 0,
});
s.addText(m.issue, {
x: cols[3].x + 0.08, y: ry, w: cols[3].w - 0.08, h: rowH,
fontSize: 9, fontFace: "Calibri", color: C.coral, bold: true, valign: "middle", margin: 0,
});
});
// Common blind spot callout
const bY = hY + 0.35 + methods.length * rowH + 0.3;
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: bY, w: 9.0, h: 0.7, fill: { color: C.navy } });
s.addText([
{ text: "Common blind spot: ", options: { bold: true, color: C.gold, fontSize: 13 } },
{ text: "Perturbation \u2192 [black box] \u2192 Expression change", options: { color: C.white, fontSize: 13, breakLine: true } },
{ text: "No method explicitly models: Perturbation \u2192 GRN rewiring \u2192 Expression change", options: { color: C.subtitleOnDark, fontSize: 11 } },
], { x: 0.7, y: bY + 0.03, w: 8.6, h: 0.65, fontFace: "Calibri", valign: "middle", margin: 0 });
}
// ============================================================
// SLIDE 6: Section — Motivation
// ============================================================
slideNum++;
addDividerSlide("3. Motivation", "Why GRN + Flow Matching?", slideNum);
// ============================================================
// SLIDE 7: Motivation 1 — Flow Matching
// ============================================================
slideNum++;
{
const s = addContentSlide("Motivation 1: Flow Matching for Unpaired Data", slideNum);
// Problem card (left)
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 0.9, w: 4.2, h: 1.8, fill: { color: C.white }, shadow: cardShadow() });
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 0.9, w: 0.07, h: 1.8, fill: { color: C.coral } });
s.addText([
{ text: "The Pairing Problem", options: { bold: true, fontSize: 13, color: C.coral, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 5 } },
{ text: "Perturbation is destructive:", options: { fontSize: 11, color: C.textDark, breakLine: true } },
{ text: "One cell measured ONCE only", options: { fontSize: 11, color: C.textDark, breakLine: true } },
{ text: "No (x_ctrl, x_pert) pairs available", options: { fontSize: 11, color: C.coral, bold: true, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 5 } },
{ text: "Mean matching \u2192 loses heterogeneity", options: { bullet: true, fontSize: 10, color: C.textMid, breakLine: true } },
{ text: "Autoencoder \u2192 limited reconstruction", options: { bullet: true, fontSize: 10, color: C.textMid } },
], { x: 0.75, y: 0.95, w: 3.8, h: 1.7, fontFace: "Calibri", valign: "top", margin: 0 });
// Solution card (right)
s.addShape(pres.shapes.RECTANGLE, { x: 5.0, y: 0.9, w: 4.5, h: 1.8, fill: { color: C.white }, shadow: cardShadow() });
s.addShape(pres.shapes.RECTANGLE, { x: 5.0, y: 0.9, w: 0.07, h: 1.8, fill: { color: C.accent3 } });
s.addText([
{ text: "Flow Matching Solution", options: { bold: true, fontSize: 13, color: C.accent3, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 5 } },
{ text: "Learn probabilistic transport mapping\nbetween distributions (not individual cells)", options: { fontSize: 11, color: C.textDark, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 5 } },
{ text: "Only needs population-level distributions", options: { bullet: true, fontSize: 10, color: C.textMid, breakLine: true } },
{ text: "Conditional OT for efficient pairing", options: { bullet: true, fontSize: 10, color: C.textMid, breakLine: true } },
{ text: "Generative output = uncertainty estimation", options: { bullet: true, fontSize: 10, color: C.textMid } },
], { x: 5.25, y: 0.95, w: 4.1, h: 1.7, fontFace: "Calibri", valign: "top", margin: 0 });
// Flow diagram
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 3.0, w: 9.0, h: 1.6, fill: { color: C.white }, shadow: cardShadow() });
s.addShape(pres.shapes.OVAL, { x: 1.2, y: 3.25, w: 1.8, h: 1.1, fill: { color: "FEE2E2" } });
s.addText("noise x\u2080", { x: 1.2, y: 3.25, w: 1.8, h: 1.1, fontSize: 12, fontFace: "Calibri", color: C.coral, align: "center", valign: "middle", bold: true, margin: 0 });
s.addText("v\u03B8( x, t, ctrl, pert )", {
x: 3.2, y: 3.45, w: 3.6, h: 0.5,
fontSize: 14, fontFace: "Consolas", color: C.teal, align: "center", valign: "middle", bold: true, margin: 0,
});
s.addShape(pres.shapes.RECTANGLE, { x: 3.5, y: 3.95, w: 3.0, h: 0.04, fill: { color: C.teal } });
s.addText("learned velocity field (ODE)", {
x: 3.2, y: 4.0, w: 3.6, h: 0.3,
fontSize: 9, fontFace: "Calibri", color: C.textMid, align: "center", margin: 0,
});
s.addShape(pres.shapes.OVAL, { x: 7.0, y: 3.25, w: 1.8, h: 1.1, fill: { color: "D1FAE5" } });
s.addText("predicted\nx_pert", { x: 7.0, y: 3.25, w: 1.8, h: 1.1, fontSize: 12, fontFace: "Calibri", color: C.accent3, align: "center", valign: "middle", bold: true, margin: 0 });
}
// ============================================================
// SLIDE 8: Motivation 2 — GRN Cascade
// ============================================================
slideNum++;
{
const s = addContentSlide("Motivation 2: Perturbation Propagates via GRN", slideNum);
// Cascade diagram (left)
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 0.9, w: 5.5, h: 2.8, fill: { color: C.white }, shadow: cardShadow() });
const steps = [
{ text: "CRISPR knock-out Gene A", color: C.coral, bold: true },
{ text: "Gene A expression --> 0", color: C.coral, bold: false },
{ text: "Direct targets B, C, D change (1st order)", color: C.accent2, bold: false },
{ text: "B->E,F C->G,H D->I ... (cascade)", color: C.accent2, bold: false },
{ text: "Thousands of genes ultimately affected", color: C.teal, bold: true },
];
steps.forEach((st, i) => {
const yy = 1.05 + i * 0.45;
s.addText((i > 0 ? " | " : " ") + st.text, {
x: 0.8, y: yy, w: 5.0, h: 0.38,
fontSize: 11, fontFace: "Calibri", color: st.color, bold: st.bold, margin: 0,
});
});
s.addText("This cascade path = Gene Regulatory Network (GRN)", {
x: 0.8, y: 3.3, w: 5.0, h: 0.3,
fontSize: 11, fontFace: "Calibri", color: C.navy, bold: true, italic: true, margin: 0,
});
// Comparison cards (right)
s.addShape(pres.shapes.RECTANGLE, { x: 6.3, y: 0.9, w: 3.2, h: 1.2, fill: { color: "FEF3C7" }, shadow: cardShadow() });
s.addText([
{ text: "Existing Methods", options: { bold: true, fontSize: 12, color: C.textDark, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 4 } },
{ text: "Pert -> [black box] -> Expr", options: { fontSize: 11, fontFace: "Consolas", color: C.coral, breakLine: true } },
{ text: "End-to-end, no GRN understanding", options: { fontSize: 10, color: C.textMid } },
], { x: 6.5, y: 0.95, w: 2.9, h: 1.1, fontFace: "Calibri", valign: "top", margin: 0 });
s.addShape(pres.shapes.RECTANGLE, { x: 6.3, y: 2.3, w: 3.2, h: 1.4, fill: { color: "D1FAE5" }, shadow: cardShadow() });
s.addText([
{ text: "Our Approach", options: { bold: true, fontSize: 12, color: C.textDark, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 4 } },
{ text: "Pert -> GRN change -> Expr", options: { fontSize: 11, fontFace: "Consolas", color: C.accent3, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 4 } },
{ text: "Explicitly model how perturbation rewires the regulatory network, then predict expression", options: { fontSize: 10, color: C.textDark } },
], { x: 6.5, y: 2.35, w: 2.9, h: 1.3, fontFace: "Calibri", valign: "top", margin: 0 });
// Bottom insight
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 4.1, w: 9.0, h: 0.5, fill: { color: C.navy } });
s.addText("Understanding GRN changes is a prerequisite for accurate expression prediction", {
x: 0.7, y: 4.12, w: 8.6, h: 0.46,
fontSize: 12, fontFace: "Calibri", color: C.gold, bold: true, margin: 0, valign: "middle",
});
}
// ============================================================
// SLIDE 9: Motivation 3 — scGPT Attention = GRN
// ============================================================
slideNum++;
{
const s = addContentSlide("Motivation 3: scGPT Attention = Data-Driven GRN", slideNum);
// Left: explanation
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 0.9, w: 4.5, h: 2.1, fill: { color: C.white }, shadow: cardShadow() });
s.addText([
{ text: "scGPT Transformer Attention", options: { bold: true, fontSize: 13, color: C.teal, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 5 } },
{ text: "attn[i][j] high -> gene j influences gene i", options: { fontSize: 11, fontFace: "Consolas", color: C.textDark, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 5 } },
{ text: "= Context-dependent, data-driven GRN", options: { fontSize: 12, color: C.navy, bold: true, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 5 } },
{ text: "vs static GO graph:", options: { bold: true, fontSize: 10, color: C.textMid, breakLine: true } },
{ text: "Changes with cell state (context-aware)", options: { bullet: true, fontSize: 10, color: C.textMid, breakLine: true } },
{ text: "Learned from massive scRNA-seq data", options: { bullet: true, fontSize: 10, color: C.textMid, breakLine: true } },
{ text: "Captures non-linear regulatory logic", options: { bullet: true, fontSize: 10, color: C.textMid } },
], { x: 0.7, y: 0.95, w: 4.1, h: 2.0, fontFace: "Calibri", valign: "top", margin: 0 });
// Right: Attention-Delta
s.addShape(pres.shapes.RECTANGLE, { x: 5.3, y: 0.9, w: 4.2, h: 2.1, fill: { color: C.white }, shadow: cardShadow() });
s.addShape(pres.shapes.RECTANGLE, { x: 5.3, y: 0.9, w: 0.07, h: 2.1, fill: { color: C.gold } });
s.addText([
{ text: "Attention-Delta", options: { bold: true, fontSize: 13, color: C.accent2, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 5 } },
{ text: "Same frozen scGPT, two inputs:", options: { fontSize: 11, color: C.textDark, breakLine: true } },
{ text: "attn_ctrl = scGPT(x_ctrl)", options: { fontSize: 10.5, fontFace: "Consolas", color: C.accent1, breakLine: true } },
{ text: "attn_pert = scGPT(x_pert)", options: { fontSize: 10.5, fontFace: "Consolas", color: C.coral, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 4 } },
{ text: "delta_attn = attn_pert - attn_ctrl", options: { fontSize: 11, fontFace: "Consolas", color: C.navy, bold: true, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 4 } },
{ text: "Directly captures how perturbation\nrewires gene regulatory relationships", options: { fontSize: 10, color: C.textDark } },
], { x: 5.55, y: 0.95, w: 3.8, h: 2.0, fontFace: "Calibri", valign: "top", margin: 0 });
// Bottom: GRN features formula
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 3.3, w: 9.0, h: 1.25, fill: { color: C.navy } });
s.addText([
{ text: "GRN Change Features:", options: { bold: true, fontSize: 14, color: C.gold, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 4 } },
{ text: "z = delta_attn x gene_embeddings", options: { fontSize: 17, fontFace: "Consolas", color: C.white, breakLine: true } },
{ text: " (G x G) (G x 512) --> (G x 512)", options: { fontSize: 11, fontFace: "Consolas", color: C.subtitleOnDark } },
], { x: 0.7, y: 3.35, w: 8.6, h: 1.15, fontFace: "Calibri", valign: "top", margin: 0 });
}
// ============================================================
// SLIDE 10: Section — Our Method
// ============================================================
slideNum++;
addDividerSlide("4. Our Method", "GRN-Guided Cascaded Flow Matching", slideNum);
// ============================================================
// SLIDE 11: Two-Stage Cascaded FM
// ============================================================
slideNum++;
{
const s = addContentSlide("Two-Stage Cascaded Flow Matching", slideNum);
// Stage 1 card
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 0.9, w: 4.0, h: 2.0, fill: { color: C.white }, shadow: cardShadow() });
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 0.9, w: 0.07, h: 2.0, fill: { color: C.gold } });
s.addText([
{ text: "Stage 1: GRN Latent Flow", options: { bold: true, fontSize: 13, color: C.accent2, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 6 } },
{ text: "noise ==(ODE)==> GRN features", options: { fontSize: 12, fontFace: "Consolas", color: C.textDark, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 6 } },
{ text: "\"Understand how gene regulation\n changes under perturbation\"", options: { fontSize: 11, color: C.accent2, italic: true, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 6 } },
{ text: "t_latent: 0 -> 1", options: { fontSize: 10, fontFace: "Consolas", color: C.textMid, breakLine: true } },
{ text: "t_expr = 0 (expression frozen)", options: { fontSize: 10, fontFace: "Consolas", color: C.textMid } },
], { x: 0.75, y: 0.95, w: 3.6, h: 1.9, fontFace: "Calibri", valign: "top", margin: 0 });
// Arrow
s.addShape(pres.shapes.RECTANGLE, { x: 4.6, y: 1.75, w: 0.7, h: 0.04, fill: { color: C.teal } });
s.addText(">", { x: 5.0, y: 1.55, w: 0.5, h: 0.5, fontSize: 24, color: C.teal, align: "center", valign: "middle", fontFace: "Calibri", bold: true, margin: 0 });
// Stage 2 card
s.addShape(pres.shapes.RECTANGLE, { x: 5.5, y: 0.9, w: 4.0, h: 2.0, fill: { color: C.white }, shadow: cardShadow() });
s.addShape(pres.shapes.RECTANGLE, { x: 5.5, y: 0.9, w: 0.07, h: 2.0, fill: { color: C.accent1 } });
s.addText([
{ text: "Stage 2: Expression Flow", options: { bold: true, fontSize: 13, color: C.accent1, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 6 } },
{ text: "noise ==(ODE)==> expression", options: { fontSize: 12, fontFace: "Consolas", color: C.textDark, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 6 } },
{ text: "\"Based on GRN understanding,\n predict gene expression changes\"", options: { fontSize: 11, color: C.accent1, italic: true, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 6 } },
{ text: "t_expr: 0 -> 1", options: { fontSize: 10, fontFace: "Consolas", color: C.textMid, breakLine: true } },
{ text: "t_latent = 1 (GRN complete)", options: { fontSize: 10, fontFace: "Consolas", color: C.textMid } },
], { x: 5.75, y: 0.95, w: 3.6, h: 1.9, fontFace: "Calibri", valign: "top", margin: 0 });
// Bio intuition banner
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 3.15, w: 9.0, h: 0.55, fill: { color: C.navy } });
s.addText("Bio intuition: First understand HOW regulation changes, THEN predict WHAT expression changes", {
x: 0.7, y: 3.18, w: 8.6, h: 0.5,
fontSize: 12, fontFace: "Calibri", color: C.gold, bold: true, margin: 0, valign: "middle",
});
// Training note card
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 3.95, w: 9.0, h: 0.85, fill: { color: C.white }, shadow: cardShadow() });
s.addText([
{ text: "Cascaded Training: ", options: { bold: true, fontSize: 12, color: C.teal } },
{ text: "Probabilistic switching (not simultaneous)", options: { fontSize: 12, color: C.textDark, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 4 } },
{ text: "40% Train Latent Flow: t_latent random, t_expr=0, loss_latent only", options: { fontSize: 10, fontFace: "Consolas", color: C.accent2, breakLine: true } },
{ text: "60% Train Expr Flow: t_expr random, t_latent~1, loss_expr only", options: { fontSize: 10, fontFace: "Consolas", color: C.accent1 } },
], { x: 0.7, y: 4.0, w: 8.6, h: 0.75, fontFace: "Calibri", valign: "top", margin: 0 });
}
// ============================================================
// SLIDE 12: Model Architecture
// ============================================================
slideNum++;
{
const s = addContentSlide("Model Architecture", slideNum);
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 0.85, w: 9.0, h: 4.2, fill: { color: C.white }, shadow: cardShadow() });
// --- Top: Two input streams ---
s.addShape(pres.shapes.RECTANGLE, { x: 0.8, y: 1.0, w: 3.5, h: 0.6, fill: { color: "DBEAFE" } });
s.addText([
{ text: "Expression Stream", options: { bold: true, fontSize: 11, color: C.accent1, breakLine: true } },
{ text: "GeneEnc(id) + ValueEnc(x_t, x_ctrl) -> tokens", options: { fontSize: 8.5, fontFace: "Consolas", color: C.textMid } },
], { x: 0.9, y: 1.03, w: 3.3, h: 0.55, fontFace: "Calibri", valign: "middle", margin: 0 });
s.addShape(pres.shapes.RECTANGLE, { x: 5.7, y: 1.0, w: 3.5, h: 0.6, fill: { color: "FEF3C7" } });
s.addText([
{ text: "Latent Stream (GRN)", options: { bold: true, fontSize: 11, color: C.accent2, breakLine: true } },
{ text: "LatentEmbedder(z_t) -> tokens", options: { fontSize: 8.5, fontFace: "Consolas", color: C.textMid } },
], { x: 5.8, y: 1.03, w: 3.3, h: 0.55, fontFace: "Calibri", valign: "middle", margin: 0 });
// Plus
s.addShape(pres.shapes.OVAL, { x: 4.5, y: 1.05, w: 0.5, h: 0.5, fill: { color: C.teal } });
s.addText("+", { x: 4.5, y: 1.05, w: 0.5, h: 0.5, fontSize: 20, color: C.white, align: "center", valign: "middle", bold: true, margin: 0 });
// Down arrow
s.addText("|", { x: 4.5, y: 1.6, w: 0.5, h: 0.3, fontSize: 14, color: C.teal, align: "center", valign: "middle", margin: 0 });
s.addText("V", { x: 4.5, y: 1.8, w: 0.5, h: 0.2, fontSize: 10, color: C.teal, align: "center", valign: "middle", margin: 0 });
// --- Shared Backbone ---
s.addShape(pres.shapes.RECTANGLE, { x: 1.5, y: 2.1, w: 3.8, h: 1.5, fill: { color: C.teal } });
s.addText([
{ text: "Shared Backbone", options: { bold: true, fontSize: 13, color: C.white, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 3 } },
{ text: "DiffPerceiverBlock x 4", options: { fontSize: 11, color: C.mint, breakLine: true } },
{ text: "(GeneadaLN + Adapter + DiffAttn)", options: { fontSize: 9, color: C.mint, breakLine: true } },
{ text: "d_model = 512", options: { fontSize: 10, fontFace: "Consolas", color: C.white } },
], { x: 1.6, y: 2.15, w: 3.6, h: 1.4, fontFace: "Calibri", valign: "middle", align: "center", margin: 0 });
// --- Conditioning box ---
s.addShape(pres.shapes.RECTANGLE, { x: 6.0, y: 2.1, w: 3.2, h: 0.55, fill: { color: "E0E7FF" } });
s.addText("c = t_expr + t_latent + pert_emb", {
x: 6.05, y: 2.1, w: 3.1, h: 0.55,
fontSize: 9, fontFace: "Consolas", color: C.accent1, valign: "middle", align: "center", margin: 0,
});
s.addText("Cond.", {
x: 5.35, y: 2.15, w: 0.6, h: 0.45,
fontSize: 8, fontFace: "Calibri", color: C.textMid, valign: "middle", align: "center", margin: 0,
});
// --- Frozen scGPT box ---
s.addShape(pres.shapes.RECTANGLE, { x: 6.0, y: 2.9, w: 3.2, h: 1.65, fill: { color: "F1F5F9" }, line: { color: C.midGray, width: 1, dashType: "dash" } });
s.addText([
{ text: "Frozen scGPT", options: { bold: true, fontSize: 11, color: C.darkGray, breakLine: true } },
{ text: "(no gradient)", options: { fontSize: 8, color: C.midGray, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 3 } },
{ text: "x_ctrl, x_pert", options: { fontSize: 9, fontFace: "Consolas", color: C.accent1, breakLine: true } },
{ text: " -> attention layer 11", options: { fontSize: 9, fontFace: "Consolas", color: C.midGray, breakLine: true } },
{ text: "delta_attn x gene_emb", options: { fontSize: 9, fontFace: "Consolas", color: C.accent2, breakLine: true } },
{ text: " -> z_target (B,G,512)", options: { fontSize: 9, fontFace: "Consolas", color: C.accent2 } },
], { x: 6.1, y: 2.95, w: 3.0, h: 1.55, fontFace: "Calibri", valign: "top", margin: 0 });
// --- Two decoder heads ---
s.addShape(pres.shapes.RECTANGLE, { x: 1.5, y: 3.9, w: 1.7, h: 0.6, fill: { color: "DBEAFE" } });
s.addText([
{ text: "Expr Head", options: { bold: true, fontSize: 10, color: C.accent1, breakLine: true } },
{ text: "v_expr (B,G)", options: { fontSize: 9, fontFace: "Consolas", color: C.textMid } },
], { x: 1.5, y: 3.93, w: 1.7, h: 0.55, fontFace: "Calibri", valign: "middle", align: "center", margin: 0 });
s.addShape(pres.shapes.RECTANGLE, { x: 3.6, y: 3.9, w: 1.7, h: 0.6, fill: { color: "FEF3C7" } });
s.addText([
{ text: "Latent Head", options: { bold: true, fontSize: 10, color: C.accent2, breakLine: true } },
{ text: "v_latent (B,G,512)", options: { fontSize: 9, fontFace: "Consolas", color: C.textMid } },
], { x: 3.6, y: 3.93, w: 1.7, h: 0.55, fontFace: "Calibri", valign: "middle", align: "center", margin: 0 });
}
// ============================================================
// SLIDE 13: Section — Challenges
// ============================================================
slideNum++;
addDividerSlide("5. Current Challenges", "And proposed solutions", slideNum);
// ============================================================
// SLIDE 14: Challenges + Solutions
// ============================================================
slideNum++;
{
const s = addContentSlide("Challenges & Solutions", slideNum);
// Challenge 1 (top-left)
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 0.9, w: 4.3, h: 2.0, fill: { color: C.white }, shadow: cardShadow() });
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 0.9, w: 0.07, h: 2.0, fill: { color: C.coral } });
s.addText([
{ text: "Challenge 1: Noise in Attention", options: { bold: true, fontSize: 12, color: C.coral, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 4 } },
{ text: "Attention: 5000x5000 = 25M non-zero values", options: { fontSize: 10, color: C.textDark, breakLine: true } },
{ text: "Real GRN: ~20-50 regulators per gene", options: { fontSize: 10, color: C.textDark, breakLine: true } },
{ text: "99%+ values are noise!", options: { fontSize: 11, color: C.coral, bold: true, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 4 } },
{ text: "Evidence: latent loss ~ 1.12", options: { fontSize: 10, color: C.textMid, breakLine: true } },
{ text: " >> expr loss ~ 0.019", options: { fontSize: 10, color: C.textMid } },
], { x: 0.75, y: 0.95, w: 3.9, h: 1.9, fontFace: "Calibri", valign: "top", margin: 0 });
// Solution 1 (top-right)
s.addShape(pres.shapes.RECTANGLE, { x: 5.2, y: 0.9, w: 4.3, h: 2.0, fill: { color: C.white }, shadow: cardShadow() });
s.addShape(pres.shapes.RECTANGLE, { x: 5.2, y: 0.9, w: 0.07, h: 2.0, fill: { color: C.accent3 } });
s.addText([
{ text: "Solution: Sparse Top-K", options: { bold: true, fontSize: 12, color: C.accent3, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 4 } },
{ text: "Per gene: keep only K=30 largest |delta|", options: { fontSize: 10, color: C.textDark, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 4 } },
{ text: "delta_attn (GxG) 25M values", options: { fontSize: 9.5, fontFace: "Consolas", color: C.coral, breakLine: true } },
{ text: " -> top-K sparsification", options: { fontSize: 9.5, fontFace: "Consolas", color: C.textMid, breakLine: true } },
{ text: "sparse_delta (Gx30) filter 99.4%", options: { fontSize: 9.5, fontFace: "Consolas", color: C.accent3, breakLine: true } },
{ text: " -> x gene_emb = (G,512)", options: { fontSize: 9.5, fontFace: "Consolas", color: C.accent3 } },
], { x: 5.45, y: 0.95, w: 3.9, h: 1.9, fontFace: "Calibri", valign: "top", margin: 0 });
// Challenge 2 (bottom-left)
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 3.2, w: 4.3, h: 1.2, fill: { color: C.white }, shadow: cardShadow() });
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 3.2, w: 0.07, h: 1.2, fill: { color: C.coral } });
s.addText([
{ text: "Challenge 2: 512-d Latent Too Hard", options: { bold: true, fontSize: 12, color: C.coral, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 4 } },
{ text: "(G,512) = 2.5M-dim velocity field per step", options: { fontSize: 10, color: C.textDark, breakLine: true } },
{ text: "Ablation: dim 512->1: loss 1.1 -> 0.5-0.7", options: { fontSize: 10, fontFace: "Consolas", color: C.textDark } },
], { x: 0.75, y: 3.25, w: 3.9, h: 1.1, fontFace: "Calibri", valign: "top", margin: 0 });
// Solution 2 (bottom-right)
s.addShape(pres.shapes.RECTANGLE, { x: 5.2, y: 3.2, w: 4.3, h: 1.2, fill: { color: C.white }, shadow: cardShadow() });
s.addShape(pres.shapes.RECTANGLE, { x: 5.2, y: 3.2, w: 0.07, h: 1.2, fill: { color: C.accent3 } });
s.addText([
{ text: "Solution: PCA Reduction", options: { bold: true, fontSize: 12, color: C.accent3, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 4 } },
{ text: "sparse_delta x pca_basis -> (G, 64)", options: { fontSize: 10, fontFace: "Consolas", color: C.textDark, breakLine: true } },
{ text: "Keep principal directions, 8x reduction", options: { fontSize: 10, color: C.textMid } },
], { x: 5.45, y: 3.25, w: 3.9, h: 1.1, fontFace: "Calibri", valign: "top", margin: 0 });
}
// ============================================================
// SLIDE 15: Section — Summary
// ============================================================
slideNum++;
addDividerSlide("6. Summary & Future Work", "Validating the biological hypothesis", slideNum);
// ============================================================
// SLIDE 16: Summary + Future Experiment
// ============================================================
slideNum++;
{
const s = addContentSlide("Summary & Key Future Experiment", slideNum);
// Core contribution
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 0.85, w: 9.0, h: 0.9, fill: { color: C.navy } });
s.addText([
{ text: "Core contribution: ", options: { bold: true, color: C.gold, fontSize: 12 } },
{ text: "Not architectural improvement -- biological mechanism-driven modeling", options: { color: C.white, fontSize: 12, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 3 } },
{ text: "Existing: Pert -> [black box] -> Expr ", options: { fontSize: 10, fontFace: "Consolas", color: C.midGray } },
{ text: "Ours: Pert -> GRN rewiring -> Expr", options: { fontSize: 10, fontFace: "Consolas", color: C.subtitleOnDark } },
], { x: 0.7, y: 0.88, w: 8.6, h: 0.85, fontFace: "Calibri", valign: "middle", margin: 0 });
// Future experiment
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 2.0, w: 9.0, h: 2.3, fill: { color: C.white }, shadow: cardShadow() });
s.addText([
{ text: "Key Future Experiment: Does inference order matter?", options: { bold: true, fontSize: 14, color: C.teal, breakLine: true } },
{ text: "", options: { breakLine: true, fontSize: 4 } },
{ text: "Train with random t1, t2 (no cascade). Compare inference orders:", options: { fontSize: 11, color: C.textDark } },
], { x: 0.7, y: 2.05, w: 8.6, h: 0.7, fontFace: "Calibri", valign: "top", margin: 0 });
const rows = [
{ order: "GRN first -> Expr", meaning: "Understand regulation, then predict", expected: "Best", bg: "D1FAE5", color: C.accent3 },
{ order: "Expr first -> GRN", meaning: "Predict first, understand after", expected: "Suboptimal", bg: "FEF3C7", color: C.accent2 },
{ order: "Simultaneous", meaning: "No explicit order", expected: "Worst", bg: "FEE2E2", color: C.coral },
];
rows.forEach((r, i) => {
const ry = 2.85 + i * 0.45;
s.addShape(pres.shapes.RECTANGLE, { x: 0.8, y: ry, w: 8.4, h: 0.38, fill: { color: r.bg } });
s.addText(r.order, {
x: 0.9, y: ry, w: 2.8, h: 0.38,
fontSize: 11, fontFace: "Consolas", color: C.textDark, bold: true, valign: "middle", margin: 0,
});
s.addText(r.meaning, {
x: 3.8, y: ry, w: 3.2, h: 0.38,
fontSize: 10, fontFace: "Calibri", color: C.textMid, valign: "middle", margin: 0,
});
s.addText(r.expected, {
x: 7.2, y: ry, w: 1.8, h: 0.38,
fontSize: 12, fontFace: "Calibri", color: r.color, bold: true, valign: "middle", align: "center", margin: 0,
});
});
// Hypothesis
s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 4.55, w: 9.0, h: 0.5, fill: { color: C.navy } });
s.addText([
{ text: "Hypothesis: ", options: { bold: true, color: C.gold, fontSize: 12 } },
{ text: "Understanding GRN changes is a prerequisite for expression prediction, not a byproduct.", options: { color: C.white, fontSize: 12 } },
], { x: 0.7, y: 4.57, w: 8.6, h: 0.46, fontFace: "Calibri", valign: "middle", margin: 0 });
}
// ============================================================
// SLIDE 17: Closing
// ============================================================
slideNum++;
{
const s = pres.addSlide();
s.background = { color: C.navy };
s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: C.seafoam } });
s.addShape(pres.shapes.RECTANGLE, { x: 0.7, y: 1.5, w: 1.0, h: 0.06, fill: { color: C.gold } });
s.addText("Takeaway", {
x: 0.7, y: 1.7, w: 8.6, h: 0.5,
fontSize: 18, fontFace: "Georgia", color: C.white, bold: true, margin: 0,
});
s.addText("Use scGPT attention-delta to explicitly extract perturbation-induced GRN changes, and through cascaded flow matching, force the model to \"first understand how GRN changes, then predict how expression changes\" -- embedding the biological prior that perturbation propagates through GRN into the generative model's inference process.", {
x: 0.7, y: 2.4, w: 8.6, h: 2.0,
fontSize: 16, fontFace: "Georgia", color: C.white, lineSpacingMultiple: 1.5, margin: 0,
});
s.addShape(pres.shapes.RECTANGLE, { x: 0.7, y: 4.6, w: 2.5, h: 0.02, fill: { color: C.midGray } });
s.addText("Thank you!", {
x: 0.7, y: 4.75, w: 8.6, h: 0.45,
fontSize: 16, fontFace: "Georgia", color: C.white, bold: true, margin: 0,
});
addSlideNum(s, slideNum);
}
// === Save ===
const outPath = "/home/hp250092/ku50001222/qian/aivc/lfj/Report/GRN_CCFM_group_meeting.pptx";
pres.writeFile({ fileName: outPath }).then(() => {
console.log("Saved to: " + outPath);
}).catch(err => {
console.error("Error:", err);
});
|