Download v3/controller/manuscript_controller.tex from PureOne/Neuyalun-Phase-Shift-RSI: direct link, hf CLI and curl.
- Browser
- Download file 15.4 kB
-
https://huggingface.co/datasets/PureOne/Neuyalun-Phase-Shift-RSI/resolve/main/v3/controller/manuscript_controller.tex
- Command line
-
hf download hf://datasets/PureOne/Neuyalun-Phase-Shift-RSI/v3/controller/manuscript_controller.tex
-
curl -L -o manuscript_controller.tex https://huggingface.co/datasets/PureOne/Neuyalun-Phase-Shift-RSI/resolve/main/v3/controller/manuscript_controller.tex
15.4 kB
| \section{Learned acquisition and executable controllers: a negative transfer result} | |
| \label{ctrl:section} | |
| The broader controller experiment produced autonomous executable modifications, but failed its predeclared comparative success criteria. A learned solver policy and a learned training-acquisition selector changed across generations and were applied to previously unseen nonlinear families. Nevertheless, tuned classical optimizers remained stronger, and learned acquisition did not reliably outperform random acquisition. This experiment is therefore a falsification of a broader performance claim, alongside the positive structural result elsewhere in this manuscript. | |
| The initial controller is BFGS with strong-Wolfe line search. Starting from this substantial classical method avoids attributing improvement over a weak initial gradient rule to a general advance in self-improvement. The design is related to established interactive learning and approximate policy iteration: see \href{https://proceedings.mlr.press/v15/ross11a.html}{Ross, Gordon, and Bagnell (2011)} and \href{https://arxiv.org/abs/1406.5979}{Ross and Bagnell (2014)}. Neither those principles nor the classical numerical actions below are claimed as new inventions. | |
| \subsection{Two changing policies inside a fixed scaffold} | |
| \label{ctrl:policies} | |
| The numerical state contains the current point, objective and gradient, an inverse-curvature approximation $B$, and observed secant statistics. The executable action library has five members: a BFGS line-search step; a Barzilai--Borwein trial; a preconditioned unit trial; a directional curvature probe; and a curvature reset followed by BFGS. The BB and unit trials have Euclidean step cap $1.5$. Worsening unit trials are rejected, while suitable secants can still update the curvature approximation. The probe direction is a cyclic coordinate direction orthogonalized against the current gradient, with radius $0.1\max\{1,\norm{x}\}/\sqrt d$. | |
| For an observed displacement $s$ and gradient difference $y$, the runtime uses the usual inverse-BFGS formula | |
| \begin{equation} | |
| B^+=B+\frac{s^\mathsf Ty+y^\mathsf TBy}{(s^\mathsf Ty)^2}ss^\mathsf T | |
| -\frac{Bys^\mathsf T+sy^\mathsf TB}{s^\mathsf Ty}, | |
| \label{ctrl:bfgs} | |
| \end{equation} | |
| when the recorded positive-curvature and finite-value guards permit the update. An additional standalone SciPy BFGS comparator is independently tuned; its implementation is not assumed numerically identical to this runtime. | |
| The controller receives sixteen features constructed from observed losses, gradients, dimension, iteration, inverse-scale summaries, previous secant angles, step length, rejection flags, and parameter norm. It receives no task-family label, hidden target, generating matrix, or exact Hessian. Numerical state is initialized afresh for every independent task in every condition. What transfers is the learned executable policy. | |
| A second learned policy chooses which visited training states receive expensive counterfactual action labels. It predicts a decision-regret surrogate from those features and the action ensemble's predictions. Its output changes future acquisition decisions. The fitting procedure, action library, numerical safeguards, and evaluation code remain fixed. Thus the experiment changes both executable solver behavior and a learned acquisition policy, without rewriting its own training scaffold. | |
| \subsection{Counterfactual targets and the actual learning loop} | |
| \label{ctrl:learning} | |
| At each selected state $s$, all five actions are evaluated in separate numerical branches. After the forced first action, a branch follows the pre-generation controller for a total of at most twelve new paired value-gradient calls. Previously acquired state information is inherited without charging it twice; every new branch query is charged. Define | |
| \begin{equation} | |
| V_a(s)=\log_{10}\max\left\{ | |
| \frac{\text{best objective available after branch }a}{f(x_1)},10^{-12}\right\}, | |
| \qquad \Delta_a(s)=V_a(s)-V_0(s), | |
| \label{ctrl:targets} | |
| \end{equation} | |
| where action zero is BFGS. The action learner fits these contrasts rather than the common absolute response level. | |
| \begin{proposition}[Reference subtraction preserves the conditional action ordering] | |
| \label{ctrl:centering} | |
| For integrable branch responses conditional on a state, subtracting the same reference response from every action preserves the conditional expected minimizers: | |
| \[ | |
| \argmin_a\E[V_a-V_0\mid s]=\argmin_a\E[V_a\mid s]. | |
| \] | |
| \end{proposition} | |
| \begin{proof} | |
| Conditional expectation is linear. The term $\E[V_0\mid s]$ does not depend on $a$, so subtracting it changes none of the pairwise orderings. | |
| \end{proof} | |
| This identity supplies no finite-sample guarantee for the fitted trees. Five bootstrapped depth-four regression trees, each with at least eight examples per leaf, estimate the contrasts. A non-BFGS action is selected only when its predicted advantage exceeds $0.02$ plus half the ensemble standard deviation of its contrast with BFGS. This threshold is a prespecified regularizer, not a calibrated confidence certificate. | |
| The acquisition target is the observed finite-horizon regret | |
| \begin{equation} | |
| R(s)=V_{\pi(s)}(s)-\min_a V_a(s)\ge0. | |
| \label{ctrl:regret} | |
| \end{equation} | |
| A depth-three tree predicts $R$ for available states. After the initial random-label generation, acquisition uses that prediction with probability $0.8$ and samples randomly otherwise. It is trained only on previously acquired labels. This target estimates a current decision error; it is not the measured improvement in generalization caused by obtaining a label. All acquired labels accumulate, and both policies are refitted after each generation. | |
| Two acquisition controls use the identical action learner: random state selection and a fixed ensemble-disagreement rule. Under matched seeds their first-generation labels coincide; subsequent acquisition decisions and visited states may diverge. A same-label passive control independently refits the same learner from the active method's acquired data and fitting seed. It exactly reproduces the active policy. Its labels inherit the complete acquisition expenditure, rather than being counted as free information. | |
| \subsection{New nonlinear families and an untouched final split} | |
| \label{ctrl:tasks} | |
| Five meta-training seeds, 190101--190105, each produce six learned checkpoints plus the initial BFGS reference. Training and development contain twelve separately seeded instances apiece, in dimensions $8,16,32$. Their families are pseudo-Huber regression, squared-softplus residuals, a log-sum-exp quadratic objective, and squared-asinh regression. Pilots used only these source and development families. A training-only adjustment centered the regression targets; the full protocol was then declared before the complete search. | |
| Write $e=x-a$ and $u=Ae$, with hidden target $a$ and positive ridge coefficient $\lambda$. Final tasks comprise 24 instances of each of the following families, in dimensions $16,32,64$: | |
| \begin{align} | |
| f_{\rm C}(x)&=d^{-1}\sum_i\log(1+u_i^2)+\tfrac\lambda2\norm{e}^2,\label{ctrl:cauchy}\\ | |
| f_{\rm G}(x)&=d^{-1}\sum_i(1-e^{-u_i^2/2})+\tfrac\lambda2\norm{e}^2,\label{ctrl:gaussian}\\ | |
| f_{\rm M}(x)&=\operatorname{mean}\!\left[(Y(x)^\mathsf TY(x)-Y(a)^\mathsf TY(a))^{\odot2}\right] | |
| +\tfrac\lambda2\norm{e}^2.\label{ctrl:gram} | |
| \end{align} | |
| Here $Y(x)$ reshapes a shifted linear map into four rows. Matrices have random rotations, geometrically spaced singular values, random overall scales, and squared condition ratios between $10^{0.4}$ and $10^{2.5}$. Target norms lie in $[0.8,2.5]$. The source code records all distributions and derivatives. These are fresh generators; no v2 final generator or task is reused. | |
| \begin{proposition}[Known evaluation minimum] | |
| \label{ctrl:minima} | |
| Each final objective has unique global minimizer $x=a$ and minimum zero. | |
| \end{proposition} | |
| \begin{proof} | |
| Every displayed non-ridge term is nonnegative and vanishes at $a$. The ridge term also vanishes there and is strictly positive at every other point because $\lambda>0$. | |
| \end{proof} | |
| The generating targets supply an evaluation reference, not optimizer inputs. The functions can still be nonconvex away from their global minima. Final-family generation began only after all fifty condition--seed programs and ninety learned generation checkpoints were frozen. Development fitness selected the program, with earliest-generation tie breaking and the initial controller eligible. All frozen generations were later evaluated; their final outcomes never selected a successor. | |
| \subsection{Matched query caps and stronger classical alternatives} | |
| \label{ctrl:budgets} | |
| The per-method, per-seed source cap is | |
| \begin{equation} | |
| 6\left(12\cdot64+48\cdot5\cdot12\right)=21\,888 | |
| \label{ctrl:source-cap} | |
| \end{equation} | |
| paired value-gradient calls. The first term pays for visited-state collection; the second pays for at most 48 labels, five alternatives, and twelve new calls per branch. Early termination is charged at actual cost. Value and gradient requests at the same line-search trial can reuse the same already-paid pair. | |
| Independently tuned SciPy BFGS, L-BFGS-B, nonmonotone spectral gradient, and trust-region SR1 receive this same source cap. Saved convergence calls may fund additional parameter configurations. A complete candidate starts only when its worst-case evaluation cost remains. All methods use the same development checkpoints, with development expenditure recorded separately. The strongest static portfolio selects among all four classical searches and is charged for all four. It selected L-BFGS-B in every meta seed. | |
| This matches oracle caps, not floating-point operations, memory use, or elapsed time. Dense inverse updates, Python tree inference, line searches, and stopping behavior differ. Local process CPU times are retained to make those differences visible. | |
| \subsection{Final results: modification did not establish improvement} | |
| \label{ctrl:results} | |
| Table~\ref{ctrl:main-table} summarizes 360 paired program--task cases per condition. The primary metric is the mean log objective ratio at 128 queries, floored at $-12$. Success means objective ratio at most $10^{-6}$. Restricted query time is the first successful query, or 129 for a failure at the 128-query cap. It therefore does not mistake early unsuccessful termination for success. | |
| \begin{table}[!ht] | |
| \centering\small | |
| \begin{tabular}{@{}lrrrr@{}} | |
| \toprule | |
| Condition & Mean log ratio & Success & Actual calls & Restricted time\\ | |
| \midrule | |
| Initial BFGS controller & $-11.92399$ & $100.00\%$ & $91.7917$ & $39.0000$\\ | |
| Learned acquisition & $-11.50745$ & $96.67\%$ & $73.9306$ & $36.7444$\\ | |
| Random acquisition & $-11.71438$ & $98.06\%$ & $74.2417$ & $34.8944$\\ | |
| Fixed disagreement & $-11.36294$ & $94.17\%$ & $72.1750$ & $36.6278$\\ | |
| Tuned SciPy BFGS & $-12.00000$ & $100.00\%$ & $65.3944$ & $29.2333$\\ | |
| Tuned L-BFGS-B & $-11.96558$ & $100.00\%$ & $46.6833$ & $26.1250$\\ | |
| Tuned spectral gradient & $-10.07262$ & $81.67\%$ & $90.7694$ & $49.7639$\\ | |
| Tuned trust-region SR1 & $-11.85266$ & $98.61\%$ & $62.2222$ & $36.9861$\\ | |
| \bottomrule | |
| \end{tabular} | |
| \caption{Untouched-family results. Lower losses and query times are better. Same-label passive matches learned acquisition exactly; the development-selected classical portfolio matches L-BFGS-B. The reporting floor does not distinguish smaller final ratios.} | |
| \label{ctrl:main-table} | |
| \end{table} | |
| The learned-minus-random primary difference is $+0.20693$, with hierarchical $95\%$ interval $[-0.21526,+0.71192]$. Learned acquisition has no established advantage. Against tuned BFGS the difference is $+0.49255$, with interval $[+0.18382,+0.90525]$, favoring BFGS. Against the initial controller it is $+0.41654$, with interval $[+0.11117,+0.82410]$. The bootstrap resamples meta seeds and paired instances within each fixed family. Five meta seeds cannot establish universal optimizer rankings. | |
| The learned policy succeeds on all Cauchy cases, $92.5\%$ of Gaussian-saturation cases, and $97.5\%$ of matrix-Gram cases. Its observed mean process CPU time is $14.54$ ms per final task, versus $7.01$ ms for tuned BFGS and $3.72$ ms for L-BFGS-B. These are local microbenchmarks. The reduction in restricted time relative to the initial controller accompanies reduced success and worse final accuracy, so it is not an equal-quality speedup. The strong tuned controls are both faster in queries and more successful; no deployment amortization against them is demonstrated. | |
| \begin{figure}[!ht] | |
| \centering | |
| \includegraphics[width=0.98\textwidth]{../v3/controller/results/figures/01_controller_evolution_and_transfer.pdf} | |
| \caption{Development learning and untouched-family transfer. Shading is the minimum-to-maximum range over five meta seeds, not a confidence interval. Later executable changes can improve development scores without improving final performance over the initial or tuned BFGS controls.} | |
| \label{ctrl:figure-evolution} | |
| \end{figure} | |
| \begin{figure}[!ht] | |
| \centering | |
| \includegraphics[width=0.98\textwidth]{../v3/controller/results/figures/02_unseen_nonlinear_query_curves.pdf} | |
| \caption{Best-observed objective curves for the three new nonlinear families. The initial controller can be slower early yet stronger at the final cap. Classical controls retain their advantage when all methods receive the same paired-oracle interface.} | |
| \label{ctrl:figure-families} | |
| \end{figure} | |
| All fifteen acquisition-method runs change executable branch structure or feature choices at every learned generation, even when nonexecuting metadata are excluded from the comparison. Selected learned-acquisition controllers attempt BFGS line search $61.84\%$ of the time, BB trials $12.33\%$, preconditioned trials $13.99\%$, curvature probes $1.11\%$, and reset-plus-BFGS steps $10.74\%$. The program changes are real. Their final performance is not monotone across generations and does not surpass the original controller. | |
| \subsection{Exact replay and complete expenditure} | |
| \label{ctrl:replay} | |
| The post-freeze audit exactly replays all 90 learned generations, 4,320 acquired labels, and 21,600 counterfactual branches. Source and development trajectories, acquisition decisions, controller refits, and learned-selector refits all reproduce. Exported Python matches the numerical interpreter in 28,800 individual tree-vector comparisons, 5,760 action decisions, and 1,840 selector-score comparisons. Twenty-one finite-difference gradient checks have maximum normalized discrepancy $6.99\times10^{-10}$. These checks establish numerical reproducibility, not a directed-rounding proof of machine arithmetic. | |
| \begin{table}[!ht] | |
| \centering\small | |
| \begin{tabular}{@{}lr@{}} | |
| \toprule | |
| Executed stage & Paired value-gradient calls\\ | |
| \midrule | |
| Full source search & $736\,732$\\ | |
| Development selection & $204\,523$\\ | |
| Selected-policy final evaluation & $251\,216$\\ | |
| All frozen generations on final tasks & $507\,388$\\ | |
| Independent source, label, and development replay & $407\,280$\\ | |
| Independent gradient checks & $1\,162$\\ | |
| Earlier source/development pilots and checks & $26\,245$\\ | |
| \midrule | |
| Total original experiment and verification & $2\,134\,546$\\ | |
| \bottomrule | |
| \end{tabular} | |
| \caption{Actual calls, including counterfactual learning, failed comparative hypotheses, and verification. Dense arithmetic, fitting, and program interpretation impose additional costs.} | |
| \label{ctrl:cost-table} | |
| \end{table} | |