File size: 18,850 Bytes
345ccf6 | 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 | <svg xmlns="http://www.w3.org/2000/svg" width="1800" height="1320" viewBox="0 0 1800 1320">
<title>A02b architecture: conditional frame encoder for musical CC1 expression</title>
<desc>Additive frame representations and broadcast controls feed two residual convolutions and four bidirectional FiLM encoder blocks. Each encoder block uses separate attention and feed-forward FiLM modules, residual connections, relative attention bias and padding masks. The CC1 head produces a value for every frame.</desc>
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#52677E"/></marker>
<marker id="teal-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#27836E"/></marker>
</defs>
<rect width="1800" height="1320" fill="white"/>
<g font-family="Arial, Helvetica, sans-serif" fill="#172B43">
<text x="60" y="62" font-size="45" font-weight="bold" fill="#172B43" text-anchor="start">A02b</text>
<text x="205" y="62" font-size="34" font-weight="normal" fill="#172B43" text-anchor="start">Conditional frame encoder for musical expression</text>
<text x="60" y="103" font-size="25" font-weight="normal" fill="#637489" text-anchor="start">Shared architecture of S03 · B01 · W01 · U01</text>
<text x="1740" y="103" font-size="24" font-weight="normal" fill="#637489" text-anchor="end">d = 96 | L = 4 | heads = 4</text>
<rect x="40" y="135" width="1720" height="540" rx="16" fill="#FBFCFE" stroke="#D6DFE9" stroke-width="1.5"/>
<text x="70" y="175" font-size="28" font-weight="bold" fill="#172B43" text-anchor="start">A Model overview</text>
<text x="70" y="211" font-size="23" font-weight="normal" fill="#637489" text-anchor="start">One hidden state per frame · 16 frames / beat · one-beat input-defined tail</text>
<rect x="70" y="240" width="435" height="105" rx="10" fill="#E5F3EF" stroke="#BCCADA" stroke-width="1.5"/>
<text x="287.5" y="272" font-size="25" font-weight="bold" fill="#172B43" text-anchor="middle">Global conditioning</text>
<text x="287.5" y="302" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">Mood (16-D) + role (8-D) + family (8-D)</text>
<text x="287.5" y="329" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">Concatenate with 6 numerical controls</text>
<rect x="550" y="240" width="270" height="105" rx="10" fill="#E5F3EF" stroke="#BCCADA" stroke-width="1.5"/>
<text x="685.0" y="272" font-size="25" font-weight="bold" fill="#172B43" text-anchor="middle">Control MLP</text>
<text x="685.0" y="302" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">38 → 64 → 64</text>
<text x="685.0" y="329" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">GELU between linear layers</text>
<path d="M 505 292 L 550 292" fill="none" stroke="#27836E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="8 6" marker-end="url(#teal-arrow)"/>
<text x="868" y="282" font-size="28" font-weight="bold" fill="#27836E" text-anchor="middle">c</text>
<text x="868" y="314" font-size="21" font-weight="normal" fill="#27836E" text-anchor="middle">[B,64]</text>
<path d="M 820 292 L 845 292" fill="none" stroke="#27836E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="8 6" marker-end="url(#teal-arrow)"/>
<rect x="550" y="370" width="270" height="77" rx="10" fill="#E5F3EF" stroke="#BCCADA" stroke-width="1.5"/>
<text x="685.0" y="402" font-size="25" font-weight="bold" fill="#172B43" text-anchor="middle">Control projection</text>
<text x="685.0" y="432" font-size="20" font-weight="normal" fill="#637489" text-anchor="middle">64 → 96 · broadcast over T</text>
<path d="M 685 345 L 685 370" fill="none" stroke="#27836E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="8 6" marker-end="url(#teal-arrow)"/>
<path d="M 892 292 L 1260 292 L 1260 468" fill="none" stroke="#27836E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="8 6" marker-end="url(#teal-arrow)"/>
<text x="1090" y="281" font-size="21" font-weight="normal" fill="#27836E" text-anchor="middle">FiLM in every block</text>
<path d="M 820 408 L 900 408 L 900 509" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<rect x="70" y="370" width="435" height="77" rx="10" fill="#EAF2FA" stroke="#BCCADA" stroke-width="1.5"/>
<text x="287.5" y="402" font-size="25" font-weight="bold" fill="#172B43" text-anchor="middle">Lead pitch</text>
<text x="287.5" y="432" font-size="22" font-weight="normal" fill="#637489" text-anchor="middle">[B,T] → embedding 129 × 96</text>
<rect x="70" y="465" width="435" height="77" rx="10" fill="#EAF2FA" stroke="#BCCADA" stroke-width="1.5"/>
<text x="287.5" y="497" font-size="25" font-weight="bold" fill="#172B43" text-anchor="middle">Pitch / onset / offset rolls</text>
<text x="287.5" y="527" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">3 × [B,T,128] → separate 128 → 96</text>
<rect x="70" y="560" width="435" height="77" rx="10" fill="#EAF2FA" stroke="#BCCADA" stroke-width="1.5"/>
<text x="287.5" y="592" font-size="25" font-weight="bold" fill="#172B43" text-anchor="middle">25 numerical frame features</text>
<text x="287.5" y="622" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">Velocity gate → linear 25 → 96</text>
<path d="M 505 409 L 525 409 L 525 531" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M 505 504 L 525 504" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M 505 599 L 525 599 L 525 531" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M 525 531 L 878 531" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<text x="685" y="522" font-size="23" font-weight="normal" fill="#637489" text-anchor="middle">Add projected streams</text>
<circle cx="900" cy="531" r="22" fill="white" stroke="#52677E" stroke-width="2.5"/>
<text x="900" y="541" font-size="34" font-weight="normal" fill="#172B43" text-anchor="middle">+</text>
<path d="M 922 531 L 965 531" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<rect x="965" y="468" width="160" height="126" rx="10" fill="#EAF2FA" stroke="#BCCADA" stroke-width="1.5"/>
<text x="1045.0" y="500" font-size="22" font-weight="bold" fill="#172B43" text-anchor="middle">Local context</text>
<text x="1045.0" y="530" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">2 × Conv1D</text>
<text x="1045.0" y="557" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">k = 5 · GELU</text>
<text x="1045.0" y="584" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">+ residual</text>
<path d="M 1125 531 L 1160 531" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<rect x="1160" y="468" width="200" height="126" rx="10" fill="#EFECF8" stroke="#BCCADA" stroke-width="1.5"/>
<text x="1260.0" y="500" font-size="25" font-weight="bold" fill="#172B43" text-anchor="middle">Encoder × 4</text>
<text x="1260.0" y="530" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">Bidirectional</text>
<text x="1260.0" y="557" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">self-attention</text>
<text x="1260.0" y="584" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">Pre-norm + FiLM</text>
<path d="M 1360 531 L 1395 531" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<rect x="1395" y="468" width="310" height="126" rx="10" fill="#FCF0E2" stroke="#BCCADA" stroke-width="1.5"/>
<text x="1550.0" y="500" font-size="25" font-weight="bold" fill="#172B43" text-anchor="middle">Framewise CC1 head</text>
<text x="1550.0" y="530" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">LayerNorm → linear 96 → 1</text>
<text x="1550.0" y="557" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">Sigmoid → mask padded frames</text>
<text x="1550.0" y="584" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">y ∈ [0,1] [B,T]</text>
<text x="1075" y="630" font-size="23" font-weight="normal" fill="#637489" text-anchor="middle">Hidden shape stays [B,T,96] throughout the backbone</text>
<text x="1075" y="658" font-size="20" font-weight="normal" fill="#637489" text-anchor="middle">Padding zeroed at fusion and after each convolution</text>
<text x="1545" y="432" font-size="23" font-weight="bold" fill="#92622B" text-anchor="middle">CC1 at every valid frame</text>
<text x="1545" y="635" font-size="25" font-weight="normal" fill="#92622B" text-anchor="middle">CC1 = lo + y · (hi − lo)</text>
<rect x="40" y="700" width="1720" height="440" rx="16" fill="#FBFCFE" stroke="#D6DFE9" stroke-width="1.5"/>
<text x="70" y="740" font-size="28" font-weight="bold" fill="#172B43" text-anchor="start">B One encoder block</text>
<text x="70" y="776" font-size="23" font-weight="normal" fill="#637489" text-anchor="start">Independent FiLM modules for attention and feed-forward paths · repeated four times</text>
<text x="93" y="866" font-size="27" font-weight="bold" fill="#172B43" text-anchor="middle">h</text>
<text x="93" y="899" font-size="20" font-weight="normal" fill="#637489" text-anchor="middle">[B,T,96]</text>
<rect x="150" y="840" width="130" height="70" rx="10" fill="#EAF2FA" stroke="#BCCADA" stroke-width="1.5"/>
<text x="215.0" y="883.0" font-size="21" font-weight="bold" fill="#172B43" text-anchor="middle">LayerNorm</text>
<rect x="310" y="840" width="135" height="70" rx="10" fill="#E5F3EF" stroke="#BCCADA" stroke-width="1.5"/>
<text x="377.5" y="883.0" font-size="25" font-weight="bold" fill="#172B43" text-anchor="middle">FiLM</text>
<rect x="475" y="840" width="245" height="70" rx="10" fill="#EFECF8" stroke="#BCCADA" stroke-width="1.5"/>
<text x="597.5" y="872" font-size="23" font-weight="bold" fill="#172B43" text-anchor="middle">Self-attention</text>
<text x="597.5" y="902" font-size="20" font-weight="normal" fill="#637489" text-anchor="middle">4 heads · noncausal</text>
<rect x="750" y="840" width="135" height="70" rx="10" fill="#EAF2FA" stroke="#BCCADA" stroke-width="1.5"/>
<text x="817.5" y="883.0" font-size="22" font-weight="bold" fill="#172B43" text-anchor="middle">Dropout</text>
<circle cx="930" cy="875" r="22" fill="white" stroke="#52677E" stroke-width="2.5"/>
<text x="930" y="885" font-size="34" font-weight="normal" fill="#172B43" text-anchor="middle">+</text>
<rect x="975" y="840" width="130" height="70" rx="10" fill="#EAF2FA" stroke="#BCCADA" stroke-width="1.5"/>
<text x="1040.0" y="883.0" font-size="21" font-weight="bold" fill="#172B43" text-anchor="middle">LayerNorm</text>
<rect x="1135" y="840" width="135" height="70" rx="10" fill="#E5F3EF" stroke="#BCCADA" stroke-width="1.5"/>
<text x="1202.5" y="883.0" font-size="25" font-weight="bold" fill="#172B43" text-anchor="middle">FiLM</text>
<rect x="1300" y="840" width="215" height="70" rx="10" fill="#EFECF8" stroke="#BCCADA" stroke-width="1.5"/>
<text x="1407.5" y="872" font-size="23" font-weight="bold" fill="#172B43" text-anchor="middle">Feed-forward</text>
<text x="1407.5" y="902" font-size="18" font-weight="normal" fill="#637489" text-anchor="middle">96 → 384 → 96 · GELU</text>
<rect x="1545" y="840" width="125" height="70" rx="10" fill="#EAF2FA" stroke="#BCCADA" stroke-width="1.5"/>
<text x="1607.5" y="883.0" font-size="21" font-weight="bold" fill="#172B43" text-anchor="middle">Dropout</text>
<circle cx="1710" cy="875" r="22" fill="white" stroke="#52677E" stroke-width="2.5"/>
<text x="1710" y="885" font-size="34" font-weight="normal" fill="#172B43" text-anchor="middle">+</text>
<path d="M 115 875 L 150 875" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<path d="M 280 875 L 310 875" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<path d="M 445 875 L 475 875" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<path d="M 720 875 L 750 875" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<path d="M 885 875 L 908 875" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<path d="M 952 875 L 975 875" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<path d="M 1105 875 L 1135 875" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<path d="M 1270 875 L 1300 875" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<path d="M 1515 875 L 1545 875" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<path d="M 1670 875 L 1688 875" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<path d="M 1732 875 L 1740 875" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<path d="M 125 875 L 125 810 L 930 810 L 930 853" fill="none" stroke="#8997A7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<path d="M 958 875 L 958 970 L 1710 970 L 1710 897" fill="none" stroke="#8997A7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<text x="1460" y="960" font-size="20" font-weight="normal" fill="#637489" text-anchor="middle">residual</text>
<text x="378" y="935" font-size="22" font-weight="normal" fill="#27836E" text-anchor="middle">(1 + Δγ) ⊙ u + β</text>
<text x="1203" y="935" font-size="22" font-weight="normal" fill="#27836E" text-anchor="middle">(1 + Δγ) ⊙ u + β</text>
<text x="930" y="935" font-size="20" font-weight="normal" fill="#637489" text-anchor="middle">mask</text>
<text x="1710" y="935" font-size="20" font-weight="normal" fill="#637489" text-anchor="middle">mask</text>
<text x="1390" y="802" font-size="23" font-weight="bold" fill="#27836E" text-anchor="middle">c [B,64]</text>
<path d="M 1300 790 L 378 790 L 378 840" fill="none" stroke="#27836E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="8 6" marker-end="url(#teal-arrow)"/>
<path d="M 1203 790 L 1203 840" fill="none" stroke="#27836E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" stroke-dasharray="8 6" marker-end="url(#teal-arrow)"/>
<rect x="70" y="995" width="350" height="108" rx="10" fill="#EFECF8" stroke="#BCCADA" stroke-width="1.5"/>
<text x="245.0" y="1027" font-size="22" font-weight="bold" fill="#172B43" text-anchor="middle">Signed relative attention bias</text>
<text x="245.0" y="1057" font-size="19" font-weight="normal" fill="#637489" text-anchor="middle">32 buckets × 4 heads</text>
<text x="245.0" y="1084" font-size="19" font-weight="normal" fill="#637489" text-anchor="middle">One learned table shared across layers</text>
<rect x="455" y="995" width="290" height="108" rx="10" fill="#F0F3F7" stroke="#BCCADA" stroke-width="1.5"/>
<text x="600.0" y="1027" font-size="23" font-weight="bold" fill="#172B43" text-anchor="middle">Padding-key mask</text>
<text x="600.0" y="1057" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">Invalid keys receive −∞</text>
<text x="600.0" y="1084" font-size="21" font-weight="normal" fill="#637489" text-anchor="middle">Rests and tail remain valid</text>
<path d="M 420 1049 L 440 1049 L 440 952 L 580 952 L 580 910" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<path d="M 600 995 L 600 952 L 615 952 L 615 910" fill="none" stroke="#52677E" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" marker-end="url(#arrow)"/>
<text x="1170" y="1055" font-size="24" font-weight="normal" fill="#637489" text-anchor="middle">Padding is zeroed after each residual update.</text>
<text x="1170" y="1090" font-size="23" font-weight="normal" fill="#637489" text-anchor="middle">Each FiLM maps c: 64 → 192, split into Δγ and β.</text>
<text x="65" y="1185" font-size="25" font-weight="bold" fill="#172B43" text-anchor="start">Published variants</text>
<rect x="65" y="1205" width="365" height="78" rx="10" fill="#F4F6F9" stroke="#BCCADA" stroke-width="1.5"/>
<text x="247.5" y="1237" font-size="22" font-weight="bold" fill="#172B43" text-anchor="middle">S03</text>
<text x="247.5" y="1267" font-size="19" font-weight="normal" fill="#637489" text-anchor="middle">string · 1 family · 13 moods</text>
<rect x="500" y="1205" width="365" height="78" rx="10" fill="#F4F6F9" stroke="#BCCADA" stroke-width="1.5"/>
<text x="682.5" y="1237" font-size="22" font-weight="bold" fill="#172B43" text-anchor="middle">B01</text>
<text x="682.5" y="1267" font-size="19" font-weight="normal" fill="#637489" text-anchor="middle">brass · 1 family · 15 moods</text>
<rect x="935" y="1205" width="365" height="78" rx="10" fill="#F4F6F9" stroke="#BCCADA" stroke-width="1.5"/>
<text x="1117.5" y="1237" font-size="22" font-weight="bold" fill="#172B43" text-anchor="middle">W01</text>
<text x="1117.5" y="1267" font-size="19" font-weight="normal" fill="#637489" text-anchor="middle">woodwind · 1 family · 15 moods</text>
<rect x="1370" y="1205" width="365" height="78" rx="10" fill="#F4F6F9" stroke="#BCCADA" stroke-width="1.5"/>
<text x="1552.5" y="1237" font-size="22" font-weight="bold" fill="#172B43" text-anchor="middle">U01</text>
<text x="1552.5" y="1267" font-size="19" font-weight="normal" fill="#637489" text-anchor="middle">3 families · 17 moods</text>
<text x="65" y="1300" font-size="21" font-weight="normal" fill="#637489" text-anchor="start">B: batch size T: frames ⊕: addition Dashed arrows: global conditioning</text>
</g></svg> |