Operator与优化
Relation
关系这个词跟映射有点相似,对于一个关系
Operations on Relation
inverse
.composition
.scalar multiplication
.addition
.resolvent operator
.
通过以上的运算可以看出,relation有点类似于凸函数中epigraph的那种集合定义。
Monotone Operations
对于一个单调的relation
对于任意的
Case: Subgradient
![]()
Nonexpansive and contractive operator
对于一个
Characters:
![]()
Resolvent operation and Cayley operator
对于一个relation
同样当F是单调的时候,其cayley operator
Proof:
![]()
![]()
Case:
- Proximal
![]()
- Indicator
![]()
Fixed point of operators & zero set of
这里有个很重要的定理就是Cayley
和resolvent
的Fixed point等价于
Theorem: Banach fixed point theorem
当
是contraction,dom ,那么 会收敛到一个唯一的fixed point。
Damped iteration of a nonexpansive operator
相对于
Damped iteration为一个
Proof:
![]()
Case:
![]()
Operator Splitting
这里要解决的问题是一个relation
Theorem: 如果A和B是maximal monotone,那么
其中
Proof:
![]()
证明也是比较简单,使用定义就可以得到。
Peaceman-Rachford & Douglas-Rachfold Splitting
- Douglas-Rachfold updating

The last equation:
![]()
Case: Alternating direction method of multipliers
![]()
Case: Constrained optimization
![]()
- Peaceman-Rachford updating
Case: FedSplit, a consensus problem
对于loss函数
,以及consensus constrain,利用一阶方法求解最小值等价于 其中
为其consensus的normal corn。 ![]()
上图为其论文中的算法流程,这里的
operator为 , operator为 而且由于 在最后执行所以整个顺序都提前,并且算法中的第一步(a)直接整合了PR的中间两步。
Consensus Optimization


% Solves the QP
% mininimze (1/2)||Ax - b||_2^2
% subject to Fx <= g
% using D-R consensus. Note that the code has not been optimized for
% runtime and is only presened to give an idea of D-R consensu. For better
% performance, the inner loop should be run in parallel and should use a
% fast QP solver for small problems (e.g., CVXGEN).
%
% EE364b Convex Optimization II, S. Boyd
% Written by Eric Chu, 04/25/11
%
close all; clear all
randn('state', 0); rand('state', 0);
%%% Generate problem instance
m = 1000;
n = 100;
k = 50;
xtrue = randn(n,1);
A = randn(m,n);
b = A*xtrue + randn(m,1);
F = randn(k,n);
g = F*xtrue;
%%% Use CVX to find solution
cvx_begin
variable x(n)
minimize ((1/2)*sum_square(A*x - b))
subject to
F*x <= g
cvx_end
xcvx = x;
fstar = cvx_optval;
%%% Douglas-Rachford consensus splitting
N = 10; % number of subproblems
MAX_ITERS = 50;
rho = 200;
z = zeros(n,N);
xbar = zeros(n,1);
for j = 1:MAX_ITERS,
% x = prox_f(z), could be done in parallel
for i = 1:N,
Ai = A(m/N*(i-1) + 1:i*m/N,:);
bi = b(m/N*(i-1) + 1:i*m/N);
Fi = F(k/N*(i-1) + 1:i*k/N,:);
gi = g(k/N*(i-1) + 1:i*k/N);
% use CVX to solve prox operator
zi = z(:,i);
cvx_solver sdpt3
cvx_begin quiet
variable xi(n)
minimize ( (1/2)*sum_square(Ai*xi - bi) + (rho/2)*sum_square(xi - zi) )
subject to
Fi*xi <= gi
cvx_end
x(:,i) = xi;
end
%% standard
%z_midterm = 2*x-z;
%xbar_prev = xbar;
%xbar = mean(z_midterm,2);
%infeas(j) = sum(pos(F*xbar - g));
%f(j) = (1/2)*sum_square(A*xbar - b);
%z = z + (xbar*ones(1,N) - x);
%% Boyd
xbar_prev = xbar;
xbar = mean(x,2);
% record infeasibilities
infeas(j) = sum(pos(F*xbar - g));
% record objective value
f(j) = (1/2)*sum_square(A*xbar - b);
% update
z = z + (xbar*ones(1,N) - x) + (xbar - xbar_prev)*ones(1,N);
end
%%% Make plots
subplot(2,1,1)
semilogy(1:MAX_ITERS, infeas);
ylabel('infeas'); set(gca, 'FontSize', 18); axis([1 MAX_ITERS 10^-2 10^2])
subplot(2,1,2)
plot(1:MAX_ITERS, f, [1 MAX_ITERS], [fstar fstar], 'k--');
xlabel('k'); ylabel('f'); axis([1 MAX_ITERS 300 2000]); set(gca, 'FontSize', 18);
print -depsc dr_consensus_qp.eps

左边是我修改的,右边是Boyd的代码。看下来效果好像差不多,但是我还没搞懂他的代码为啥这样写。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· C#/.NET/.NET Core技术前沿周刊 | 第 29 期(2025年3.1-3.9)
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异