will-taggart commited on
Commit
ee87f3d
·
verified ·
1 Parent(s): 8bb8199

Integrate purpose, scope, and research context in technical paper

Browse files
TECHNICAL_REPORT.md CHANGED
@@ -9,41 +9,25 @@ Email: wtaggart@vt.edu
9
 
10
  AFFECTOR-ARC is an experimental command-line system for rewriting text under a user-defined emotional trajectory. It runs a frozen Qwen3.5-0.8B model on an NVIDIA GPU and changes selected internal activations during generation. A trajectory specifies valence, inward/outward emotional orientation, and intensity across normalized document position. Small sets of contrasting English passages establish three activation directions at each selected transformer layer. At inference time, the requested coordinates determine a weighted displacement, scaled relative to the current hidden-state magnitude, smoothed across decoding steps, and constrained by an RMS budget. Paired hooks apply this displacement to both the feed-forward input and its residual path. Document rewriting combines these interventions with four editing styles, sentence-aware segmentation, bounded generation, and incremental reporting. This report derives the mechanism from its implemented operations and distinguishes numerical controls from emotional outcomes. CPU policy tests pass; the current revision still requires CUDA validation. No measured claim of emotional accuracy, semantic preservation, or multilingual effectiveness is made.
11
 
12
- ## Literature review: activation steering and emotion
13
 
14
- This focused review covers twelve papers, emphasizing 2025-2026 research and retaining two methodological foundations. Titles, author lists, version histories, and the claims summarized here were checked against arXiv records and the corresponding paper text on November 13, 2026. The cited versions are fixed below; availability on arXiv alone does not establish peer review. The implications for this project are research motivations, not evidence that its implementation reproduces these results.
15
 
