You could just throw this at a global NLP solver. For "small" instances they can prove global optimality. I tried the following using GAMS/Baron:
Set
i /i1*i25/
j /j1*j25/
;
parameter A(i,j), b(i);
A(i,j) = uniform(0,1);
b(i) = uniform(0,1);
variable p(j),z;
p.lo(j) = 0.001;
p.up(j) = 1;
equations obj,e;
obj.. z =e= sum(i,sqr(sum(j,A(i,j)*p(j))-b(i))) +
sum(j$(ord(j)<=card(j)-2), sqr(log(p(j))-2*log(p(j+1))+log(p(j+2))));
e.. sum(j,p(j)) =e= 1;
model m /all/;
option nlp=baron, threads=0;
solve m minimizing z using nlp;
This gives:
===========================================================================
BARON version 23.3.11. Built: WIN-64 Sat Mar 11 18:01:20 EST 2023
BARON is a product of The Optimization Firm.
For information on BARON, see https://minlp.com/about-baron
If you use this software, please cite publications from
https://minlp.com/baron-publications, such as:
Khajavirad, A. and N. V. Sahinidis,
A hybrid LP/NLP paradigm for global optimization relaxations,
Mathematical Programming Computation, 10, 383-421, 2018.
===========================================================================
This BARON run may utilize the following subsolver(s)
For LP/MIP/QP: CLP/CBC, ILOG CPLEX
For NLP: MINOS, SNOPT, External NLP, IPOPT, FILTERSQP
===========================================================================
Doing local search
Preprocessing found feasible solution with value 2.10908
Solving bounding LP
Starting multi-start local search
Done with local search
===========================================================================
Iteration Open nodes Time (s) Lower bound Upper bound
1 1 0.59 1.72152 2.10908
1526 83 29.75 2.00708 2.10908
4691 73 59.41 2.00708 2.10908
7903 74 89.16 2.00708 2.10908
10797 62 118.78 2.00708 2.10908
13761 51 148.61 2.00820 2.10908
16724 49 178.17 2.00820 2.10908
19677 41 207.70 2.00820 2.10908
22105 36 237.20 2.00820 2.10908
24746 26 267.09 2.00820 2.10908
27238 18 296.91 2.00820 2.10908
29698 17 326.59 2.04487 2.10908
31844 10 356.42 2.04487 2.10908
34535 14 386.00 2.05357 2.10908
37169 10 415.53 2.06959 2.10908
39835 5 445.19 2.07546 2.10908
42543 7 474.88 2.08354 2.10908
43439 0 484.69 2.10886 2.10908
Calculating duals
*** Normal completion ***
Wall clock time: 490.83
Total CPU time used: 484.69
Total no. of BaR iterations: 43439
Best solution found at node: -1
Max. no. of nodes in memory: 88
All done
===========================================================================
Solution = 2.10907512234556 best solution found during preprocessing
Best possible = 2.10886421617
Absolute gap = 0.00021090617555819 optca = 1E-9
Relative gap = 9.99993662262895E-5 optcr = 0.0001
Baron finds the global optimum during preprocessing but proving global optimality takes a bit of time. This could be a confirmation that the local optimum is indeed globally optimal. The penalty term seems rather small (for my random data) compared to the LS term.
Note: you can use https://neos-server.org/neos/ to solve this. This can also be useful to verify results found by your own algorithms. NEOS gives you access to different global NLP solvers (both under AMPL and GAMS).