A New $N = 4$ Superconformal Algebra
- 格式:pdf
- 大小:84.13 KB
- 文档页数:10
混沌映射优化算法代码一、混沌映射算法简介混沌映射算法是一种基于混沌理论的随机优化算法,其基本思想是通过混沌系统的非线性特性,将搜索空间中的每个解点映射到一个新的解点,从而实现全局搜索。
混沌映射算法具有较强的全局搜索能力和快速收敛速度,在实际应用中得到了广泛的应用。
二、混沌映射优化算法代码实现以下是使用Python语言编写的混沌映射优化算法代码实现:```pythonimport randomimport math# 定义Lorenz函数def lorenz(x, y, z, s=10, r=28, b=2.667):dx = s * (y - x)dy = x * (r - z) - ydz = x * y - b * zreturn dx, dy, dz# 定义Chen函数def chen(x, y, z, a=35.0, b=3.0):dx = a * (y - x)dy = x * (b - z) - ydz = x * y - 2.5 * zreturn dx, dy, dz# 定义Rossler函数def rossler(x, y, z, a=0.2, b=0.2, c=5.7):dx = -(y + z)dy = x + a * ydz = b + z * (x - c)return dx, dy, dz# 定义混沌映射函数def chaos_map(x0, y0, z0, func, n=100):x_list = [x0]y_list = [y0]z_list = [z0]for i in range(n):dx, dy, dz = func(x_list[-1], y_list[-1], z_list[-1])x_next = x_list[-1] + 0.01 * dxy_next = y_list[-1] + 0.01 * dyz_next = z_list[-1] + 0.01 * dzx_list.append(x_next)y_list.append(y_next)z_list.append(z_next)return x_list[-1]# 定义混沌映射优化算法函数def chaos_optimize(func, dim=2, max_iter=1000):# 初始化参数a = 10 ** 8b = 10 ** (-8)c1 = 2.05c2 = 2.05w_max = 0.9w_min = 0.4# 初始化粒子群和速度矩阵swarm_size = dim * 20swarm_pos = [[random.uniform(-10, 10) for j in range(dim)] for i in range(swarm_size)]v_max = (10 - (-10)) / 2swarm_velo = [[random.uniform(-v_max, v_max) for j in range(dim)] for i in range(swarm_size)]swarm_best_pos = [swarm_pos[i] for i in range(swarm_size)] swarm_best_fit = [chaos_map(*swarm_pos[i], func) for i in range(swarm_size)]global_best_pos = swarm_best_pos[0]global_best_fit = chaos_map(*global_best_pos, func)# 开始迭代for t in range(max_iter):w = w_max - (w_max - w_min) * t / max_iterfor i in range(swarm_size):# 更新速度和位置for j in range(dim):r1, r2 = random.uniform(0, 1), random.uniform(0, 1) swarm_velo[i][j] = w * swarm_velo[i][j] + c1 * r1 * (swarm_best_pos[i][j] - swarm_pos[i][j]) + c2 * r2 *(global_best_pos[j] - swarm_pos[i][j])if swarm_velo[i][j] > v_max:swarm_velo[i][j] = v_maxelif swarm_velo[i][j] < -v_max:swarm_velo[i][j] = -v_maxswarm_pos[i][j] += swarm_velo[i][j]# 限制粒子位置范围,避免越界for j in range(dim):if swarm_pos[i][j] > 10:swarm_pos[i][j] = 10elif swarm_pos[i][j] < -10:swarm_pos[i][j] = -10# 计算适应度值,更新最优解和全局最优解 fit = chaos_map(*swarm_pos[i], func) if fit < swarm_best_fit[i]:swarm_best_pos[i] = swarm_pos[i] swarm_best_fit[i] = fitif fit < global_best_fit:global_best_pos = swarm_pos[i]global_best_fit = fitreturn global_best_pos, global_best_fit```三、代码解析1. Lorenz函数、Chen函数和Rossler函数Lorenz函数、Chen函数和Rossler函数是三个经典的混沌系统,它们都具有非线性特性和随机性质。
idl reform函数**`IDL reform 函数`**IDL(Interactive Data Language)是一种用于科学数据处理和可视化的编程语言,其中的`reform`函数提供了一种方便的方法来重新排列数组的维度。
`reform`函数允许用户在不改变数组元素相对顺序的情况下改变数组的维度排列。
## 语法`reform`函数的基本语法如下:```idlresult = REFORM(array, dim1_size, dim2_size, ..., dimN_size)```其中,- `array`:需要重新排列的输入数组。
- `dim1_size, dim2_size, ..., dimN_size`:各维度的大小参数,用于指定重新排列后的数组的维度。
## 示例为了更好地理解`reform`函数的用法和功能,下面将给出一些示例:**示例1**:```idla = [1, 2, 3, 4, 5, 6]b = reform(a, 2, 3)```输出:```b = [[1, 2, 3], [4, 5, 6]]```在这个示例中,输入数组`a`是一个包含6个元素的一维数组。
通过使用`reform`函数将其重新排列为一个2行3列的二维数组`b`。
**示例2**:```idlc = [[1, 2], [3, 4], [5, 6]]d = reform(c, 1, 6)```输出:```d = [1, 2, 3, 4, 5, 6]```在这个示例中,输入数组`c`是一个3行2列的二维数组。
`reform`函数将其重新排列为一个包含6个元素的一维数组`d`。
**示例3**:```idle = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]f = reform(e, 8)```输出:```f = [1, 2, 3, 4, 5, 6, 7, 8]```在这个示例中,输入数组`e`是一个包含2个2行2列的二维数组的三维数组。
as integer函数-回复什么是“as integer”函数在计算机编程的世界中,“as integer”函数是一种用于将其他数据类型转换为整数类型的操作。
它可以将浮点数、布尔值、字符等不同类型的数据转换为整数,以便在程序中进行进一步的处理和计算。
作为一种类型转换函数,"as integer" 通常用于对数据进行格式化、验证或精确度要求的处理。
它可以将小数取整、布尔值转为0或1、字符转换为对应的ASCII码,这些都是在编程中常见的需求。
使用"as integer" 的语法形式通常为:some_variable = some_value as Integer其中,some_variable 是待赋值的整型变量,some_value 是需要转换的数据。
例如,我们假设有以下代码段:Dim age as Float = 27.5Dim ageInteger as IntegerageInteger = age as Integer在这个例子中,我们将一个浮点数类型的变量"age" 转换为整数类型,并将结果赋值给"ageInteger"。
因为浮点数27.5 会被转换为整数27,所以"ageInteger" 的值将为27。
"as integer" 函数的一般规则:1. 对于浮点数,"as integer" 会将其小数部分去掉,只保留整数部分。
例如:27.5 as Integer 的结果为27。
2. 对于布尔值,"as integer" 会将True 转换为1,False 转换为0。
例如:True as Integer 的结果为1。
3. 对于字符,"as integer" 会将其转换为对应的ASCII码。
例如:"A" as Integer 的结果为65。
这个函数的基本形式为x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,nonlcon,opti*****)其中fun为你要求最小值的函数,可以单写一个文件设置函数,如以上给的例子中。
1.如果fun中有N个变量,如x y z, 或者是X1, X2,X3, 什么的,自己排个顺序,在fun中统一都是用x(1),x(2)....x(n) 表示的。
2. x0, 表示初始的猜测值,大小要与变量数目相同3. A b 为线性不等约束,A*x <= b,A应为n*n阶矩阵,学过线性代数应不难写出A和b4 Aeq beq为线性相等约束,Aeq*x = beq。
Aeq beq同上可求5 lb ub为变量的上下边界,正负无穷用-Inf和Inf表示,lb ub应为N阶数组6 nonlcon 为非线性约束,可分为两部分,非线性不等约束c,非线性相等约束,ceq可按下面的例子设置function [c,ce] = nonlcon1(x)c = -x(1)+x(2)^2-4;ce = []; % no nonlinear equality c*****traints7,最后是opti*****,可以用OPTIMSET函数设置,见例子具体可见OPTIMSET函数的帮助文件。
ps: 以上x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,nonlcon,opti*****)括号中的参数,需从左到右依次给出,可只给部分。
如可写为x = fmincon(fun,x0,A,b)x = fmincon(fun,x0,A,b,Aeq,beq) x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub)如中间某些约束为空,可以用[]表示,如可写为x = fmincon(fun,x0,A,b,[],[],lb,ub)例子:解答:建立一个文件fun1.m 包含要求最小值的函数:function y = fun1(x)y = x(1)-0.25*x(2)+0.6;再建立一个非线性不等约束的函数nonlcon1.mfunction [c,ce] = nonlcon1(x)c = 0.038-x(2)/x(1);ce = []; % no nonlinear equality c*****traints再建立一个文件testfmincon.m :clc;x0 = [0 0]; % starting pointA = [0.038 -1]; b = 0; % matrix and rhs vector for linear inequality c*****traintopti***** = optimset('Display','iter'); % show progress after each iterationx = fmincon('fun1',x0,[],[],[],[],[-Inf; 1],[1.8; Inf],'nonlcon1',opti*****)运行结果是x1 =0 x2= 1.0001要求解的函数,直接观察可得它的最小值应该取在X1= 0 附近的微小区域,X2=1但约束条件2限制X1不能为零,所以此题无解,或者认为是x1 =0 x2= 1.0。
as factor函数
Factor函数是一种用于将整数进行分解的数学函数。
它接受一个整数作为参数,并返回一个包含该整数的所有因子的列表。
因子是能够整除一个给定整数的所有正整数。
例如,对于整数12,其因子是1、2、3、4、6和12,因此Factor函数将返回一个包含这些因子的列表[1, 2, 3, 4, 6, 12]。
在编程语言中,Factor函数可以根据具体的语法和函数定义方式来实现。
以下是一个Python语言中Factor函数的例子:
```python
def factor(n):
factors = []
for i in range(1, n+1):
if n % i == 0:
factors.append(i)
return factors
print(factor(12)) # 输出 [1, 2, 3, 4, 6, 12]
```
上述例子中,Factor函数遍历从1到给定整数n的所有数字,通过判断如果n与当前数字i取余为0,则将i添加到factors 列表中。
最后,函数返回该列表作为结果。
需要注意的是,对于较大的整数,Factor函数的执行时间可能会比较长,需要根据具体的需求和场景进行优化。
常熟理工学院学报(自然科学)Journal of Changshu Institute Technology (Natural Sciences )第26卷第10Vol.26No.102012年10月Oct.,2012Spectrum-generating 超代数的一类子代数的研究郭娜1,刘东2,高寿兰2(1.杭州电子科技大学理学院,浙江杭州310000;2.湖州师范学院理学院,浙江湖州313000)摘要:研究spectrum-generating 超代数的一类子代数,确定了这类子代数的低阶上同调群以及自同构群.这类子代数对于讨论N=2-超共形代数上Harish-Chandea 模的分类很有意义.关键词:李超代数;导子代数;中心扩张;自同构中图分类号:O152.5文献标识码:A文章编号:1008-2794(2012)10-0027-051引言超共形代数与共形场论和弦理论紧密联系,在数学与物理学有重要作用.N=2-超共形代数[1]是复维数-D 的Calabi-Yau 流形上的弦紧致分析的基本工具[2].它的表示理论和Kac-Roan-Wakimoto 猜想有关[3].为了对N=2-超共形代数上的Harish-Chandra 模进行分类,我们需要研究下面的李超代数,它是Spectrum-gen⁃erating 超代数的一个子代数[4].定义李超代数Α作为C 上的向量空间的基为ìíî}L n ,G n +12|n ∈Ζ,并且满足下面的等式关系:[]L m ,L n =(n -m )L m +n[]L m ,G k =(k +12m )G m +k []G k ,G l =0∀m ,n ∈Ζ且k ,l ∈Ζ+12.本文重点讨论李超代数Α的结构理论,包括它的导子代数、二上同调群、自同构群等.我们分别用C ,Q 和Z 来定义复数集、有理数集和整数集.对于任意集合S ,定义它的非零元素集合为S ∗.2泛中心扩张首先我们回顾李超代数L 上的二上循环,它是C -双线性函数:ψ:L ×L →C 并且满足下面的关系式:ψ(v 1,v 2)=-(-1)||v 1||v 2ψ(v 2,v 1)(2.1)收稿日期:2012-08-21基金项目:国家自然科学基金项目“Virasoro 代数及相关代数的结构与表示理论”(11071068);国家自然科学基金项目“共型流李代数的结构和表示”(11201141);浙江省自然科学基金项目“Virasoro 型李代数与顶点算子代数的研究”(Y6100148);浙江省自然科学基金项目“无限维李代数与顶点算子(超)代数的结构域表示”(LQ12A01005)作者简介:郭娜(1986—),女,河南南阳人,杭州电子科技大学2010级研究生,研究方向:李代数.常熟理工学院学报(自然科学)2012年ψ(v 1,[v 2,v 3])=ψ([v 1,v 2],v 3)+(-1)||v 1||v 2ψ(v 2,[v 1,v 3])(2.2)对任意的v 1,v 2,v 3∈L ,定义L 上的二上循环的向量空间为C 2(L ,C ).对任意的C -线性函数f :L →C ,定义二上循环ψf 如下:对任意的v 1,v 2∈L ,ψf (v 1,v 2)=f ([v 1,v 2]).这样的二上循环我们称为L 上的二上边界或者平凡二上循环.定义L 的二上边界的向量空间为B 2(L ,C ).如果ϕ-ψ是平凡的,那么我们称二上循环ϕ与二上循环ψ是等价的.对于一个二上循环ψ,定义它的等价类为[ψ].商空间H 2(L ,C )=C 2(L ,C )/B 2(L ,C )={二上循环的等价类},被称为L 的二阶上同调群.众所周知,Virasoro 循环的二上循环由下式确定:ξVir (L m ,L n )=m 3-m 12δm ,-n .定理1dim H 2(Α,C )=2,其中关于Α的常见的不平凡二上循环如下:ψ1(L m ,L n )=ξVir (L m ,L n )ψ2(G k ,G l )=δk +l ,0∀k ,l ∈Z +12,其他相互作用项为零.证明根据李超代数运算的作用我们容易得到等式G r =1r[L 0,G r ].定义C 上的线性函数f :Α→C 如下:f (G r )=1r ψ(L 0,G r ),r ∈Z +12.令ϕ=ψ-ψf -ξVir ,其中ψf 满足ψf (v 1,v 2)=f ([v 1,v 2]).那么我们得到ϕ(L m ,L n )=0对任意的m ,n ∈Z 成立.定理1可由下面的引理1-3得到.引理1对任意的r ∈Z +12,ϕ(L 0,G r )=0.证明ϕ(L 0,G r )=ψ(L 0,G r )-ψf (L 0,G r )=rf (G r )-f ([L 0,G r ])=rf (G r )-f (rG r )=0.引理2对任意的m ∈Z ,r ∈Z +12,ϕ(L m ,G r )=0(2.3)证明对任意的m ∈Z ,r ∈Z +12,我们将Jacobian 等式作用在(L m ,L i ,G r -i ),就得到ϕ(L m ,[L i ,G r -i ])=ϕ([L m ,L i ],G r -i )+(-1)0ϕ(L i ,[L m ,G r -i ]),(r -i 2)ϕ(L m ,G r )=(i -m )ϕ(L m +i ,G r -i )+(r -i +m 2)ϕ(L i ,G r +m -i ).令i =0,即r ϕ(L m ,G r )=-m ϕ(L m ,G r )+(r +m 2)ϕ(L 0,G r +m ).由于ϕ(L 0,G r +m )=0,那么(r +m )ϕ(L m ,G r )=0.因为r +m ≠0,所以ϕ(L m ,G r )=0.引理3对任意的r ,s ∈Z +12,ϕ(G r ,G s )=δr +s ϕ(G -12,G 12).证明对任意的m ∈Z ,t ,k ∈Z +12,我们将Jacobian 等式作用在(L m ,G t ,G k )得到:ϕ(L m ,[G t ,G k ])=ϕ([L m ,G t ],G k )+(-1)0ϕ(G t ,[L m ,G k ]),0=(t +m 2)ϕ(G m +t ,G k )+(k +m 2)ϕ(G t ,G m +k ).令m =-2t ,就得到如果t +k ≠0,ϕ(G t ,G k )=0.2810郭娜,刘东,高寿兰:Spectrum-generating 超代数的一类子代数的研究令t =-(k +m ),0=(-k -m 2)ϕ(G -k ,G k )+(k +m 2)ϕ(G -m -k ,G m +k ).也就是说ϕ(G -k ,G k )=ϕ(G -12,G 12).定义Α的泛中心扩张为Α̂.那么从定理1,我们可以得到Α̂=C {L n ,G n +12,C ,C ′|n ∈Z },并且满足下面的关系:[]L m ,L n =(n -m )L m +n +m 3-m 12δm ,-nC(2.4)[]L m ,G k =(k +12m )G m +k (2.5)[]G k ,G l =δk +l ,0C ′(2.6)[Α̂,C ]=[Α̂,C ′]=0(2.7)对任意的m ,n ∈Z 且k ,l ∈Z +12成立.3算子L m ,G k 的构造本节中,当C =C ′=1时,我们利用一些算子去构建上述李超代数Α̂.我们利用Fermionic 振子ψn ,并且它满足反交换关系[ψm ,ψn ]+=ψm ψn +ψn ψm =δm ,-n (m ,n ∈Z +12).上述代数可以由下面的向量空间表示:V 12=Λ{ψi |||i ≥0,i ∈Z +12},其中符号Λ表示由ψi 生成的外代数.令L k (k ∈Z )是V δ中的算子,定义:L k =δk ,01-2δ16+12∑j j :ψ-j ψj +k :其中j 跑遍δ+Z 并且正常序列定义为üýþïï:ψj ψk :=ψj ψk ,如果k ≥j =-ψk ψj ,如果k <j 那么:[]ψm ,L k =(m +12k )G m +k,[]L m ,L n =(m -n )L m +n +m 3-m 24δm ,-n .所以为了构建这个代数,我们仅需要将ψk 替换为G k ,那么关系式(2.4)-(2.7)成立.4李超代数Α的导子显然Α是一个Z 分次李超代数:Α=⊕Αn ,其中Αn =span C {L n },并且Αn +12=span C {L n +12}.令V 是一个Α-模.从Α到V 的线性映射ϕ叫做导子,如果对任意的x ,y ∈Α,我们有ϕ[x ,y ]=x ϕ(y )-y ϕ(x ).当v ∈V ,映射φ:x →x ⋅v 叫做内导子.所有导子的向量空间定义为Der(Α,V ).所有内导子的向量空间定义为Inn(Α,V ).那么在V 中的Α的一阶上同调群和它们的系数关系为29常熟理工学院学报(自然科学)2012年H 1(Α,V )=Der C (Α,V )/Inn C (Α,V ).等式右边同时也叫做外导子空间.首先我们介绍Α的外导子δ:δ(L n )=0,δ(G n +12)=G n +12,∀n ∈Z .引理4Der(Α,V )=Der(Α,V )0+Inn(Α,V ),其中Der(Α,V )0={D ∈Der(Α,V )|D (L n )⊆V n ,对任意的n ∈Z }.证明从文献[5]很容易得到(证明略).引理5当C 0∈C ,∀r ∈Z +12,D (G r )=C 0G r .证明令D ∈Der(Α,V )0,正如我们知道的H 1(Vir ,Vir )=0[6],所以我们可假设D (L n )=0.对任意的r ∈Z +12,令D (G r )=C r G r ,其中C r ∈C .将D 作用到[L 1,G r ]=(r +12)G r +1,我们有[D (L 1),G r ]+(-1)0[L 1,D (G r )]=(r +12)D (G r +1),那么(r +12)C r G r +1=(r +12)C r +1G r +1.比较G r +1的系数,我们有C r =C r +1.对r 进行归纳得到,对任意的r ∈Z +12,C r =C 0成立.因此,我们得到结论D (G r )=C 0G r .从引理4和引理5,我们可以得到下面的结论.定理2dim H 1(Α,Α)=1.5自同构群定义AutΑ为自同构群.我们知道,对任意的σ∈AutΑ,σ(L i ˉ)=L i ˉ,i ˉ∈Z 2.定理3令σ∈AutΑ,则存在a ,b ∈C ∗和ε∈{±1}满足σ(L 0)=εL 0(5.1)σ(L n )=εa n L n ,[∀n ∈N ∗(5.2)σ(G r )=a r bG εr(5.3)反之,如果σ是Α上的一个线性函数满足(5.1)-(5.3),ε∈{±1}和a ,b ∈C ∗,那么σ∈AutΑ.证明由于L 0ˉ=Vir 以及σ(L 0ˉ)=L 0ˉ,所以自同构映射σ作用在L n 上是清楚的.也就是说,σ(L 0)=εL 0,σ(L n )=εa n L n .我们只需考虑自同构σ作用在G r (r ∈Z +12)上的关系.假设σ(G r )=∑k =r1r 2u k G k ,其中u k ∈C ∗,r 1,r 2∈Z +12.将σ作用在[L 0,G r ]=rG r 上,我们有[εL 0,∑ku k G k ]=r ∑ku k G k .εk ∑ku k G k =r ∑ku k G k .比较G k 的系数,得到εk =r .因此,σ(G r )=u r G εr(5.4)将σ作用在[L 1,G r ]=(r +12)G r +1,我们有3010郭娜,刘东,高寿兰:Spectrum-generating超代数的一类子代数的研究[εaLε,urGrε]=(r+12)ur+1G(r+1)ε.εura2rG(r+1)ε(r+12)ε=(r+12)u r+1G(r+1)ε.比较G(r+1)ε的系数,则au r=u r+1.所以假设ur=a r b(5.5)对一些a,b∈C∗,利用(5.4),那么σ(G r)=a r bGεr,对所有的r∈Z+12成立.定理的另一半证明是显然的.定义Α的自同构为σ(ε,a,b)满足(5.1)-(5.3),那么σ(ε1,a1,b1)σ(ε2,a2,b2)=σ(ε1ε2,a1ε2a2,b1b2)和σ(ε,a,b)-1=σ(ε,a-ε,b-1),当且仅当ε1=ε2,a1=a2,b1=b2.通过上面的讨论,我们很容易得到下面的定理:定理4AutΑ=Z2∝(C∗×C∗)参考文献:[1]Dobrev V K.Characters of the unitarizable highest weight modules over the N=2superconformal algebras[J].Phys Lett,1987,B(186):43-51.[2]Eguchi T,Hikami K.N=2superconformal algebra and the entropy of Calabi-Yau manifolds[J].Lett Math Phys,2010,92(3):269-297.[3]Arakawa T.Representation theory of superconformal algebras and the Kac-Roan-Wakimoto conjecture[J].Duke Math J,2005,130(3):435-478.[4]Ademollo M,Brink L,Adda A D,et al.Supersymmetric strings and colour confinement[J].Phys Lett,1976,B(62):105-110.[5]Farnsteiner R.Derivations and central extensions of finitely generated graded Lie algebra[J].J Algebra,1998,118:33-45.[6]Fuks D B.Cohomology of Infinite-Dimensional Lie Algebras[M].New York:Springer,1986:119-120.A Study of One Subalgebra of the Spectrum-generating SuperalgebraGUO Na1,LIU Dong2,GAO Shou-lan2(1.Depaprtment of Sciences and Mathematics,Hangzhou Dianzi University,Hangzhou310000,China;2.Department of Sciences andMathematics,Huzhou Teachers College,Huzhou313000,China)Abstract:One subalgebra of spectrum-generating superalgebra is studied in this paper.And low order cohomol⁃ogy group and the automorphism group of this algebra are also determined in the paper.This subalgebra is help⁃ful to classified Harish-Chandea modules over the N=2superconformal algebra.Key words:Lie superalgebra;derivation algebra;central extensions;automorphism31。
『论⽂笔记』SuperGlue特征处理部分⽐较好理解,点的self、cross注意⼒机制实现建议看下源码(MultiHeadedAttention),def attention(query, key, value):dim = query.shape[1]scores = torch.einsum('bdhn,bdhm->bhnm', query, key) / dim**.5prob = torch.nn.functional.softmax(scores, dim=-1)return torch.einsum('bhnm,bdhm->bdhn', prob, value), probclass MultiHeadedAttention(nn.Module):""" Multi-head attention to increase model expressivitiy """def__init__(self, num_heads: int, d_model: int):super().__init__()assert d_model % num_heads == 0self.dim = d_model // num_headsself.num_heads = num_headsself.merge = nn.Conv1d(d_model, d_model, kernel_size=1)self.proj = nn.ModuleList([deepcopy(self.merge) for _ in range(3)])def forward(self, query, key, value):batch_dim = query.size(0)query, key, value = [l(x).view(batch_dim, self.dim, self.num_heads, -1)for l, x in zip(self.proj, (query, key, value))]x, prob = attention(query, key, value)self.prob.append(prob)return self.merge(x.contiguous().view(batch_dim, self.dim*self.num_heads, -1))这⾥直接跳到最后的逻辑部分,这部分论⽂写的⽐较粗略,需要看下源码才知道在讲啥(也许有⼤佬不⽤看)。
a rXiv:h ep-th/9311v14J an1993A New N =4Superconformal Algebra Abbas Ali and Alok Kumar Institute of Physics,Bhubaneswar-751005,India.email:abbas,kumar@iopb.ernet.in Abstract It is shown that the previously known N =3and N =4super-conformal algebras can be contracted consistently by singular scaling of some of the generators.For the later case,by a contraction which depends on the central term,we obtain a new N =4superconformal algebra which contains an SU (2)×U (1)4Kac-Moody subalgebra and has nonzero central extension.IP/BBSR/92-90hep-th/9301010It has been known for long time that the contraction[1]of SU(2)Lie algebra by singular scaling of two of its generators gives rise to the algebra of E(2).Similar contractions exist for other groups and are known as In¨o n¨u -Wigner contractions.It should be emphasized that this contraction proce-dure is different from afinite scaling of generators which does not change the algebra.Due to this characteristic difference,there are strong restrictions on the choice of the generators that can be scaled singularly.In a recent paper[2],Majumdar generalized the contraction procedure to the Kac-Moody algebras by dividing the generators J a(a=1,···,D)into two sets,Jα(α=1,···,d)and J i,(i=d+1,···,D)where J i are scaled asJ i→1mδαβδm+n,0,(2)2[Jαm,J i n]=ifαij J j m+n,(3)[J i m,J j n]=0.(4)1It is therefore observed that for the the unscaled generators,Jα,the contrac-tion procedure allows a central term.But no such term is allowed for the scaled generators J i’s.In this paper,we analyze the effect of singular scalings of the type de-scribed above for N=3[3]and Sevrin et al’s N=4[4]superconformal algebras.The N=3algebra contains an SU(2)subalgebra.Wefind that when the SU(2)generators are scaled as in[2],the consistency of the full algebra requires the scaling of at least one of the three superconformal genera-tors.We present a consistent set of scaling and the corresponding contracted algebra.Contraction for the N=4algebra of ref.[4]is much more interesting.In this case wefind that the resulting algebra is a new N=4superconformal algebra with an underlying SU(2)×U(1)4Kac-Moody subalgebra-with all the central terms surviving.For this case,the scaling is different from the ones used in previous paragraphs,since it is dependent on an in-built parameter of the original algebra which determines the central terms.To illustrate our basic procedure and for algebraic simplicity,wefirst present the contraction of the N=3algebra and later on go to the more in-teresting case of N=4.We start by writing down the N=3superconformal algebra:c[L m,L n]=(m−n)L m+n+whereφn∈{G a r,J a n,Γr},corresponding dφ∈{32}and a∈{1,2,3}.{G a r,G b s}=iǫabc(r−s)J c r+s,(a=b),(7)[J a m,G a r]=mΓm+r,(no sum on a),(8)[J a m,Γr]=0,(9)c[J a m,J b n]=iǫabc J c m+n+(r2−13δr+s,0,(12)3{Γr,G a s}=J a r+s,(13)[J a m,G b r]=iǫabc G c m+r,(a=b).(14) For the contraction of this algebra the Kac-Moody generators J a are scaled in the same manner as in[2]with Jα≡J3,J i≡(J1,J2).As a result, the modified algebra for these generators becomes,c[J3m,J3n]=.Then eqns.(5)-(9)remainf(ǫ)3unchanged after scaling.The rest of the algebra,eqns.(11)-(14),is modified to the following form:{G3r,G3s}=0,(18){Γr,Γs}=0,(19) and{G i r,G i s}=2L r+s+c4)δr+s,0,(no sum on i),{Γr,G i s}=J i r+s,(i=1,2),{Γr,G3s}=0,[J i m,G3r]=0,[J i m,G j r]=iǫij G3m+r,[J3m,G i r]=iǫij G j m+r.(20)We have explicitly verified that after the above modifications,all the Jacobi identities are satisfied.Therefore the modified algebra(5)-(9),(15)-(20)is a consistent superconformal algebra.As in ref.[2]a difficulty in the physical interpretation of the above algebra is the presence of vanishing(anti-)commutators in eqns.(17),(18),(19).It causes problem for a freefield realization of the algebra and thus for an explicit construction of the Hilbert space of such theories.Moreover the vanishing anticommutator(18)implies that the operator G3can not be interpreted as the usual superconformal generator.Similar problems also occur if one tries to contract N=1and24superconformal algebras.We now discuss a contraction of the N=4algebra of ref.[4],where both of these problems can be avoided.To work out the contraction of the N=4algebra and to be self contained, we start by writing down the algebra in[4].This algebra has sixteen gen-erators,namely,L m,G a r,(a=1,...,4),A±i m(i=1,2,3),Q a r(a=1, (4)and1respectively.The and U m.Their conformal weights dφare2,32algebra is written as,c[L m,L n]=(m−n)L m+n+(m2−13δijδm+n,0,12γ5[A−i m,A−j n]=ǫijk A−k m+n−m c12γ(1−γ)δabδm+n,0, [U m,U n]=−mc2ǫijk;α±i j4=−α±i4j=±12δij;[α+i,α−j]=0.It is noticed that the central extension of the above algebra is parameterized by two parameters c andγ.This fact is crucial for our contraction,since the scaling function f(ǫ)for this case depends onγ.More precisely,we choose ǫ=1−γ>0,f(ǫ)=√f(ǫ).For γ>1one can chooseǫ=γ−1and obtain similar results.For our choice, a close observation shows that this is a consistent scaling for the algebra in eqns.(21)and(22).After this singular scaling one gets an algebra where the (anti-)commutators in eqns.(21)are left unchanged.The rest of the algebra, eqn.(22),is modified to6{G a m,G b n}=2δab L m+n+c4)δabδm+n,0+4(n−m)α+i ab A+i m+n,[A+i m,G a n]=α+i ab G b m+n,[A−i m,G a n]=2mα−i ab Q b m+n,[A+i m,A+j n]=ǫijk A+k m+n−m cδijδm+n,0,12{Q a m,G b n}=−2α−i ab A−i m+n+δab U m+n,[A−i m,Q a n]=0,{Q a m,Q b n}=−cδm+n,0.(23)12In this case also we have explicitly verified that the commutation relations in eqns.(21)and(23)satisfy all the Jacobi identities among these generators. Hence they form a consistent algebra.It is noticed that the generators A−i’s in the contracted algebra satisfy the commutation relations of affine U(1)generators since the structure con-stants for these have disappeared.This,in fact,is a general property of the contraction since it was already observed in eqns.(4)that the structure constants in the commutator of the scaled generators J i’s vanish.Another aspect of our contraction is that the central terms in all the(anti-)commu-tators of the original algebra,eqns.(21)-(22)survive and therefore one can7hope to obtain its freefield realization.We have thus obtained a new N=4superconformal algebra which is distinguished from the previously known N=4algebras of[3]and[4]by the undelying SU(2)×U(1)4Kac-Moody symmetry.It is also observed that the the contracted algebra,eqns.(21)and(23),contains,as a subalgebra,the Ademollo et al N=4algebra[3]which is satisfied by the generators,L m,G a, and A+i.Although the existence of Ademollo et al N=4subalgebra was also noticed in[4],however,for their case the choiceγ=1implied c=0 and the algebra became centerless.Here we have shown that an algebra with nonzero central extension can be obtained forγ→1by the singular scaling of eight of the generators A−i,Q a,and U.Finally,another contraction of the algebra in[4]can also be done by scaling A+i instead of A−i and taking the limitγ→0withǫ=γ.It will be interesting to obtain a freefield realization of the new N=4superconformal algebra presented in this paper.This is crucial for obtaining the Hilbert space and the unitary representations of this algebra.8References[1]E.In¨o n¨u and E.Wigner,Proc.Nat.Acad.Sci.(USA)39,510(1953);R.Gilmore,Lie Groups,Lie Algebras and Some of Their Applications, Wiley,New York(1974).[2]P.Majumdar,In¨o n¨u-Wigner contraction of Kac-Moody algebras,Matscience preprint,IMSc/92-26,1992.[3]M.Ademollo et al,Phys.Lett.B62,105(1976).[4]A.Sevrin,W.Troost,and A.Van Proeyen,Phys.Lett.B208,447(1988).9。