16
- **From activation differences to behavioral control.** Activation steering changes internal model states during inference while leaving the backbone weights fixed. Turner et al. derive intervention vectors from contrasting prompts; Panickssery et al. average differences across positive and negative behavioral examples. These provide the methodological basis for contrastive calibration, but do not validate a particular emotional coordinate system or insertion site. [Turner et al., 2023 (R1)](https://arxiv.org/abs/2308.10248v1); [Panickssery et al., 2024 (R2)](https://arxiv.org/abs/2312.06681v4).
17
-
18
- **Emotional expression and human judgment.** Wu et al. relate model emotion spaces to human valence/arousal judgments and report concept-based steering across linguistic-cultural settings. Diallo et al. evaluate perceived emotional intensity and text quality with human raters, finding that effects depend on emotion and steering strength. Together they motivate separate measures of emotional movement and readability. Their axes and numerical strengths cannot be assumed equivalent to this project's inward/outward direction or RMS-scaled controls. [Wu et al., 2025 (R3)](https://arxiv.org/abs/2506.13978v1); [Diallo et al., 2026 arXiv version (R4)](https://arxiv.org/abs/2601.21505v1).
19
-
20
- **Emotion can affect more than tone.** Sun et al.'s E-STEER uses valence-arousal-dominance interventions to study reasoning, generation, safety, and agent behavior, reporting non-monotonic relationships. Jeong's small-model comparison reports both coherent emotional changes and degeneration, including repetition, depending on extraction method and architecture. These findings motivate reporting failed generations alongside successes and testing strength sweeps rather than assuming that larger perturbations improve emotional fit. Neither study establishes an operating range for this implementation. [Sun et al., 2026 (R5)](https://arxiv.org/abs/2604.00005v1); [Jeong, 2026 (R6)](https://arxiv.org/abs/2604.04064v1).
21
-
22
- **Reading an emotion is different from controlling it.** Shu et al.'s revised study identifies uneven causal organization of sparse features across emotion categories and tests interventions for emotion recognition. Wang et al. show, in omni-modal models, that layers with strong emotion-probing accuracy need not be the best intervention layers. Recognition results therefore inform evaluator design, while layer selection for rewriting still requires causal tests on generated text. Neither finding licenses importing layer indices across architectures. [Shu et al., 2026, v3 (R7)](https://arxiv.org/abs/2604.25866v3); [Wang et al., 2026 (R8)](https://arxiv.org/abs/2609.22135v1).
23
-
24
- **Multiple axes and adaptive control.** Ha et al. find that supportive-empathy directions are only partially separable: intervening on one can shift other EPITOME proxy scores. Cui and Chen automate vector extraction from labeled data, with task-dependent benefits. Ferrando et al. adapt intervention strength to context, studying the balance between toxicity mitigation and retained utility. These approaches motivate broader calibration, cross-axis tests, and future adaptive control. The present coordinate mixture is not an implementation of their learned selectors or context-dependent gates. [Ha et al., 2026 (R9)](https://arxiv.org/abs/2609.15654v1); [Cui and Chen, 2025, revised 2026 (R10)](https://arxiv.org/abs/2509.22739v3); [Ferrando et al., 2025, revised 2026 (R11)](https://arxiv.org/abs/2512.03661v2).
25
-
26
- **Evaluation must include costs as well as target effects.** Yang et al.'s SteerScope evaluates steering efficacy jointly with side effects, generalization, and data dependence. In its tested settings, activation methods do not dominate prompt steering on the efficacy/side-effect trade-off. For this project, the resulting evaluation priorities are prompt-only and unsteered baselines, blinded emotional and quality ratings, content-change assessment appropriate to the rewrite style, and complete accounting of repetition, truncation, and original-text fallbacks. This is an evaluation agenda, not a completed benchmark. [Yang et al., 2026 (R12)](https://arxiv.org/abs/2610.07722v1).
27
-
28
- ## 1. Problem and operating principle
29
-
30
- A language model generates text by repeatedly estimating a distribution over the next token. Its intermediate hidden states are numerical vectors that contribute to those estimates. Changing a hidden state can change the continuation even when the input text and the model's stored parameters remain fixed.
31
 
32
  ![Document workspace displaying an existing Little Red Riding Hood input and rewrite.](paper/figures/screenshot-02.png)
33
 
34
  *Document workspace displaying an existing Little Red Riding Hood input and rewrite.*
35
- AFFECTOR-ARC uses this property to influence the emotional expression of a rewrite. The user supplies an input document and a sequence of emotional coordinates. The software maps positions in the input to positions on that sequence, converts the coordinates into activation displacements, and applies the displacements while generating each rewritten passage.
36
 
37
- The term **geometry** means an ordered path through a three-dimensional coordinate space, together with layer settings and optional calibration matrices. It does not mean that the software reconstructs a solid surface or applies geometric constraints directly to words. A text's emotional interpretation, a numerical target, and a model's hidden states are distinct objects. The calibration is an experimental mapping between them.
38
 
39
- Two execution modes are available:
40
 
41
- - **Rewrite:** process an entire UTF-8 text document in chunks, write the transformed text, and record attempts and failures.
42
- - **Smoke:** run five controlled generation conditions to check basic intervention and cleanup behavior.
43
 
44
- The interface is a command-line runner for a CUDA allocation. It does not provide a desktop interface, a hosted API service, automatic emotional scoring, or conversational history.
45
 
46
- ## 2. Runtime and data flow
47
 
48
  The runner loads `Qwen/Qwen3.5-0.8B` at revision `2fc06364715b967f1860aea9cf38778875588b17`. The implementation uses `Qwen3_5ForConditionalGeneration`, its text decoder layers, float32 computation, eager attention, and the first process-visible CUDA device. It checks for 24 decoder layers; the geometry and calibration code assume hidden width 1,024. The backbone is in evaluation mode, its parameters have gradients disabled, and calibration and generation run without gradient tracking.
49
 
@@ -70,7 +54,7 @@ The example Slurm script requests one GPU, eight CPU cores, 64 GB of host memory
70
 
71
  *Illustration 1. Execution schematic. The compute workload belongs to the allocated GPU node. Resource requests describe scheduling needs and do not establish measured minimum requirements.*
72
 
73
- ## 3. Emotional coordinates and trajectory interpolation
74
 
75
  A trajectory point is
76
 
@@ -98,7 +82,7 @@ That target remains constant throughout generation of the chunk. A long trajecto
98
 
99
  The runner accepts a native geometry JSON file and supported analysis JSON structures containing emotional coordinates. It recalibrates the basis on the current CUDA runtime even when the imported geometry includes one. With no geometry argument, it uses a demonstration path with three points; this path is not inferred from the input document.
100
 
101
- ## 4. Estimating activation directions
102
 
103
  A hidden state at a selected layer is a vector in $\mathbb{R}^{1024}$. To estimate a direction associated with one emotional contrast, the system compares the model's states for paired passages that differ in the desired property.
104
 
@@ -126,9 +110,9 @@ The three directions form the rows of a matrix $B_\ell\in\mathbb{R}^{3\times1024
126
 
127
  Default layers are 8, 16, and 23, using zero-based indexing, with weights 1, 1, and 0.5. This is subtraction, averaging, and normalization; there is no training optimizer, backbone fine-tuning, orthogonalization, or outcome-based fitting. The small calibration set may encode vocabulary, topic, or perspective along with emotion. Normalizing the vectors does not establish that the axes are independent or valid across languages.
128
 
129
- ## 5. From coordinates to bounded displacements
130
 
131
- ### 5.1 Selecting and weighting axes
132
 
133
  ![Geometry and weights editor with the trajectory and activation-steering controls.](paper/figures/screenshot-03.png)
134
 
@@ -147,7 +131,7 @@ $$
147
 
148
  where $m_j$ is one for a retained axis and zero otherwise. Coefficients are not renormalized after selection. For coordinate magnitudes below one, $T<1$ reduces their magnitudes and emphasizes relative differences; $T>1$ increases them and makes those differences less pronounced. These operations affect three activation coefficients, not token probabilities.
149
 
150
- ### 5.2 Strength, inertia, and budget
151
 
152
  For the current final-token state $h_{\ell,n}$, strength $s$, and layer weight $w_\ell$, the raw displacement is
153
 
@@ -175,7 +159,7 @@ $$
175
 
176
  Strength determines the proposed displacement; budget supplies its ceiling. Raising the budget has no effect when the proposed displacement already fits below it. Budget 1 permits a displacement as large in RMS as the hidden state itself. It is not a token allowance, a semantic-change quota, or a guarantee of stronger emotional accuracy. Inertia uses the previous already-capped displacement and resets with each new generation call.
177
 
178
- ### 5.3 Intervention site
179
 
180
  Let $h$ denote the state entering the feed-forward portion of a decoder block. Without intervention, that portion computes
181
 
@@ -193,7 +177,7 @@ A pre-hook adds $\delta$ to the normalization input; a block-output hook adds th
193
 
194
  This is an open-loop intervention. Coefficients come from the requested absolute coordinates, not the difference between a measured output emotion and the target. A zero coefficient adds no intervention on that axis; it does not actively neutralize emotion already expressed by the model.
195
 
196
- ## 6. User controls and rewrite instructions
197
 
198
  | Control | Default without an imported override | Function |
199
  |---|---:|---|
@@ -222,7 +206,7 @@ Four system-prompt styles provide separate editing constraints:
222
 
223
  Restrained is the default in rewrite mode. Smoke mode retains its original general rewriting instruction unless a style is explicitly selected. Each prompt requests complete sentences and treats supplied text as material rather than instructions. A per-chunk suffix specifies the original character count and hard character allowance. Numerical emotional coordinates are not inserted into these prompts; the coordinates act through hidden states. Prompt instructions influence generation but are not formal semantic guarantees. The runner has no semantic-equivalence rejection filter and does not lower steering settings automatically.
224
 
225
- ## 7. Segmentation, length control, and repetition
226
 
227
  The runner reads and trims the outer whitespace of a UTF-8 text file. Blank lines define paragraphs. Long paragraphs are split using a 700-character ceiling, preferring sentence punctuation when a suitable boundary exists, then whitespace, and finally a hard split. This is a punctuation heuristic, not a linguistic sentence parser. Original whitespace between chunks is preserved during output assembly.
228
 
@@ -248,7 +232,7 @@ After a generation attempt, the runner checks for repetition, empty output, exce
248
 
249
  Sentence cleanup prevents chopped words from being joined directly to the next passage, but it may omit ideas from the tail of a draft. Neither punctuation recognition nor output-size compliance establishes completeness of meaning.
250
 
251
- ## 8. Failure handling and output artifacts
252
 
253
  Each chunk receives one generation attempt at the requested activation settings. A caught generation exception is recorded; the original chunk remains in the assembled text and processing continues. Calibration failures, invalid inputs, filesystem failures, and process termination are outside this per-chunk recovery mechanism and can stop a run. A persistent device failure may cause subsequent chunks to fail as well.
254
 
@@ -264,7 +248,7 @@ Successful generation records include stopping reason, token count, elapsed time
264
 
265
  JSON writes use temporary-file replacement. The companion text file is written normally and may be incomplete if interrupted during that write. Reports are incremental records, not automatic resume checkpoints: rerunning starts over and overwrites the selected output paths. Use a distinct output filename for each experiment. Reports contain the input text and should be treated as document-bearing artifacts.
266
 
267
- ## 9. Engineering checks and evidence
268
 
269
  Smoke mode is the default and operates on one supplied passage. It runs baseline, zero-strength, positive-valence, negative-valence, and restored-baseline conditions. Positive and negative conditions use coefficient vectors $(0.8,0,0)$ and $(-0.8,0,0)$. The third coordinate zero corresponds to intensity 0.5.
270
 
@@ -274,7 +258,7 @@ Smoke mode defaults to the original 128-token allowance and 600-second time thre
274
 
275
  For the November 13 revision, seven CPU policy tests passed, Python and shell syntax were checked, and CLI loading was verified. Tests cover such behavior as unchanged requested controls, paragraph allowance accounting, draft retention, sentence cleanup, and continuing after a failed chunk. They do not execute the CUDA model. The current revision has not yet been run on an ARC GPU. A successful GPU run was reported for an earlier revision on November 12; it is historical evidence, not validation of the current code.
276
 
277
- ## 10. Reproduction
278
 
279
  Inside a suitable ARC GPU allocation, from a fresh repository copy:
280
 
@@ -302,7 +286,7 @@ These strength and budget values illustrate explicit configuration; they are not
302
 
303
  Archive the repository revision, engine manifest, resolved dependencies, GPU and driver information, command-line arguments, input, geometry, and report. The engine identity's `source_commit` field currently contains a snapshot label rather than a Git commit hash, so the repository revision should be recorded separately. The default seed is zero and TF32 matrix multiplication is disabled, but identical results across hardware and library versions are not guaranteed.
304
 
305
- ## 11. Scientific limits and evaluation requirements
306
 
307
  The system offers a direct, inspectable intervention, not a demonstrated emotional matching algorithm. Its main limitations are the small English calibration set, untested interactions between axes and layers, open-loop use of absolute targets, and lack of independent output assessment. The model can change subject matter or factual claims, especially under Creative instructions or strong perturbations. Stronger displacement can degrade fluency without improving emotional alignment.
308
 
 
9
 
10
  AFFECTOR-ARC is an experimental command-line system for rewriting text under a user-defined emotional trajectory. It runs a frozen Qwen3.5-0.8B model on an NVIDIA GPU and changes selected internal activations during generation. A trajectory specifies valence, inward/outward emotional orientation, and intensity across normalized document position. Small sets of contrasting English passages establish three activation directions at each selected transformer layer. At inference time, the requested coordinates determine a weighted displacement, scaled relative to the current hidden-state magnitude, smoothed across decoding steps, and constrained by an RMS budget. Paired hooks apply this displacement to both the feed-forward input and its residual path. Document rewriting combines these interventions with four editing styles, sentence-aware segmentation, bounded generation, and incremental reporting. This report derives the mechanism from its implemented operations and distinguishes numerical controls from emotional outcomes. CPU policy tests pass; the current revision still requires CUDA validation. No measured claim of emotional accuracy, semantic preservation, or multilingual effectiveness is made.
11
 
12
+ ## Purpose and Research Context
13
 
14
+ AFFECTOR-ARC investigates how a prescribed emotional progression can influence a document rewrite on an allocated GPU. A user supplies a UTF-8 text and an ordered sequence of valence, inward/outward emotional orientation, and intensity coordinates. The runner maps document positions to that sequence and converts the sampled coordinates into activation displacements during generation. Here, geometry means a path through a three-dimensional coordinate space, with layer settings and optional calibration matrices. It expresses a desired progression rather than a surface reconstructed from text or a constraint applied directly to individual words.
15
 
16
+ The intervention acts on the numerical hidden states used to predict successive tokens while the model's stored parameters remain fixed. This approach builds on contrastive activation steering: Turner and colleagues derive directions from contrasting prompts, and Panickssery and colleagues average differences between positive and negative behavioral examples ([Turner et al., 2023](https://arxiv.org/abs/2308.10248v1); [Panickssery et al., 2024](https://arxiv.org/abs/2312.06681v4)). AFFECTOR-ARC uses small sets of contrasting passages to establish emotional directions at selected layers, then applies coordinate-dependent displacements as each passage is rewritten. The contribution is an inspectable implementation of this mapping and its operational controls, not a claim that the emotional coordinates uniquely determine a continuation.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  ![Document workspace displaying an existing Little Red Riding Hood input and rewrite.](paper/figures/screenshot-02.png)
19
 
20
  *Document workspace displaying an existing Little Red Riding Hood input and rewrite.*
 
21
 
22
+ Research connecting model emotion spaces with human valence/arousal judgments provides motivation for coordinate-based experimentation. Wu and colleagues report concept-based steering across linguistic-cultural settings ([Wu et al., 2025](https://arxiv.org/abs/2506.13978v1)), while Diallo and colleagues use human ratings to examine perceived emotional intensity and text quality ([Diallo et al., 2026](https://arxiv.org/abs/2601.21505v1)). Their findings make human interpretation central to evaluation, but they do not calibrate the present inward/outward axis or RMS-scaled settings. A text's emotional reading, its requested coordinates, and the model's hidden states remain distinct objects linked by an experimental calibration.
23
 
24
+ That distinction matters when selecting layers and combining axes. Shu and colleagues find uneven causal organization across emotion categories in sparse-feature interventions for recognition ([Shu et al., 2026](https://arxiv.org/abs/2604.25866v3)); Wang and colleagues show that strong probing accuracy need not identify the most effective intervention layers ([Wang et al., 2026](https://arxiv.org/abs/2609.22135v1)). Ha and colleagues likewise find that supportive-empathy directions are only partially separable ([Ha et al., 2026](https://arxiv.org/abs/2609.15654v1)). Automated vector extraction and context-dependent strength offer further approaches to calibration and control ([Cui et al., 2025](https://arxiv.org/abs/2509.22739v3); [Ferrando et al., 2025](https://arxiv.org/abs/2512.03661v2)). These studies motivate layer sweeps, cross-axis tests, and adaptive controls, while the present runner uses an explicit coordinate mixture with user-selected settings.
25
 
26
+ Generation limits and failure reporting are part of the same research problem. E-STEER reports non-monotonic effects of emotional interventions across several tasks ([Sun et al., 2026](https://arxiv.org/abs/2604.00005v1)), and Jeong observes both emotional changes and degeneration in small models ([Jeong, 2026](https://arxiv.org/abs/2604.04064v1)). Stronger settings therefore cannot be assumed to improve transfer. The runner offers a rewrite mode that processes a document in chunks and records attempts and failures, and a smoke mode with five controlled generation conditions for checking intervention and cleanup behavior. Its scope is the command-line CUDA computation illustrated alongside the desktop client's workspaces; the runner itself supplies neither a hosted service, conversational history, nor automatic emotional scoring.
 
27
 
28
+ This operational scope determines the evidence needed to assess the system. SteerScope evaluates efficacy together with side effects, generalization, and dependence on steering data, and finds no general advantage of activation methods over prompt steering in its tested trade-offs ([Yang et al., 2026](https://arxiv.org/abs/2610.07722v1)). AFFECTOR-ARC therefore requires prompt-only and unsteered baselines, blinded emotional and quality ratings, content-change assessment, and complete reporting of repetition and truncation. The report documents the implemented mechanism and engineering checks; these broader comparisons and an empirically established operating range remain future work.
29
 
30
+ ## Runtime and data flow
31
 
32
  The runner loads `Qwen/Qwen3.5-0.8B` at revision `2fc06364715b967f1860aea9cf38778875588b17`. The implementation uses `Qwen3_5ForConditionalGeneration`, its text decoder layers, float32 computation, eager attention, and the first process-visible CUDA device. It checks for 24 decoder layers; the geometry and calibration code assume hidden width 1,024. The backbone is in evaluation mode, its parameters have gradients disabled, and calibration and generation run without gradient tracking.
33
 
 
54
 
55
  *Illustration 1. Execution schematic. The compute workload belongs to the allocated GPU node. Resource requests describe scheduling needs and do not establish measured minimum requirements.*
56
 
57
+ ## Emotional coordinates and trajectory interpolation
58
 
59
  A trajectory point is
60
 
 
82
 
83
  The runner accepts a native geometry JSON file and supported analysis JSON structures containing emotional coordinates. It recalibrates the basis on the current CUDA runtime even when the imported geometry includes one. With no geometry argument, it uses a demonstration path with three points; this path is not inferred from the input document.
84
 
85
+ ## Estimating activation directions
86
 
87
  A hidden state at a selected layer is a vector in $\mathbb{R}^{1024}$. To estimate a direction associated with one emotional contrast, the system compares the model's states for paired passages that differ in the desired property.
88
 
 
110
 
111
  Default layers are 8, 16, and 23, using zero-based indexing, with weights 1, 1, and 0.5. This is subtraction, averaging, and normalization; there is no training optimizer, backbone fine-tuning, orthogonalization, or outcome-based fitting. The small calibration set may encode vocabulary, topic, or perspective along with emotion. Normalizing the vectors does not establish that the axes are independent or valid across languages.
112
 
113
+ ## From coordinates to bounded displacements
114
 
115
+ ### Selecting and weighting axes
116
 
117
  ![Geometry and weights editor with the trajectory and activation-steering controls.](paper/figures/screenshot-03.png)
118
 
 
131
 
132
  where $m_j$ is one for a retained axis and zero otherwise. Coefficients are not renormalized after selection. For coordinate magnitudes below one, $T<1$ reduces their magnitudes and emphasizes relative differences; $T>1$ increases them and makes those differences less pronounced. These operations affect three activation coefficients, not token probabilities.
133
 
134
+ ### Strength, inertia, and budget
135
 
136
  For the current final-token state $h_{\ell,n}$, strength $s$, and layer weight $w_\ell$, the raw displacement is
137
 
 
159
 
160
  Strength determines the proposed displacement; budget supplies its ceiling. Raising the budget has no effect when the proposed displacement already fits below it. Budget 1 permits a displacement as large in RMS as the hidden state itself. It is not a token allowance, a semantic-change quota, or a guarantee of stronger emotional accuracy. Inertia uses the previous already-capped displacement and resets with each new generation call.
161
 
162
+ ### Intervention site
163
 
164
  Let $h$ denote the state entering the feed-forward portion of a decoder block. Without intervention, that portion computes
165
 
 
177
 
178
  This is an open-loop intervention. Coefficients come from the requested absolute coordinates, not the difference between a measured output emotion and the target. A zero coefficient adds no intervention on that axis; it does not actively neutralize emotion already expressed by the model.
179
 
180
+ ## User controls and rewrite instructions
181
 
182
  | Control | Default without an imported override | Function |
183
  |---|---:|---|
 
206
 
207
  Restrained is the default in rewrite mode. Smoke mode retains its original general rewriting instruction unless a style is explicitly selected. Each prompt requests complete sentences and treats supplied text as material rather than instructions. A per-chunk suffix specifies the original character count and hard character allowance. Numerical emotional coordinates are not inserted into these prompts; the coordinates act through hidden states. Prompt instructions influence generation but are not formal semantic guarantees. The runner has no semantic-equivalence rejection filter and does not lower steering settings automatically.
208
 
209
+ ## Segmentation, length control, and repetition
210
 
211
  The runner reads and trims the outer whitespace of a UTF-8 text file. Blank lines define paragraphs. Long paragraphs are split using a 700-character ceiling, preferring sentence punctuation when a suitable boundary exists, then whitespace, and finally a hard split. This is a punctuation heuristic, not a linguistic sentence parser. Original whitespace between chunks is preserved during output assembly.
212
 
 
232
 
233
  Sentence cleanup prevents chopped words from being joined directly to the next passage, but it may omit ideas from the tail of a draft. Neither punctuation recognition nor output-size compliance establishes completeness of meaning.
234
 
235
+ ## Failure handling and output artifacts
236
 
237
  Each chunk receives one generation attempt at the requested activation settings. A caught generation exception is recorded; the original chunk remains in the assembled text and processing continues. Calibration failures, invalid inputs, filesystem failures, and process termination are outside this per-chunk recovery mechanism and can stop a run. A persistent device failure may cause subsequent chunks to fail as well.
238
 
 
248
 
249
  JSON writes use temporary-file replacement. The companion text file is written normally and may be incomplete if interrupted during that write. Reports are incremental records, not automatic resume checkpoints: rerunning starts over and overwrites the selected output paths. Use a distinct output filename for each experiment. Reports contain the input text and should be treated as document-bearing artifacts.
250
 
251
+ ## Engineering checks and evidence
252
 
253
  Smoke mode is the default and operates on one supplied passage. It runs baseline, zero-strength, positive-valence, negative-valence, and restored-baseline conditions. Positive and negative conditions use coefficient vectors $(0.8,0,0)$ and $(-0.8,0,0)$. The third coordinate zero corresponds to intensity 0.5.
254
 
 
258
 
259
  For the November 13 revision, seven CPU policy tests passed, Python and shell syntax were checked, and CLI loading was verified. Tests cover such behavior as unchanged requested controls, paragraph allowance accounting, draft retention, sentence cleanup, and continuing after a failed chunk. They do not execute the CUDA model. The current revision has not yet been run on an ARC GPU. A successful GPU run was reported for an earlier revision on November 12; it is historical evidence, not validation of the current code.
260
 
261
+ ## Reproduction
262
 
263
  Inside a suitable ARC GPU allocation, from a fresh repository copy:
264
 
 
286
 
287
  Archive the repository revision, engine manifest, resolved dependencies, GPU and driver information, command-line arguments, input, geometry, and report. The engine identity's `source_commit` field currently contains a snapshot label rather than a Git commit hash, so the repository revision should be recorded separately. The default seed is zero and TF32 matrix multiplication is disabled, but identical results across hardware and library versions are not guaranteed.
288
 
289
+ ## Scientific limits and evaluation requirements
290
 
291
  The system offers a direct, inspectable intervention, not a demonstrated emotional matching algorithm. Its main limitations are the small English calibration set, untested interactions between axes and layers, open-loop use of absolute targets, and lack of independent output assessment. The model can change subject matter or factual claims, especially under Creative instructions or strong perturbations. Stronger displacement can degrade fluency without improving emotional alignment.
292
 
paper/AFFECTOR-ARC-ACM-source.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:da5a6d2d728ed8afaec054290fe698dd99672d6294c7e71bab9de99593ed6f53
3
- size 5210620
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff3d988aed5a8deb18eac9dbbdf3c765626dce495bba2df7cf1a760450103284
3
+ size 5205436
paper/AFFECTOR-ARC-ACM.pdf CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:10a9d5191879f7f6103efe1b5c6e36c2c124d6024b4c7de0653f1e1ddec7a2f4
3
- size 2480133
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:896af1e0e290fa6f5af60068713212c70cae9a339335322e82f090cf8392ef4d
3
+ size 2476822
paper/AFFECTOR-ARC-ACM.tex CHANGED
@@ -27,7 +27,7 @@
27
  \setlength{\intextsep}{12pt plus 2pt minus 3pt}
28
  \raggedbottom
29
 
30
- \geometry{top=0.75in,bottom=0.65in,includeheadfoot}
31
  \begin{document}
32
  \title{AFFECTOR-ARC: Emotional Trajectory Control through Transformer
33
  Activation Steering}
@@ -58,84 +58,11 @@ is made.
58
  \end{abstract}
59
  \keywords{activation steering, emotional text generation, transformer models, controllable generation}
60
  \maketitle
61
- \section{Literature review: activation steering and
62
- emotion}\label{literature-review-activation-steering-and-emotion}
63
-
64
- This focused review covers twelve papers, emphasizing 2025-2026 research
65
- and retaining two methodological foundations. Titles, author lists,
66
- version histories, and the claims summarized here were checked against
67
- arXiv records and the corresponding paper text on November 13, 2026. The
68
- cited versions are fixed below; availability on arXiv alone does not
69
- establish peer review. The implications for this project are research
70
- motivations, not evidence that its implementation reproduces these
71
- results.
72
-
73
- \textbf{From activation differences to behavioral control.} Activation
74
- steering changes internal model states during inference while leaving
75
- the backbone weights fixed. Turner et al.~derive intervention vectors
76
- from contrasting prompts; Panickssery et al.~average differences across
77
- positive and negative behavioral examples. These provide the
78
- methodological basis for contrastive calibration, but do not validate a
79
- particular emotional coordinate system or insertion site.
80
- \citep{turner2023actadd}; \citep{panickssery2024caa}.
81
-
82
- \textbf{Emotional expression and human judgment.} Wu et al.~relate model
83
- emotion spaces to human valence/arousal judgments and report
84
- concept-based steering across linguistic-cultural settings. Diallo et
85
- al.~evaluate perceived emotional intensity and text quality with human
86
- raters, finding that effects depend on emotion and steering strength.
87
- Together they motivate separate measures of emotional movement and
88
- readability. Their axes and numerical strengths cannot be assumed
89
- equivalent to this project's inward/outward direction or RMS-scaled
90
- controls. \citep{wu2025emotion}; \citep{diallo2026style}.
91
-
92
- \textbf{Emotion can affect more than tone.} Sun et al.'s E-STEER uses
93
- valence-arousal-dominance interventions to study reasoning, generation,
94
- safety, and agent behavior, reporting non-monotonic relationships.
95
- Jeong's small-model comparison reports both coherent emotional changes
96
- and degeneration, including repetition, depending on extraction method
97
- and architecture. These findings motivate reporting failed generations
98
- alongside successes and testing strength sweeps rather than assuming
99
- that larger perturbations improve emotional fit. Neither study
100
- establishes an operating range for this implementation.
101
- \citep{sun2026emotion}; \citep{jeong2026emotion}.
102
-
103
- \textbf{Reading an emotion is different from controlling it.} Shu et
104
- al.'s revised study identifies uneven causal organization of sparse
105
- features across emotion categories and tests interventions for emotion
106
- recognition. Wang et al.~show, in omni-modal models, that layers with
107
- strong emotion-probing accuracy need not be the best intervention
108
- layers. Recognition results therefore inform evaluator design, while
109
- layer selection for rewriting still requires causal tests on generated
110
- text. Neither finding licenses importing layer indices across
111
- architectures. \citep{shu2026emotion}; \citep{wang2026readbest}.
112
-
113
- \textbf{Multiple axes and adaptive control.} Ha et al.~find that
114
- supportive-empathy directions are only partially separable: intervening
115
- on one can shift other EPITOME proxy scores. Cui and Chen automate
116
- vector extraction from labeled data, with task-dependent benefits.
117
- Ferrando et al.~adapt intervention strength to context, studying the
118
- balance between toxicity mitigation and retained utility. These
119
- approaches motivate broader calibration, cross-axis tests, and future
120
- adaptive control. The present coordinate mixture is not an
121
- implementation of their learned selectors or context-dependent gates.
122
- \citep{ha2026empathy}; \citep{cui2025pas}; \citep{ferrando2025dsas}.
123
-
124
- \textbf{Evaluation must include costs as well as target effects.} Yang
125
- et al.'s SteerScope evaluates steering efficacy jointly with side
126
- effects, generalization, and data dependence. In its tested settings,
127
- activation methods do not dominate prompt steering on the
128
- efficacy/side-effect trade-off. For this project, the resulting
129
- evaluation priorities are prompt-only and unsteered baselines, blinded
130
- emotional and quality ratings, content-change assessment appropriate to
131
- the rewrite style, and complete accounting of repetition, truncation,
132
- and original-text fallbacks. This is an evaluation agenda, not a
133
- completed benchmark. \citep{yang2026steerscope}.
134
-
135
-
136
- \section{Problem and operating
137
- principle}\label{problem-and-operating-principle}
138
 
 
 
 
139
 
140
  \begin{figure}[!htb]
141
  \centering
@@ -144,42 +71,14 @@ principle}\label{problem-and-operating-principle}
144
  \Description{Document workspace displaying an existing Little Red Riding Hood input and rewrite.}
145
  \label{fig:app-screen-2}
146
  \end{figure}
147
- A language model generates text by repeatedly estimating a distribution
148
- over the next token. Its intermediate hidden states are numerical
149
- vectors that contribute to those estimates. Changing a hidden state can
150
- change the continuation even when the input text and the model's stored
151
- parameters remain fixed.
152
-
153
- AFFECTOR-ARC uses this property to influence the emotional expression of
154
- a rewrite. The user supplies an input document and a sequence of
155
- emotional coordinates. The software maps positions in the input to
156
- positions on that sequence, converts the coordinates into activation
157
- displacements, and applies the displacements while generating each
158
- rewritten passage.
159
-
160
- The term \textbf{geometry} means an ordered path through a
161
- three-dimensional coordinate space, together with layer settings and
162
- optional calibration matrices. It does not mean that the software
163
- reconstructs a solid surface or applies geometric constraints directly
164
- to words. A text's emotional interpretation, a numerical target, and a
165
- model's hidden states are distinct objects. The calibration is an
166
- experimental mapping between them.
167
-
168
- Two execution modes are available:
169
 
170
- \begin{itemize}
171
- \tightlist
172
- \item
173
- \textbf{Rewrite:} process an entire UTF-8 text document in chunks,
174
- write the transformed text, and record attempts and failures.
175
- \item
176
- \textbf{Smoke:} run five controlled generation conditions to check
177
- basic intervention and cleanup behavior.
178
- \end{itemize}
179
 
180
- The interface is a command-line runner for a CUDA allocation. It does
181
- not provide a desktop interface, a hosted API service, automatic
182
- emotional scoring, or conversational history.
183
 
184
  \section{Runtime and data flow}\label{runtime-and-data-flow}
185
 
 
27
  \setlength{\intextsep}{12pt plus 2pt minus 3pt}
28
  \raggedbottom
29
 
30
+ \geometry{top=0.65in,bottom=0.55in,includeheadfoot}
31
  \begin{document}
32
  \title{AFFECTOR-ARC: Emotional Trajectory Control through Transformer
33
  Activation Steering}
 
58
  \end{abstract}
59
  \keywords{activation steering, emotional text generation, transformer models, controllable generation}
60
  \maketitle
61
+ \section{Purpose and Research Context}\label{literature-review-activation-steering-and-emotion}\label{problem-and-operating-principle}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
+ AFFECTOR-ARC investigates how a prescribed emotional progression can influence a document rewrite on an allocated GPU. A user supplies a UTF-8 text and an ordered sequence of valence, inward/outward emotional orientation, and intensity coordinates. The runner maps document positions to that sequence and converts the sampled coordinates into activation displacements during generation. Here, geometry means a path through a three-dimensional coordinate space, with layer settings and optional calibration matrices. It expresses a desired progression rather than a surface reconstructed from text or a constraint applied directly to individual words.
64
+
65
+ The intervention acts on the numerical hidden states used to predict successive tokens while the model's stored parameters remain fixed. This approach builds on contrastive activation steering: Turner and colleagues derive directions from contrasting prompts, and Panickssery and colleagues average differences between positive and negative behavioral examples \cite{turner2023actadd,panickssery2024caa}. AFFECTOR-ARC uses small sets of contrasting passages to establish emotional directions at selected layers, then applies coordinate-dependent displacements as each passage is rewritten. The contribution is an inspectable implementation of this mapping and its operational controls, not a claim that the emotional coordinates uniquely determine a continuation.
66
 
67
  \begin{figure}[!htb]
68
  \centering
 
71
  \Description{Document workspace displaying an existing Little Red Riding Hood input and rewrite.}
72
  \label{fig:app-screen-2}
73
  \end{figure}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
 
75
+ Research connecting model emotion spaces with human valence/arousal judgments provides motivation for coordinate-based experimentation. Wu and colleagues report concept-based steering across linguistic-cultural settings \cite{wu2025emotion}, while Diallo and colleagues use human ratings to examine perceived emotional intensity and text quality \cite{diallo2026style}. Their findings make human interpretation central to evaluation, but they do not calibrate the present inward/outward axis or RMS-scaled settings. A text's emotional reading, its requested coordinates, and the model's hidden states remain distinct objects linked by an experimental calibration.
76
+
77
+ That distinction matters when selecting layers and combining axes. Shu and colleagues find uneven causal organization across emotion categories in sparse-feature interventions for recognition \cite{shu2026emotion}; Wang and colleagues show that strong probing accuracy need not identify the most effective intervention layers \cite{wang2026readbest}. Ha and colleagues likewise find that supportive-empathy directions are only partially separable \cite{ha2026empathy}. Automated vector extraction and context-dependent strength offer further approaches to calibration and control \cite{cui2025pas,ferrando2025dsas}. These studies motivate layer sweeps, cross-axis tests, and adaptive controls, while the present runner uses an explicit coordinate mixture with user-selected settings.
78
+
79
+ Generation limits and failure reporting are part of the same research problem. E-STEER reports non-monotonic effects of emotional interventions across several tasks \cite{sun2026emotion}, and Jeong observes both emotional changes and degeneration in small models \cite{jeong2026emotion}. Stronger settings therefore cannot be assumed to improve transfer. The runner offers a rewrite mode that processes a document in chunks and records attempts and failures, and a smoke mode with five controlled generation conditions for checking intervention and cleanup behavior. Its scope is the command-line CUDA computation illustrated alongside the desktop client's workspaces; the runner itself supplies neither a hosted service, conversational history, nor automatic emotional scoring.
 
 
 
 
80
 
81
+ This operational scope determines the evidence needed to assess the system. SteerScope evaluates efficacy together with side effects, generalization, and dependence on steering data, and finds no general advantage of activation methods over prompt steering in its tested trade-offs \cite{yang2026steerscope}. AFFECTOR-ARC therefore requires prompt-only and unsteered baselines, blinded emotional and quality ratings, content-change assessment, and complete reporting of repetition and truncation. The report documents the implemented mechanism and engineering checks; these broader comparisons and an empirically established operating range remain future work.
 
 
82
 
83
  \section{Runtime and data flow}\label{runtime-and-data-flow}
84
 
paper/PAPER-SHA256SUMS.txt CHANGED
@@ -1,11 +1,11 @@
1
- da5a6d2d728ed8afaec054290fe698dd99672d6294c7e71bab9de99593ed6f53 AFFECTOR-ARC-ACM-source.zip
2
  d78577482f74cba4163db18d88af82786c923d72cd09607bde62cb747c645c5d AFFECTOR-ARC-ACM.bbl
3
- 10a9d5191879f7f6103efe1b5c6e36c2c124d6024b4c7de0653f1e1ddec7a2f4 AFFECTOR-ARC-ACM.pdf
4
- 619c4d3815c902b0b7ebb3f308210417aca63e3f29fe43ba9cedb0c7b119f475 AFFECTOR-ARC-ACM.tex
5
  00fe34363158541d8d41414f548a2a6a7fd73b147e025b8bc2ef042f9dba6d85 ILLUSTRATIONS.json
6
  d14edda139a36c0bac8b56d02e5cda63ab7558c6db1424f1087189a9429bfaf0 LITERATURE_SOURCES.md
7
  b9375d5aa1da63a0a2773da47c8dce77eaad36a34265f9b36a569671e275ad9b README.md
8
- a3d1b8309b8d7f14b8b134befffe43d1f9106c34e36132b34dc596eea6501d8a TECHNICAL_PAPER.md
9
  b1af14ec24b576fa1675395d73e75adfa4f5174d52902866ffef71374ddbc852 figure-specifications.json
10
  b072894d9761bb46543f0c584cf781aaedce49100a489a2bc1e2b48b9ad47e10 figures/illustration-01.pdf
11
  68020194c3306e7fecf75e94343ea2a3cb0af6d186c2d8d93220cbc6dec12e6f figures/illustration-01.png
@@ -19,4 +19,4 @@ bb8302843abc13419014ea6a06d63edfe6de9e02df248ee4c1ae8e3b0e6fc0a8 figures/illust
19
  5f4e1daaf625926a768773cfcb80287cb6c25ad793c4510fbecc6aaa57f4b04a figures/illustration-05.png
20
  9257f38423bd7e496f1a0916c0fbaefbfb32ab544a684ca9a411508201f0535e references.bib
21
  eed8b979a5a299b42e925d9027332e7df876400dcef046f2cfe26beef91d1189 render_figures.py
22
- a3d1b8309b8d7f14b8b134befffe43d1f9106c34e36132b34dc596eea6501d8a source.md
 
1
+ ff3d988aed5a8deb18eac9dbbdf3c765626dce495bba2df7cf1a760450103284 AFFECTOR-ARC-ACM-source.zip
2
  d78577482f74cba4163db18d88af82786c923d72cd09607bde62cb747c645c5d AFFECTOR-ARC-ACM.bbl
3
+ 896af1e0e290fa6f5af60068713212c70cae9a339335322e82f090cf8392ef4d AFFECTOR-ARC-ACM.pdf
4
+ 9ef3bfea1bd825772d3cf6a92c39f23921ed3a5340e41fc5d6c723b213377c3f AFFECTOR-ARC-ACM.tex
5
  00fe34363158541d8d41414f548a2a6a7fd73b147e025b8bc2ef042f9dba6d85 ILLUSTRATIONS.json
6
  d14edda139a36c0bac8b56d02e5cda63ab7558c6db1424f1087189a9429bfaf0 LITERATURE_SOURCES.md
7
  b9375d5aa1da63a0a2773da47c8dce77eaad36a34265f9b36a569671e275ad9b README.md
8
+ 8e66b184f05329bcd56307478e86848996ee935ca72ea78422c07f43ba029955 TECHNICAL_PAPER.md
9
  b1af14ec24b576fa1675395d73e75adfa4f5174d52902866ffef71374ddbc852 figure-specifications.json
10
  b072894d9761bb46543f0c584cf781aaedce49100a489a2bc1e2b48b9ad47e10 figures/illustration-01.pdf
11
  68020194c3306e7fecf75e94343ea2a3cb0af6d186c2d8d93220cbc6dec12e6f figures/illustration-01.png
 
19
  5f4e1daaf625926a768773cfcb80287cb6c25ad793c4510fbecc6aaa57f4b04a figures/illustration-05.png
20
  9257f38423bd7e496f1a0916c0fbaefbfb32ab544a684ca9a411508201f0535e references.bib
21
  eed8b979a5a299b42e925d9027332e7df876400dcef046f2cfe26beef91d1189 render_figures.py
22
+ 8e66b184f05329bcd56307478e86848996ee935ca72ea78422c07f43ba029955 source.md
paper/TECHNICAL_PAPER.md CHANGED
@@ -9,41 +9,25 @@ Email: wtaggart@vt.edu
9
 
10
  AFFECTOR-ARC is an experimental command-line system for rewriting text under a user-defined emotional trajectory. It runs a frozen Qwen3.5-0.8B model on an NVIDIA GPU and changes selected internal activations during generation. A trajectory specifies valence, inward/outward emotional orientation, and intensity across normalized document position. Small sets of contrasting English passages establish three activation directions at each selected transformer layer. At inference time, the requested coordinates determine a weighted displacement, scaled relative to the current hidden-state magnitude, smoothed across decoding steps, and constrained by an RMS budget. Paired hooks apply this displacement to both the feed-forward input and its residual path. Document rewriting combines these interventions with four editing styles, sentence-aware segmentation, bounded generation, and incremental reporting. This report derives the mechanism from its implemented operations and distinguishes numerical controls from emotional outcomes. CPU policy tests pass; the current revision still requires CUDA validation. No measured claim of emotional accuracy, semantic preservation, or multilingual effectiveness is made.
11
 
12
- ## Literature review: activation steering and emotion
13
 
14
- This focused review covers twelve papers, emphasizing 2025-2026 research and retaining two methodological foundations. Titles, author lists, version histories, and the claims summarized here were checked against arXiv records and the corresponding paper text on November 13, 2026. The cited versions are fixed below; availability on arXiv alone does not establish peer review. The implications for this project are research motivations, not evidence that its implementation reproduces these results.
15
 
16
- **From activation differences to behavioral control.** Activation steering changes internal model states during inference while leaving the backbone weights fixed. Turner et al. derive intervention vectors from contrasting prompts; Panickssery et al. average differences across positive and negative behavioral examples. These provide the methodological basis for contrastive calibration, but do not validate a particular emotional coordinate system or insertion site. [Turner et al., 2023 (R1)](https://arxiv.org/abs/2308.10248v1); [Panickssery et al., 2024 (R2)](https://arxiv.org/abs/2312.06681v4).
17
-
18
- **Emotional expression and human judgment.** Wu et al. relate model emotion spaces to human valence/arousal judgments and report concept-based steering across linguistic-cultural settings. Diallo et al. evaluate perceived emotional intensity and text quality with human raters, finding that effects depend on emotion and steering strength. Together they motivate separate measures of emotional movement and readability. Their axes and numerical strengths cannot be assumed equivalent to this project's inward/outward direction or RMS-scaled controls. [Wu et al., 2025 (R3)](https://arxiv.org/abs/2506.13978v1); [Diallo et al., 2026 arXiv version (R4)](https://arxiv.org/abs/2601.21505v1).
19
-
20
- **Emotion can affect more than tone.** Sun et al.'s E-STEER uses valence-arousal-dominance interventions to study reasoning, generation, safety, and agent behavior, reporting non-monotonic relationships. Jeong's small-model comparison reports both coherent emotional changes and degeneration, including repetition, depending on extraction method and architecture. These findings motivate reporting failed generations alongside successes and testing strength sweeps rather than assuming that larger perturbations improve emotional fit. Neither study establishes an operating range for this implementation. [Sun et al., 2026 (R5)](https://arxiv.org/abs/2604.00005v1); [Jeong, 2026 (R6)](https://arxiv.org/abs/2604.04064v1).
21
-
22
- **Reading an emotion is different from controlling it.** Shu et al.'s revised study identifies uneven causal organization of sparse features across emotion categories and tests interventions for emotion recognition. Wang et al. show, in omni-modal models, that layers with strong emotion-probing accuracy need not be the best intervention layers. Recognition results therefore inform evaluator design, while layer selection for rewriting still requires causal tests on generated text. Neither finding licenses importing layer indices across architectures. [Shu et al., 2026, v3 (R7)](https://arxiv.org/abs/2604.25866v3); [Wang et al., 2026 (R8)](https://arxiv.org/abs/2609.22135v1).
23
-
24
- **Multiple axes and adaptive control.** Ha et al. find that supportive-empathy directions are only partially separable: intervening on one can shift other EPITOME proxy scores. Cui and Chen automate vector extraction from labeled data, with task-dependent benefits. Ferrando et al. adapt intervention strength to context, studying the balance between toxicity mitigation and retained utility. These approaches motivate broader calibration, cross-axis tests, and future adaptive control. The present coordinate mixture is not an implementation of their learned selectors or context-dependent gates. [Ha et al., 2026 (R9)](https://arxiv.org/abs/2609.15654v1); [Cui and Chen, 2025, revised 2026 (R10)](https://arxiv.org/abs/2509.22739v3); [Ferrando et al., 2025, revised 2026 (R11)](https://arxiv.org/abs/2512.03661v2).
25
-
26
- **Evaluation must include costs as well as target effects.** Yang et al.'s SteerScope evaluates steering efficacy jointly with side effects, generalization, and data dependence. In its tested settings, activation methods do not dominate prompt steering on the efficacy/side-effect trade-off. For this project, the resulting evaluation priorities are prompt-only and unsteered baselines, blinded emotional and quality ratings, content-change assessment appropriate to the rewrite style, and complete accounting of repetition, truncation, and original-text fallbacks. This is an evaluation agenda, not a completed benchmark. [Yang et al., 2026 (R12)](https://arxiv.org/abs/2610.07722v1).
27
-
28
- ## 1. Problem and operating principle
29
-
30
- A language model generates text by repeatedly estimating a distribution over the next token. Its intermediate hidden states are numerical vectors that contribute to those estimates. Changing a hidden state can change the continuation even when the input text and the model's stored parameters remain fixed.
31
 
32
  ![Document workspace displaying an existing Little Red Riding Hood input and rewrite.](figures/screenshot-02.png)
33
 
34
  *Document workspace displaying an existing Little Red Riding Hood input and rewrite.*
35
- AFFECTOR-ARC uses this property to influence the emotional expression of a rewrite. The user supplies an input document and a sequence of emotional coordinates. The software maps positions in the input to positions on that sequence, converts the coordinates into activation displacements, and applies the displacements while generating each rewritten passage.
36
 
37
- The term **geometry** means an ordered path through a three-dimensional coordinate space, together with layer settings and optional calibration matrices. It does not mean that the software reconstructs a solid surface or applies geometric constraints directly to words. A text's emotional interpretation, a numerical target, and a model's hidden states are distinct objects. The calibration is an experimental mapping between them.
38
 
39
- Two execution modes are available:
40
 
41
- - **Rewrite:** process an entire UTF-8 text document in chunks, write the transformed text, and record attempts and failures.
42
- - **Smoke:** run five controlled generation conditions to check basic intervention and cleanup behavior.
43
 
44
- The interface is a command-line runner for a CUDA allocation. It does not provide a desktop interface, a hosted API service, automatic emotional scoring, or conversational history.
45
 
46
- ## 2. Runtime and data flow
47
 
48
  The runner loads `Qwen/Qwen3.5-0.8B` at revision `2fc06364715b967f1860aea9cf38778875588b17`. The implementation uses `Qwen3_5ForConditionalGeneration`, its text decoder layers, float32 computation, eager attention, and the first process-visible CUDA device. It checks for 24 decoder layers; the geometry and calibration code assume hidden width 1,024. The backbone is in evaluation mode, its parameters have gradients disabled, and calibration and generation run without gradient tracking.
49
 
@@ -70,7 +54,7 @@ The example Slurm script requests one GPU, eight CPU cores, 64 GB of host memory
70
 
71
  *Illustration 1. Execution schematic. The compute workload belongs to the allocated GPU node. Resource requests describe scheduling needs and do not establish measured minimum requirements.*
72
 
73
- ## 3. Emotional coordinates and trajectory interpolation
74
 
75
  A trajectory point is
76
 
@@ -98,7 +82,7 @@ That target remains constant throughout generation of the chunk. A long trajecto
98
 
99
  The runner accepts a native geometry JSON file and supported analysis JSON structures containing emotional coordinates. It recalibrates the basis on the current CUDA runtime even when the imported geometry includes one. With no geometry argument, it uses a demonstration path with three points; this path is not inferred from the input document.
100
 
101
- ## 4. Estimating activation directions
102
 
103
  A hidden state at a selected layer is a vector in $\mathbb{R}^{1024}$. To estimate a direction associated with one emotional contrast, the system compares the model's states for paired passages that differ in the desired property.
104
 
@@ -126,9 +110,9 @@ The three directions form the rows of a matrix $B_\ell\in\mathbb{R}^{3\times1024
126
 
127
  Default layers are 8, 16, and 23, using zero-based indexing, with weights 1, 1, and 0.5. This is subtraction, averaging, and normalization; there is no training optimizer, backbone fine-tuning, orthogonalization, or outcome-based fitting. The small calibration set may encode vocabulary, topic, or perspective along with emotion. Normalizing the vectors does not establish that the axes are independent or valid across languages.
128
 
129
- ## 5. From coordinates to bounded displacements
130
 
131
- ### 5.1 Selecting and weighting axes
132
 
133
  ![Geometry and weights editor with the trajectory and activation-steering controls.](figures/screenshot-03.png)
134
 
@@ -147,7 +131,7 @@ $$
147
 
148
  where $m_j$ is one for a retained axis and zero otherwise. Coefficients are not renormalized after selection. For coordinate magnitudes below one, $T<1$ reduces their magnitudes and emphasizes relative differences; $T>1$ increases them and makes those differences less pronounced. These operations affect three activation coefficients, not token probabilities.
149
 
150
- ### 5.2 Strength, inertia, and budget
151
 
152
  For the current final-token state $h_{\ell,n}$, strength $s$, and layer weight $w_\ell$, the raw displacement is
153
 
@@ -175,7 +159,7 @@ $$
175
 
176
  Strength determines the proposed displacement; budget supplies its ceiling. Raising the budget has no effect when the proposed displacement already fits below it. Budget 1 permits a displacement as large in RMS as the hidden state itself. It is not a token allowance, a semantic-change quota, or a guarantee of stronger emotional accuracy. Inertia uses the previous already-capped displacement and resets with each new generation call.
177
 
178
- ### 5.3 Intervention site
179
 
180
  Let $h$ denote the state entering the feed-forward portion of a decoder block. Without intervention, that portion computes
181
 
@@ -193,7 +177,7 @@ A pre-hook adds $\delta$ to the normalization input; a block-output hook adds th
193
 
194
  This is an open-loop intervention. Coefficients come from the requested absolute coordinates, not the difference between a measured output emotion and the target. A zero coefficient adds no intervention on that axis; it does not actively neutralize emotion already expressed by the model.
195
 
196
- ## 6. User controls and rewrite instructions
197
 
198
  | Control | Default without an imported override | Function |
199
  |---|---:|---|
@@ -222,7 +206,7 @@ Four system-prompt styles provide separate editing constraints:
222
 
223
  Restrained is the default in rewrite mode. Smoke mode retains its original general rewriting instruction unless a style is explicitly selected. Each prompt requests complete sentences and treats supplied text as material rather than instructions. A per-chunk suffix specifies the original character count and hard character allowance. Numerical emotional coordinates are not inserted into these prompts; the coordinates act through hidden states. Prompt instructions influence generation but are not formal semantic guarantees. The runner has no semantic-equivalence rejection filter and does not lower steering settings automatically.
224
 
225
- ## 7. Segmentation, length control, and repetition
226
 
227
  The runner reads and trims the outer whitespace of a UTF-8 text file. Blank lines define paragraphs. Long paragraphs are split using a 700-character ceiling, preferring sentence punctuation when a suitable boundary exists, then whitespace, and finally a hard split. This is a punctuation heuristic, not a linguistic sentence parser. Original whitespace between chunks is preserved during output assembly.
228
 
@@ -248,7 +232,7 @@ After a generation attempt, the runner checks for repetition, empty output, exce
248
 
249
  Sentence cleanup prevents chopped words from being joined directly to the next passage, but it may omit ideas from the tail of a draft. Neither punctuation recognition nor output-size compliance establishes completeness of meaning.
250
 
251
- ## 8. Failure handling and output artifacts
252
 
253
  Each chunk receives one generation attempt at the requested activation settings. A caught generation exception is recorded; the original chunk remains in the assembled text and processing continues. Calibration failures, invalid inputs, filesystem failures, and process termination are outside this per-chunk recovery mechanism and can stop a run. A persistent device failure may cause subsequent chunks to fail as well.
254
 
@@ -264,7 +248,7 @@ Successful generation records include stopping reason, token count, elapsed time
264
 
265
  JSON writes use temporary-file replacement. The companion text file is written normally and may be incomplete if interrupted during that write. Reports are incremental records, not automatic resume checkpoints: rerunning starts over and overwrites the selected output paths. Use a distinct output filename for each experiment. Reports contain the input text and should be treated as document-bearing artifacts.
266
 
267
- ## 9. Engineering checks and evidence
268
 
269
  Smoke mode is the default and operates on one supplied passage. It runs baseline, zero-strength, positive-valence, negative-valence, and restored-baseline conditions. Positive and negative conditions use coefficient vectors $(0.8,0,0)$ and $(-0.8,0,0)$. The third coordinate zero corresponds to intensity 0.5.
270
 
@@ -274,7 +258,7 @@ Smoke mode defaults to the original 128-token allowance and 600-second time thre
274
 
275
  For the November 13 revision, seven CPU policy tests passed, Python and shell syntax were checked, and CLI loading was verified. Tests cover such behavior as unchanged requested controls, paragraph allowance accounting, draft retention, sentence cleanup, and continuing after a failed chunk. They do not execute the CUDA model. The current revision has not yet been run on an ARC GPU. A successful GPU run was reported for an earlier revision on November 12; it is historical evidence, not validation of the current code.
276
 
277
- ## 10. Reproduction
278
 
279
  Inside a suitable ARC GPU allocation, from a fresh repository copy:
280
 
@@ -302,7 +286,7 @@ These strength and budget values illustrate explicit configuration; they are not
302
 
303
  Archive the repository revision, engine manifest, resolved dependencies, GPU and driver information, command-line arguments, input, geometry, and report. The engine identity's `source_commit` field currently contains a snapshot label rather than a Git commit hash, so the repository revision should be recorded separately. The default seed is zero and TF32 matrix multiplication is disabled, but identical results across hardware and library versions are not guaranteed.
304
 
305
- ## 11. Scientific limits and evaluation requirements
306
 
307
  The system offers a direct, inspectable intervention, not a demonstrated emotional matching algorithm. Its main limitations are the small English calibration set, untested interactions between axes and layers, open-loop use of absolute targets, and lack of independent output assessment. The model can change subject matter or factual claims, especially under Creative instructions or strong perturbations. Stronger displacement can degrade fluency without improving emotional alignment.
308
 
 
9
 
10
  AFFECTOR-ARC is an experimental command-line system for rewriting text under a user-defined emotional trajectory. It runs a frozen Qwen3.5-0.8B model on an NVIDIA GPU and changes selected internal activations during generation. A trajectory specifies valence, inward/outward emotional orientation, and intensity across normalized document position. Small sets of contrasting English passages establish three activation directions at each selected transformer layer. At inference time, the requested coordinates determine a weighted displacement, scaled relative to the current hidden-state magnitude, smoothed across decoding steps, and constrained by an RMS budget. Paired hooks apply this displacement to both the feed-forward input and its residual path. Document rewriting combines these interventions with four editing styles, sentence-aware segmentation, bounded generation, and incremental reporting. This report derives the mechanism from its implemented operations and distinguishes numerical controls from emotional outcomes. CPU policy tests pass; the current revision still requires CUDA validation. No measured claim of emotional accuracy, semantic preservation, or multilingual effectiveness is made.
11
 
12
+ ## Purpose and Research Context
13
 
14
+ AFFECTOR-ARC investigates how a prescribed emotional progression can influence a document rewrite on an allocated GPU. A user supplies a UTF-8 text and an ordered sequence of valence, inward/outward emotional orientation, and intensity coordinates. The runner maps document positions to that sequence and converts the sampled coordinates into activation displacements during generation. Here, geometry means a path through a three-dimensional coordinate space, with layer settings and optional calibration matrices. It expresses a desired progression rather than a surface reconstructed from text or a constraint applied directly to individual words.
15
 
16
+ The intervention acts on the numerical hidden states used to predict successive tokens while the model's stored parameters remain fixed. This approach builds on contrastive activation steering: Turner and colleagues derive directions from contrasting prompts, and Panickssery and colleagues average differences between positive and negative behavioral examples ([Turner et al., 2023](https://arxiv.org/abs/2308.10248v1); [Panickssery et al., 2024](https://arxiv.org/abs/2312.06681v4)). AFFECTOR-ARC uses small sets of contrasting passages to establish emotional directions at selected layers, then applies coordinate-dependent displacements as each passage is rewritten. The contribution is an inspectable implementation of this mapping and its operational controls, not a claim that the emotional coordinates uniquely determine a continuation.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  ![Document workspace displaying an existing Little Red Riding Hood input and rewrite.](figures/screenshot-02.png)
19
 
20
  *Document workspace displaying an existing Little Red Riding Hood input and rewrite.*
 
21
 
22
+ Research connecting model emotion spaces with human valence/arousal judgments provides motivation for coordinate-based experimentation. Wu and colleagues report concept-based steering across linguistic-cultural settings ([Wu et al., 2025](https://arxiv.org/abs/2506.13978v1)), while Diallo and colleagues use human ratings to examine perceived emotional intensity and text quality ([Diallo et al., 2026](https://arxiv.org/abs/2601.21505v1)). Their findings make human interpretation central to evaluation, but they do not calibrate the present inward/outward axis or RMS-scaled settings. A text's emotional reading, its requested coordinates, and the model's hidden states remain distinct objects linked by an experimental calibration.
23
 
24
+ That distinction matters when selecting layers and combining axes. Shu and colleagues find uneven causal organization across emotion categories in sparse-feature interventions for recognition ([Shu et al., 2026](https://arxiv.org/abs/2604.25866v3)); Wang and colleagues show that strong probing accuracy need not identify the most effective intervention layers ([Wang et al., 2026](https://arxiv.org/abs/2609.22135v1)). Ha and colleagues likewise find that supportive-empathy directions are only partially separable ([Ha et al., 2026](https://arxiv.org/abs/2609.15654v1)). Automated vector extraction and context-dependent strength offer further approaches to calibration and control ([Cui et al., 2025](https://arxiv.org/abs/2509.22739v3); [Ferrando et al., 2025](https://arxiv.org/abs/2512.03661v2)). These studies motivate layer sweeps, cross-axis tests, and adaptive controls, while the present runner uses an explicit coordinate mixture with user-selected settings.
25
 
26
+ Generation limits and failure reporting are part of the same research problem. E-STEER reports non-monotonic effects of emotional interventions across several tasks ([Sun et al., 2026](https://arxiv.org/abs/2604.00005v1)), and Jeong observes both emotional changes and degeneration in small models ([Jeong, 2026](https://arxiv.org/abs/2604.04064v1)). Stronger settings therefore cannot be assumed to improve transfer. The runner offers a rewrite mode that processes a document in chunks and records attempts and failures, and a smoke mode with five controlled generation conditions for checking intervention and cleanup behavior. Its scope is the command-line CUDA computation illustrated alongside the desktop client's workspaces; the runner itself supplies neither a hosted service, conversational history, nor automatic emotional scoring.
 
27
 
28
+ This operational scope determines the evidence needed to assess the system. SteerScope evaluates efficacy together with side effects, generalization, and dependence on steering data, and finds no general advantage of activation methods over prompt steering in its tested trade-offs ([Yang et al., 2026](https://arxiv.org/abs/2610.07722v1)). AFFECTOR-ARC therefore requires prompt-only and unsteered baselines, blinded emotional and quality ratings, content-change assessment, and complete reporting of repetition and truncation. The report documents the implemented mechanism and engineering checks; these broader comparisons and an empirically established operating range remain future work.
29
 
30
+ ## Runtime and data flow
31
 
32
  The runner loads `Qwen/Qwen3.5-0.8B` at revision `2fc06364715b967f1860aea9cf38778875588b17`. The implementation uses `Qwen3_5ForConditionalGeneration`, its text decoder layers, float32 computation, eager attention, and the first process-visible CUDA device. It checks for 24 decoder layers; the geometry and calibration code assume hidden width 1,024. The backbone is in evaluation mode, its parameters have gradients disabled, and calibration and generation run without gradient tracking.
33
 
 
54
 
55
  *Illustration 1. Execution schematic. The compute workload belongs to the allocated GPU node. Resource requests describe scheduling needs and do not establish measured minimum requirements.*
56
 
57
+ ## Emotional coordinates and trajectory interpolation
58
 
59
  A trajectory point is
60
 
 
82
 
83
  The runner accepts a native geometry JSON file and supported analysis JSON structures containing emotional coordinates. It recalibrates the basis on the current CUDA runtime even when the imported geometry includes one. With no geometry argument, it uses a demonstration path with three points; this path is not inferred from the input document.
84
 
85
+ ## Estimating activation directions
86
 
87
  A hidden state at a selected layer is a vector in $\mathbb{R}^{1024}$. To estimate a direction associated with one emotional contrast, the system compares the model's states for paired passages that differ in the desired property.
88
 
 
110
 
111
  Default layers are 8, 16, and 23, using zero-based indexing, with weights 1, 1, and 0.5. This is subtraction, averaging, and normalization; there is no training optimizer, backbone fine-tuning, orthogonalization, or outcome-based fitting. The small calibration set may encode vocabulary, topic, or perspective along with emotion. Normalizing the vectors does not establish that the axes are independent or valid across languages.
112
 
113
+ ## From coordinates to bounded displacements
114
 
115
+ ### Selecting and weighting axes
116
 
117
  ![Geometry and weights editor with the trajectory and activation-steering controls.](figures/screenshot-03.png)
118
 
 
131
 
132
  where $m_j$ is one for a retained axis and zero otherwise. Coefficients are not renormalized after selection. For coordinate magnitudes below one, $T<1$ reduces their magnitudes and emphasizes relative differences; $T>1$ increases them and makes those differences less pronounced. These operations affect three activation coefficients, not token probabilities.
133
 
134
+ ### Strength, inertia, and budget
135
 
136
  For the current final-token state $h_{\ell,n}$, strength $s$, and layer weight $w_\ell$, the raw displacement is
137
 
 
159
 
160
  Strength determines the proposed displacement; budget supplies its ceiling. Raising the budget has no effect when the proposed displacement already fits below it. Budget 1 permits a displacement as large in RMS as the hidden state itself. It is not a token allowance, a semantic-change quota, or a guarantee of stronger emotional accuracy. Inertia uses the previous already-capped displacement and resets with each new generation call.
161
 
162
+ ### Intervention site
163
 
164
  Let $h$ denote the state entering the feed-forward portion of a decoder block. Without intervention, that portion computes
165
 
 
177
 
178
  This is an open-loop intervention. Coefficients come from the requested absolute coordinates, not the difference between a measured output emotion and the target. A zero coefficient adds no intervention on that axis; it does not actively neutralize emotion already expressed by the model.
179
 
180
+ ## User controls and rewrite instructions
181
 
182
  | Control | Default without an imported override | Function |
183
  |---|---:|---|
 
206
 
207
  Restrained is the default in rewrite mode. Smoke mode retains its original general rewriting instruction unless a style is explicitly selected. Each prompt requests complete sentences and treats supplied text as material rather than instructions. A per-chunk suffix specifies the original character count and hard character allowance. Numerical emotional coordinates are not inserted into these prompts; the coordinates act through hidden states. Prompt instructions influence generation but are not formal semantic guarantees. The runner has no semantic-equivalence rejection filter and does not lower steering settings automatically.
208
 
209
+ ## Segmentation, length control, and repetition
210
 
211
  The runner reads and trims the outer whitespace of a UTF-8 text file. Blank lines define paragraphs. Long paragraphs are split using a 700-character ceiling, preferring sentence punctuation when a suitable boundary exists, then whitespace, and finally a hard split. This is a punctuation heuristic, not a linguistic sentence parser. Original whitespace between chunks is preserved during output assembly.
212
 
 
232
 
233
  Sentence cleanup prevents chopped words from being joined directly to the next passage, but it may omit ideas from the tail of a draft. Neither punctuation recognition nor output-size compliance establishes completeness of meaning.
234
 
235
+ ## Failure handling and output artifacts
236
 
237
  Each chunk receives one generation attempt at the requested activation settings. A caught generation exception is recorded; the original chunk remains in the assembled text and processing continues. Calibration failures, invalid inputs, filesystem failures, and process termination are outside this per-chunk recovery mechanism and can stop a run. A persistent device failure may cause subsequent chunks to fail as well.
238
 
 
248
 
249
  JSON writes use temporary-file replacement. The companion text file is written normally and may be incomplete if interrupted during that write. Reports are incremental records, not automatic resume checkpoints: rerunning starts over and overwrites the selected output paths. Use a distinct output filename for each experiment. Reports contain the input text and should be treated as document-bearing artifacts.
250
 
251
+ ## Engineering checks and evidence
252
 
253
  Smoke mode is the default and operates on one supplied passage. It runs baseline, zero-strength, positive-valence, negative-valence, and restored-baseline conditions. Positive and negative conditions use coefficient vectors $(0.8,0,0)$ and $(-0.8,0,0)$. The third coordinate zero corresponds to intensity 0.5.
254
 
 
258
 
259
  For the November 13 revision, seven CPU policy tests passed, Python and shell syntax were checked, and CLI loading was verified. Tests cover such behavior as unchanged requested controls, paragraph allowance accounting, draft retention, sentence cleanup, and continuing after a failed chunk. They do not execute the CUDA model. The current revision has not yet been run on an ARC GPU. A successful GPU run was reported for an earlier revision on November 12; it is historical evidence, not validation of the current code.
260
 
261
+ ## Reproduction
262
 
263
  Inside a suitable ARC GPU allocation, from a fresh repository copy:
264
 
 
286
 
287
  Archive the repository revision, engine manifest, resolved dependencies, GPU and driver information, command-line arguments, input, geometry, and report. The engine identity's `source_commit` field currently contains a snapshot label rather than a Git commit hash, so the repository revision should be recorded separately. The default seed is zero and TF32 matrix multiplication is disabled, but identical results across hardware and library versions are not guaranteed.
288
 
289
+ ## Scientific limits and evaluation requirements
290
 
291
  The system offers a direct, inspectable intervention, not a demonstrated emotional matching algorithm. Its main limitations are the small English calibration set, untested interactions between axes and layers, open-loop use of absolute targets, and lack of independent output assessment. The model can change subject matter or factual claims, especially under Creative instructions or strong perturbations. Stronger displacement can degrade fluency without improving emotional alignment.
292
 
paper/source.md CHANGED
@@ -9,41 +9,25 @@ Email: wtaggart@vt.edu
9
 
10
  AFFECTOR-ARC is an experimental command-line system for rewriting text under a user-defined emotional trajectory. It runs a frozen Qwen3.5-0.8B model on an NVIDIA GPU and changes selected internal activations during generation. A trajectory specifies valence, inward/outward emotional orientation, and intensity across normalized document position. Small sets of contrasting English passages establish three activation directions at each selected transformer layer. At inference time, the requested coordinates determine a weighted displacement, scaled relative to the current hidden-state magnitude, smoothed across decoding steps, and constrained by an RMS budget. Paired hooks apply this displacement to both the feed-forward input and its residual path. Document rewriting combines these interventions with four editing styles, sentence-aware segmentation, bounded generation, and incremental reporting. This report derives the mechanism from its implemented operations and distinguishes numerical controls from emotional outcomes. CPU policy tests pass; the current revision still requires CUDA validation. No measured claim of emotional accuracy, semantic preservation, or multilingual effectiveness is made.
11
 
12
- ## Literature review: activation steering and emotion
13
 
14
- This focused review covers twelve papers, emphasizing 2025-2026 research and retaining two methodological foundations. Titles, author lists, version histories, and the claims summarized here were checked against arXiv records and the corresponding paper text on November 13, 2026. The cited versions are fixed below; availability on arXiv alone does not establish peer review. The implications for this project are research motivations, not evidence that its implementation reproduces these results.
15
 
16
- **From activation differences to behavioral control.** Activation steering changes internal model states during inference while leaving the backbone weights fixed. Turner et al. derive intervention vectors from contrasting prompts; Panickssery et al. average differences across positive and negative behavioral examples. These provide the methodological basis for contrastive calibration, but do not validate a particular emotional coordinate system or insertion site. [Turner et al., 2023 (R1)](https://arxiv.org/abs/2308.10248v1); [Panickssery et al., 2024 (R2)](https://arxiv.org/abs/2312.06681v4).
17
-
18
- **Emotional expression and human judgment.** Wu et al. relate model emotion spaces to human valence/arousal judgments and report concept-based steering across linguistic-cultural settings. Diallo et al. evaluate perceived emotional intensity and text quality with human raters, finding that effects depend on emotion and steering strength. Together they motivate separate measures of emotional movement and readability. Their axes and numerical strengths cannot be assumed equivalent to this project's inward/outward direction or RMS-scaled controls. [Wu et al., 2025 (R3)](https://arxiv.org/abs/2506.13978v1); [Diallo et al., 2026 arXiv version (R4)](https://arxiv.org/abs/2601.21505v1).
19
-
20
- **Emotion can affect more than tone.** Sun et al.'s E-STEER uses valence-arousal-dominance interventions to study reasoning, generation, safety, and agent behavior, reporting non-monotonic relationships. Jeong's small-model comparison reports both coherent emotional changes and degeneration, including repetition, depending on extraction method and architecture. These findings motivate reporting failed generations alongside successes and testing strength sweeps rather than assuming that larger perturbations improve emotional fit. Neither study establishes an operating range for this implementation. [Sun et al., 2026 (R5)](https://arxiv.org/abs/2604.00005v1); [Jeong, 2026 (R6)](https://arxiv.org/abs/2604.04064v1).
21
-
22
- **Reading an emotion is different from controlling it.** Shu et al.'s revised study identifies uneven causal organization of sparse features across emotion categories and tests interventions for emotion recognition. Wang et al. show, in omni-modal models, that layers with strong emotion-probing accuracy need not be the best intervention layers. Recognition results therefore inform evaluator design, while layer selection for rewriting still requires causal tests on generated text. Neither finding licenses importing layer indices across architectures. [Shu et al., 2026, v3 (R7)](https://arxiv.org/abs/2604.25866v3); [Wang et al., 2026 (R8)](https://arxiv.org/abs/2609.22135v1).
23
-
24
- **Multiple axes and adaptive control.** Ha et al. find that supportive-empathy directions are only partially separable: intervening on one can shift other EPITOME proxy scores. Cui and Chen automate vector extraction from labeled data, with task-dependent benefits. Ferrando et al. adapt intervention strength to context, studying the balance between toxicity mitigation and retained utility. These approaches motivate broader calibration, cross-axis tests, and future adaptive control. The present coordinate mixture is not an implementation of their learned selectors or context-dependent gates. [Ha et al., 2026 (R9)](https://arxiv.org/abs/2609.15654v1); [Cui and Chen, 2025, revised 2026 (R10)](https://arxiv.org/abs/2509.22739v3); [Ferrando et al., 2025, revised 2026 (R11)](https://arxiv.org/abs/2512.03661v2).
25
-
26
- **Evaluation must include costs as well as target effects.** Yang et al.'s SteerScope evaluates steering efficacy jointly with side effects, generalization, and data dependence. In its tested settings, activation methods do not dominate prompt steering on the efficacy/side-effect trade-off. For this project, the resulting evaluation priorities are prompt-only and unsteered baselines, blinded emotional and quality ratings, content-change assessment appropriate to the rewrite style, and complete accounting of repetition, truncation, and original-text fallbacks. This is an evaluation agenda, not a completed benchmark. [Yang et al., 2026 (R12)](https://arxiv.org/abs/2610.07722v1).
27
-
28
- ## 1. Problem and operating principle
29
-
30
- A language model generates text by repeatedly estimating a distribution over the next token. Its intermediate hidden states are numerical vectors that contribute to those estimates. Changing a hidden state can change the continuation even when the input text and the model's stored parameters remain fixed.
31
 
32
  ![Document workspace displaying an existing Little Red Riding Hood input and rewrite.](figures/screenshot-02.png)
33
 
34
  *Document workspace displaying an existing Little Red Riding Hood input and rewrite.*
35
- AFFECTOR-ARC uses this property to influence the emotional expression of a rewrite. The user supplies an input document and a sequence of emotional coordinates. The software maps positions in the input to positions on that sequence, converts the coordinates into activation displacements, and applies the displacements while generating each rewritten passage.
36
 
37
- The term **geometry** means an ordered path through a three-dimensional coordinate space, together with layer settings and optional calibration matrices. It does not mean that the software reconstructs a solid surface or applies geometric constraints directly to words. A text's emotional interpretation, a numerical target, and a model's hidden states are distinct objects. The calibration is an experimental mapping between them.
38
 
39
- Two execution modes are available:
40
 
41
- - **Rewrite:** process an entire UTF-8 text document in chunks, write the transformed text, and record attempts and failures.
42
- - **Smoke:** run five controlled generation conditions to check basic intervention and cleanup behavior.
43
 
44
- The interface is a command-line runner for a CUDA allocation. It does not provide a desktop interface, a hosted API service, automatic emotional scoring, or conversational history.
45
 
46
- ## 2. Runtime and data flow
47
 
48
  The runner loads `Qwen/Qwen3.5-0.8B` at revision `2fc06364715b967f1860aea9cf38778875588b17`. The implementation uses `Qwen3_5ForConditionalGeneration`, its text decoder layers, float32 computation, eager attention, and the first process-visible CUDA device. It checks for 24 decoder layers; the geometry and calibration code assume hidden width 1,024. The backbone is in evaluation mode, its parameters have gradients disabled, and calibration and generation run without gradient tracking.
49
 
@@ -70,7 +54,7 @@ The example Slurm script requests one GPU, eight CPU cores, 64 GB of host memory
70
 
71
  *Illustration 1. Execution schematic. The compute workload belongs to the allocated GPU node. Resource requests describe scheduling needs and do not establish measured minimum requirements.*
72
 
73
- ## 3. Emotional coordinates and trajectory interpolation
74
 
75
  A trajectory point is
76
 
@@ -98,7 +82,7 @@ That target remains constant throughout generation of the chunk. A long trajecto
98
 
99
  The runner accepts a native geometry JSON file and supported analysis JSON structures containing emotional coordinates. It recalibrates the basis on the current CUDA runtime even when the imported geometry includes one. With no geometry argument, it uses a demonstration path with three points; this path is not inferred from the input document.
100
 
101
- ## 4. Estimating activation directions
102
 
103
  A hidden state at a selected layer is a vector in $\mathbb{R}^{1024}$. To estimate a direction associated with one emotional contrast, the system compares the model's states for paired passages that differ in the desired property.
104
 
@@ -126,9 +110,9 @@ The three directions form the rows of a matrix $B_\ell\in\mathbb{R}^{3\times1024
126
 
127
  Default layers are 8, 16, and 23, using zero-based indexing, with weights 1, 1, and 0.5. This is subtraction, averaging, and normalization; there is no training optimizer, backbone fine-tuning, orthogonalization, or outcome-based fitting. The small calibration set may encode vocabulary, topic, or perspective along with emotion. Normalizing the vectors does not establish that the axes are independent or valid across languages.
128
 
129
- ## 5. From coordinates to bounded displacements
130
 
131
- ### 5.1 Selecting and weighting axes
132
 
133
  ![Geometry and weights editor with the trajectory and activation-steering controls.](figures/screenshot-03.png)
134
 
@@ -147,7 +131,7 @@ $$
147
 
148
  where $m_j$ is one for a retained axis and zero otherwise. Coefficients are not renormalized after selection. For coordinate magnitudes below one, $T<1$ reduces their magnitudes and emphasizes relative differences; $T>1$ increases them and makes those differences less pronounced. These operations affect three activation coefficients, not token probabilities.
149
 
150
- ### 5.2 Strength, inertia, and budget
151
 
152
  For the current final-token state $h_{\ell,n}$, strength $s$, and layer weight $w_\ell$, the raw displacement is
153
 
@@ -175,7 +159,7 @@ $$
175
 
176
  Strength determines the proposed displacement; budget supplies its ceiling. Raising the budget has no effect when the proposed displacement already fits below it. Budget 1 permits a displacement as large in RMS as the hidden state itself. It is not a token allowance, a semantic-change quota, or a guarantee of stronger emotional accuracy. Inertia uses the previous already-capped displacement and resets with each new generation call.
177
 
178
- ### 5.3 Intervention site
179
 
180
  Let $h$ denote the state entering the feed-forward portion of a decoder block. Without intervention, that portion computes
181
 
@@ -193,7 +177,7 @@ A pre-hook adds $\delta$ to the normalization input; a block-output hook adds th
193
 
194
  This is an open-loop intervention. Coefficients come from the requested absolute coordinates, not the difference between a measured output emotion and the target. A zero coefficient adds no intervention on that axis; it does not actively neutralize emotion already expressed by the model.
195
 
196
- ## 6. User controls and rewrite instructions
197
 
198
  | Control | Default without an imported override | Function |
199
  |---|---:|---|
@@ -222,7 +206,7 @@ Four system-prompt styles provide separate editing constraints:
222
 
223
  Restrained is the default in rewrite mode. Smoke mode retains its original general rewriting instruction unless a style is explicitly selected. Each prompt requests complete sentences and treats supplied text as material rather than instructions. A per-chunk suffix specifies the original character count and hard character allowance. Numerical emotional coordinates are not inserted into these prompts; the coordinates act through hidden states. Prompt instructions influence generation but are not formal semantic guarantees. The runner has no semantic-equivalence rejection filter and does not lower steering settings automatically.
224
 
225
- ## 7. Segmentation, length control, and repetition
226
 
227
  The runner reads and trims the outer whitespace of a UTF-8 text file. Blank lines define paragraphs. Long paragraphs are split using a 700-character ceiling, preferring sentence punctuation when a suitable boundary exists, then whitespace, and finally a hard split. This is a punctuation heuristic, not a linguistic sentence parser. Original whitespace between chunks is preserved during output assembly.
228
 
@@ -248,7 +232,7 @@ After a generation attempt, the runner checks for repetition, empty output, exce
248
 
249
  Sentence cleanup prevents chopped words from being joined directly to the next passage, but it may omit ideas from the tail of a draft. Neither punctuation recognition nor output-size compliance establishes completeness of meaning.
250
 
251
- ## 8. Failure handling and output artifacts
252
 
253
  Each chunk receives one generation attempt at the requested activation settings. A caught generation exception is recorded; the original chunk remains in the assembled text and processing continues. Calibration failures, invalid inputs, filesystem failures, and process termination are outside this per-chunk recovery mechanism and can stop a run. A persistent device failure may cause subsequent chunks to fail as well.
254
 
@@ -264,7 +248,7 @@ Successful generation records include stopping reason, token count, elapsed time
264
 
265
  JSON writes use temporary-file replacement. The companion text file is written normally and may be incomplete if interrupted during that write. Reports are incremental records, not automatic resume checkpoints: rerunning starts over and overwrites the selected output paths. Use a distinct output filename for each experiment. Reports contain the input text and should be treated as document-bearing artifacts.
266
 
267
- ## 9. Engineering checks and evidence
268
 
269
  Smoke mode is the default and operates on one supplied passage. It runs baseline, zero-strength, positive-valence, negative-valence, and restored-baseline conditions. Positive and negative conditions use coefficient vectors $(0.8,0,0)$ and $(-0.8,0,0)$. The third coordinate zero corresponds to intensity 0.5.
270
 
@@ -274,7 +258,7 @@ Smoke mode defaults to the original 128-token allowance and 600-second time thre
274
 
275
  For the November 13 revision, seven CPU policy tests passed, Python and shell syntax were checked, and CLI loading was verified. Tests cover such behavior as unchanged requested controls, paragraph allowance accounting, draft retention, sentence cleanup, and continuing after a failed chunk. They do not execute the CUDA model. The current revision has not yet been run on an ARC GPU. A successful GPU run was reported for an earlier revision on November 12; it is historical evidence, not validation of the current code.
276
 
277
- ## 10. Reproduction
278
 
279
  Inside a suitable ARC GPU allocation, from a fresh repository copy:
280
 
@@ -302,7 +286,7 @@ These strength and budget values illustrate explicit configuration; they are not
302
 
303
  Archive the repository revision, engine manifest, resolved dependencies, GPU and driver information, command-line arguments, input, geometry, and report. The engine identity's `source_commit` field currently contains a snapshot label rather than a Git commit hash, so the repository revision should be recorded separately. The default seed is zero and TF32 matrix multiplication is disabled, but identical results across hardware and library versions are not guaranteed.
304
 
305
- ## 11. Scientific limits and evaluation requirements
306
 
307
  The system offers a direct, inspectable intervention, not a demonstrated emotional matching algorithm. Its main limitations are the small English calibration set, untested interactions between axes and layers, open-loop use of absolute targets, and lack of independent output assessment. The model can change subject matter or factual claims, especially under Creative instructions or strong perturbations. Stronger displacement can degrade fluency without improving emotional alignment.
308
 
 
9
 
10
  AFFECTOR-ARC is an experimental command-line system for rewriting text under a user-defined emotional trajectory. It runs a frozen Qwen3.5-0.8B model on an NVIDIA GPU and changes selected internal activations during generation. A trajectory specifies valence, inward/outward emotional orientation, and intensity across normalized document position. Small sets of contrasting English passages establish three activation directions at each selected transformer layer. At inference time, the requested coordinates determine a weighted displacement, scaled relative to the current hidden-state magnitude, smoothed across decoding steps, and constrained by an RMS budget. Paired hooks apply this displacement to both the feed-forward input and its residual path. Document rewriting combines these interventions with four editing styles, sentence-aware segmentation, bounded generation, and incremental reporting. This report derives the mechanism from its implemented operations and distinguishes numerical controls from emotional outcomes. CPU policy tests pass; the current revision still requires CUDA validation. No measured claim of emotional accuracy, semantic preservation, or multilingual effectiveness is made.
11
 
12
+ ## Purpose and Research Context
13
 
14
+ AFFECTOR-ARC investigates how a prescribed emotional progression can influence a document rewrite on an allocated GPU. A user supplies a UTF-8 text and an ordered sequence of valence, inward/outward emotional orientation, and intensity coordinates. The runner maps document positions to that sequence and converts the sampled coordinates into activation displacements during generation. Here, geometry means a path through a three-dimensional coordinate space, with layer settings and optional calibration matrices. It expresses a desired progression rather than a surface reconstructed from text or a constraint applied directly to individual words.
15
 
16
+ The intervention acts on the numerical hidden states used to predict successive tokens while the model's stored parameters remain fixed. This approach builds on contrastive activation steering: Turner and colleagues derive directions from contrasting prompts, and Panickssery and colleagues average differences between positive and negative behavioral examples ([Turner et al., 2023](https://arxiv.org/abs/2308.10248v1); [Panickssery et al., 2024](https://arxiv.org/abs/2312.06681v4)). AFFECTOR-ARC uses small sets of contrasting passages to establish emotional directions at selected layers, then applies coordinate-dependent displacements as each passage is rewritten. The contribution is an inspectable implementation of this mapping and its operational controls, not a claim that the emotional coordinates uniquely determine a continuation.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  ![Document workspace displaying an existing Little Red Riding Hood input and rewrite.](figures/screenshot-02.png)
19
 
20
  *Document workspace displaying an existing Little Red Riding Hood input and rewrite.*
 
21
 
22
+ Research connecting model emotion spaces with human valence/arousal judgments provides motivation for coordinate-based experimentation. Wu and colleagues report concept-based steering across linguistic-cultural settings ([Wu et al., 2025](https://arxiv.org/abs/2506.13978v1)), while Diallo and colleagues use human ratings to examine perceived emotional intensity and text quality ([Diallo et al., 2026](https://arxiv.org/abs/2601.21505v1)). Their findings make human interpretation central to evaluation, but they do not calibrate the present inward/outward axis or RMS-scaled settings. A text's emotional reading, its requested coordinates, and the model's hidden states remain distinct objects linked by an experimental calibration.
23
 
24
+ That distinction matters when selecting layers and combining axes. Shu and colleagues find uneven causal organization across emotion categories in sparse-feature interventions for recognition ([Shu et al., 2026](https://arxiv.org/abs/2604.25866v3)); Wang and colleagues show that strong probing accuracy need not identify the most effective intervention layers ([Wang et al., 2026](https://arxiv.org/abs/2609.22135v1)). Ha and colleagues likewise find that supportive-empathy directions are only partially separable ([Ha et al., 2026](https://arxiv.org/abs/2609.15654v1)). Automated vector extraction and context-dependent strength offer further approaches to calibration and control ([Cui et al., 2025](https://arxiv.org/abs/2509.22739v3); [Ferrando et al., 2025](https://arxiv.org/abs/2512.03661v2)). These studies motivate layer sweeps, cross-axis tests, and adaptive controls, while the present runner uses an explicit coordinate mixture with user-selected settings.
25
 
26
+ Generation limits and failure reporting are part of the same research problem. E-STEER reports non-monotonic effects of emotional interventions across several tasks ([Sun et al., 2026](https://arxiv.org/abs/2604.00005v1)), and Jeong observes both emotional changes and degeneration in small models ([Jeong, 2026](https://arxiv.org/abs/2604.04064v1)). Stronger settings therefore cannot be assumed to improve transfer. The runner offers a rewrite mode that processes a document in chunks and records attempts and failures, and a smoke mode with five controlled generation conditions for checking intervention and cleanup behavior. Its scope is the command-line CUDA computation illustrated alongside the desktop client's workspaces; the runner itself supplies neither a hosted service, conversational history, nor automatic emotional scoring.
 
27
 
28
+ This operational scope determines the evidence needed to assess the system. SteerScope evaluates efficacy together with side effects, generalization, and dependence on steering data, and finds no general advantage of activation methods over prompt steering in its tested trade-offs ([Yang et al., 2026](https://arxiv.org/abs/2610.07722v1)). AFFECTOR-ARC therefore requires prompt-only and unsteered baselines, blinded emotional and quality ratings, content-change assessment, and complete reporting of repetition and truncation. The report documents the implemented mechanism and engineering checks; these broader comparisons and an empirically established operating range remain future work.
29
 
30
+ ## Runtime and data flow
31
 
32
  The runner loads `Qwen/Qwen3.5-0.8B` at revision `2fc06364715b967f1860aea9cf38778875588b17`. The implementation uses `Qwen3_5ForConditionalGeneration`, its text decoder layers, float32 computation, eager attention, and the first process-visible CUDA device. It checks for 24 decoder layers; the geometry and calibration code assume hidden width 1,024. The backbone is in evaluation mode, its parameters have gradients disabled, and calibration and generation run without gradient tracking.
33
 
 
54
 
55
  *Illustration 1. Execution schematic. The compute workload belongs to the allocated GPU node. Resource requests describe scheduling needs and do not establish measured minimum requirements.*
56
 
57
+ ## Emotional coordinates and trajectory interpolation
58
 
59
  A trajectory point is
60
 
 
82
 
83
  The runner accepts a native geometry JSON file and supported analysis JSON structures containing emotional coordinates. It recalibrates the basis on the current CUDA runtime even when the imported geometry includes one. With no geometry argument, it uses a demonstration path with three points; this path is not inferred from the input document.
84
 
85
+ ## Estimating activation directions
86
 
87
  A hidden state at a selected layer is a vector in $\mathbb{R}^{1024}$. To estimate a direction associated with one emotional contrast, the system compares the model's states for paired passages that differ in the desired property.
88
 
 
110
 
111
  Default layers are 8, 16, and 23, using zero-based indexing, with weights 1, 1, and 0.5. This is subtraction, averaging, and normalization; there is no training optimizer, backbone fine-tuning, orthogonalization, or outcome-based fitting. The small calibration set may encode vocabulary, topic, or perspective along with emotion. Normalizing the vectors does not establish that the axes are independent or valid across languages.
112
 
113
+ ## From coordinates to bounded displacements
114
 
115
+ ### Selecting and weighting axes
116
 
117
  ![Geometry and weights editor with the trajectory and activation-steering controls.](figures/screenshot-03.png)
118
 
 
131
 
132
  where $m_j$ is one for a retained axis and zero otherwise. Coefficients are not renormalized after selection. For coordinate magnitudes below one, $T<1$ reduces their magnitudes and emphasizes relative differences; $T>1$ increases them and makes those differences less pronounced. These operations affect three activation coefficients, not token probabilities.
133
 
134
+ ### Strength, inertia, and budget
135
 
136
  For the current final-token state $h_{\ell,n}$, strength $s$, and layer weight $w_\ell$, the raw displacement is
137
 
 
159
 
160
  Strength determines the proposed displacement; budget supplies its ceiling. Raising the budget has no effect when the proposed displacement already fits below it. Budget 1 permits a displacement as large in RMS as the hidden state itself. It is not a token allowance, a semantic-change quota, or a guarantee of stronger emotional accuracy. Inertia uses the previous already-capped displacement and resets with each new generation call.
161
 
162
+ ### Intervention site
163
 
164
  Let $h$ denote the state entering the feed-forward portion of a decoder block. Without intervention, that portion computes
165
 
 
177
 
178
  This is an open-loop intervention. Coefficients come from the requested absolute coordinates, not the difference between a measured output emotion and the target. A zero coefficient adds no intervention on that axis; it does not actively neutralize emotion already expressed by the model.
179
 
180
+ ## User controls and rewrite instructions
181
 
182
  | Control | Default without an imported override | Function |
183
  |---|---:|---|
 
206
 
207
  Restrained is the default in rewrite mode. Smoke mode retains its original general rewriting instruction unless a style is explicitly selected. Each prompt requests complete sentences and treats supplied text as material rather than instructions. A per-chunk suffix specifies the original character count and hard character allowance. Numerical emotional coordinates are not inserted into these prompts; the coordinates act through hidden states. Prompt instructions influence generation but are not formal semantic guarantees. The runner has no semantic-equivalence rejection filter and does not lower steering settings automatically.
208
 
209
+ ## Segmentation, length control, and repetition
210
 
211
  The runner reads and trims the outer whitespace of a UTF-8 text file. Blank lines define paragraphs. Long paragraphs are split using a 700-character ceiling, preferring sentence punctuation when a suitable boundary exists, then whitespace, and finally a hard split. This is a punctuation heuristic, not a linguistic sentence parser. Original whitespace between chunks is preserved during output assembly.
212
 
 
232
 
233
  Sentence cleanup prevents chopped words from being joined directly to the next passage, but it may omit ideas from the tail of a draft. Neither punctuation recognition nor output-size compliance establishes completeness of meaning.
234
 
235
+ ## Failure handling and output artifacts
236
 
237
  Each chunk receives one generation attempt at the requested activation settings. A caught generation exception is recorded; the original chunk remains in the assembled text and processing continues. Calibration failures, invalid inputs, filesystem failures, and process termination are outside this per-chunk recovery mechanism and can stop a run. A persistent device failure may cause subsequent chunks to fail as well.
238
 
 
248
 
249
  JSON writes use temporary-file replacement. The companion text file is written normally and may be incomplete if interrupted during that write. Reports are incremental records, not automatic resume checkpoints: rerunning starts over and overwrites the selected output paths. Use a distinct output filename for each experiment. Reports contain the input text and should be treated as document-bearing artifacts.
250
 
251
+ ## Engineering checks and evidence
252
 
253
  Smoke mode is the default and operates on one supplied passage. It runs baseline, zero-strength, positive-valence, negative-valence, and restored-baseline conditions. Positive and negative conditions use coefficient vectors $(0.8,0,0)$ and $(-0.8,0,0)$. The third coordinate zero corresponds to intensity 0.5.
254
 
 
258
 
259
  For the November 13 revision, seven CPU policy tests passed, Python and shell syntax were checked, and CLI loading was verified. Tests cover such behavior as unchanged requested controls, paragraph allowance accounting, draft retention, sentence cleanup, and continuing after a failed chunk. They do not execute the CUDA model. The current revision has not yet been run on an ARC GPU. A successful GPU run was reported for an earlier revision on November 12; it is historical evidence, not validation of the current code.
260
 
261
+ ## Reproduction
262
 
263
  Inside a suitable ARC GPU allocation, from a fresh repository copy:
264
 
 
286
 
287
  Archive the repository revision, engine manifest, resolved dependencies, GPU and driver information, command-line arguments, input, geometry, and report. The engine identity's `source_commit` field currently contains a snapshot label rather than a Git commit hash, so the repository revision should be recorded separately. The default seed is zero and TF32 matrix multiplication is disabled, but identical results across hardware and library versions are not guaranteed.
288
 
289
+ ## Scientific limits and evaluation requirements
290
 
291
  The system offers a direct, inspectable intervention, not a demonstrated emotional matching algorithm. Its main limitations are the small English calibration set, untested interactions between axes and layers, open-loop use of absolute targets, and lack of independent output assessment. The model can change subject matter or factual claims, especially under Creative instructions or strong perturbations. Stronger displacement can degrade fluency without improving emotional alignment.
292