论文解读

AI 辅助整理
方法
视觉原型语义建模结合证据引导文本调制,面向细粒度害虫识别。
发现
为害虫智能监测提供新思路,但效果尚待同行评议检验。
机会点
可将原型语义与文本调制结合用于小样本、长尾害虫识别,并验证田间部署效果。

论文摘要

预印本,未经同行评议。提出视觉原型害虫语义建模与证据引导文本调制方法,用于细粒度害虫识别;为害虫智能监测提供新思路,效果有待同行检验。

全文

arXiv

PestWeave: Linking Semantic Modeling and Evidence-Guided Text Modulation
through Visual Prototypes for Fine-Grained Pest Learning
Xueheng Li1,2, Yu Wang1,2, Yuxiang Shen 1,2, Wen Xue 4,
Rui Li1, Jie Zhang 1,3, Chengjun Xie 1,3†
1Institute of Intelligent Machines, Hefei Institutes of Physical Science, Chinese Academy of Sciences
2University of Science and Technology of China
3Zhongke Hefei Institute of Technology Innovation Engineering
4South China University of Technology
lixueheng@mail.ustc.edu.cn, {lirui,zhangjie,cjxie}@iim.ac.cn
Abstract
Agricultural pests threaten crop yield and quality, making
accurate pest recognition essential for targeted manage-
ment and sustainable agriculture. Their diverse appear-
ances complicate recognition and motivate multimodal ap-
proaches incorporating complementary species knowledge
from text. However, complex backgrounds can obscure dis-
criminative visual cues, while textual descriptions may con-
tain information unsupported by the current image, limiting
effective cross-modal fusion. To address these challenges,
we propose PestWeave, a multimodal framework connect-
ing content-adaptive visual organization with text fusion
through visual prototypes. Its visual pathway augments a
Receptance Weighted Key Value (RWKV) architecture with
semantic token grouping and three types of auxiliary tokens,
enabling content-adaptive scanning and contextual model-
ing while preserving spatial structure. Feature-similar to-
kens are reordered into adjacent scanning positions, while
cluster prototype, global, and register tokens provide group-
level summaries, global context, and additional interac-
tion capacity, respectively. These prototypes also guide
text modulation by assessing visual support for semantic
components and regulating their relative contributions and
overall fusion strength, reducing interference from unsup-
ported descriptions. Extensive experiments on multiple pest
recognition datasets demonstrate the effectiveness of Pest-
Weave and its potential for practical pest management.

  1. Introduction
    Accurate crop pest recognition is essential for targeted
    pest management and sustainable agriculture [1, 22, 27].
    However, substantial appearance variations within species
    †Corresponding author.
    (a) Fixed Spatial Scanning Vision RWKV
    (b) Adaptive Spatial Scanning QuadMamba / Freq-RWKV
    (c) Semantic Scanning PestWeave (Ours)
    1
    2
    3
    4
    5
    6
    7
    8
    9
    1
    2
    3
    4
    5
    6
    7
    8
    9
    H-scanning V-scanning
    H:
    V:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    1
    4
    7
    2
    5
    8
    3
    6
    9
    Related features may remain separated
    1
    2
    3
    4
    5
    6
    7
    8
    9
    Background leaf response
    Window-wise local scanning (schematic)
    1
    2
    4
    5
    3
    6
    7
    8
    9
    Window 1
    Spatial windows do not ensure feature similarity
    1
    2
    3
    4
    5
    6
    7
    8
    9
    Feature-similar regions become scan neighbors
    Similar pest features Other regions
    Window
    partition
    Window 2Window 3
    Pest image Saliency map
    Original order
    1 2 3 4 5 6 7 8 9
    Bidirectional scan
    Original spatial layout retained
    1 6 4 5 2 3 7 8 9
    Figure 1. (a) Fixed spatial scanning may separate visually similar
    regions. (b) Saliency-guided adaptive scanning is susceptible to
    interference from salient background regions. (c) Our semantic
    scanning brings feature-similar regions into neighboring sequence
    positions while preserving the original spatial layout.
    across developmental stages and viewpoints, subtle mor-
    phological differences between species, and complex field
    backgrounds make fine-grained pest recognition particu-
    larly challenging. To complement visual representations,
    recent multimodal approaches incorporate species-specific
    textual knowledge to facilitate the discrimination of visually
    similar pests [15, 16, 32]. Despite these advances, effec-
    1
    arXiv:2611.30796v1 [cs.CV] 23 Nov 2026

tive multimodal recognition faces two closely related chal-
lenges: extracting discriminative visual features from com-
plex scenes and determining whether the semantic knowl-
edge conveyed by text is supported by the current im-
age. Addressing both challenges is thus critical for reliable
fine-grained pest recognition, where species discrimination
depends on capturing subtle morphological characteristics
while reducing interference from textual semantics unsup-
ported by the current image.
Visual modeling requires capturing fine-grained mor-
phological details while maintaining global contextual
interactions and computational efficiency. Receptance
Weighted Key Value (RWKV) [3, 25] provides an efficient
mechanism for modeling long-range dependencies with lin-
ear complexity. However, conventional spatial scanning fol-
lows fixed horizontal or vertical orders without consider-
ing content similarity, leaving visually related regions po-
tentially distant in the scanning sequence [4]. As illus-
trated in Fig. 1, existing saliency-guided strategies [14, 15]
improve local feature granularity but rely on low-level re-
sponses that may also highlight texture-rich backgrounds
rather than discriminative pest structures. These limitations
motivate content-adaptive organization that strengthens in-
teractions among visually related regions. Meanwhile, lo-
cal cues such as markings and wing venation must be inter-
preted in the context of overall morphology, making group-
level aggregation alone insufficient. Effective visual mod-
eling should therefore integrate semantic relationships with
spatial structure and image-wide context while reducing in-
terference from irrelevant responses.
Textual descriptions provide complementary knowledge
about pest morphology and species characteristics, yet their
semantic content is not equally applicable to every image.
Variations in viewpoint, partial occlusion, and image qual-
ity may render certain described attributes unobservable,
while generic or background-related information can in-
troduce irrelevant semantics [10, 23]. Although vision–
language interaction enables adaptive feature fusion [13,
15], conventional cross-attention primarily models the rela-
tive importance of textual components and does not explic-
itly account for cases where the available visual evidence
provides limited support for the description as a whole.
Consequently, effective fusion requires not only identify-
ing applicable semantic components but also regulating how
strongly textual information modifies visual features at dif-
ferent spatial positions. This motivates an evidence-aware
mechanism that can distinguish visually supported seman-
tics from unsupported descriptions and adaptively control
their contributions to recognition.
To address these challenges, we propose PestWeave,
a multimodal framework that connects content-adaptive
visual modeling with evidence-guided text modulation
through shared visual prototypes. In the visual pathway, we
introduce an Locality-Sensitive Hashing (LSH)-initialized
[2] token grouping mechanism with spherical clustering re-
finement, which organizes feature-similar tokens into adja-
cent positions for semantic scanning. This content-adaptive
pathway complements conventional spatial scanning, with
semantic features restored to their original spatial positions
before residual fusion to preserve spatial structure. We fur-
ther incorporate cluster prototype, global, and learnable reg-
ister tokens into the semantic scan to enrich group-level in-
teractions and global contextual modeling. Importantly, the
resulting visual prototypes also provide compact represen-
tations of image content for assessing the applicability of
textual semantics. In the text pathway, a frozen CLIP en-
coder and query-based compression produce latent seman-
tic tokens from the paired caption. We estimate their vi-
sual support by matching them against cluster prototypes
and a learnable null-evidence key, allowing semantic com-
ponents without corresponding visual evidence to receive
reduced contributions. The resulting evidence estimates
guide both text attention reweighting and spatially gated
injection, jointly regulating semantic contributions and the
magnitude of text updates at individual visual positions. By
using visual prototypes for both semantic feature organiza-
tion and cross-modal modulation, PestWeave establishes a
direct connection between discriminative visual modeling
and evidence-aware text fusion.
In summary, our contributions are as follows:
• We propose PestWeave, a visual evidence-guided frame-
work for fine-grained multimodal pest learning that con-
nects content-adaptive visual modeling with text fusion
through cluster-level visual prototypes.
• We develop an LSH-assisted token clustering and se-
mantic scanning mechanism incorporating cluster pro-
totype, global, and register tokens. It enhances inter-
actions among related regions and contextual modeling
while preserving spatial structure and alleviating interfer-
ence from complex backgrounds.
• We introduce a text modulation mechanism supported
by visual prototypes that combines prototype matching
with null-evidence modeling to jointly regulate the rela-
tive contributions of semantic components and the overall
strength of text injection, reducing interference from se-
mantics lacking visual support.
• Extensive experiments on multiple datasets validate the
effectiveness of PestWeave. Ablation studies and visual-
izations further demonstrate the contributions of individ-
ual components and the complementarity between visual
organization and text modulation.
2

  1. Related Work
    2.1. Visual and Multimodal Pest Learning
    Deep learning has been widely adopted for fine-grained
    agricultural pest recognition to address subtle morphologi-
    cal similarities and complex field backgrounds. Early work
    by Li et al. [18] utilized convolutional networks for pest
    recognition in natural scenes. Subsequent works optimize
    feature learning against appearance variations and environ-
    mental noise. DFL [6], InsectMamba [35], and HIVE [8]
    leverage causal constraints, state-space modeling, and hi-
    erarchical pre-training respectively. These methods focus
    on learning discriminative visual representations. However,
    most of them rely solely on visual information and fail to
    exploit descriptive biological semantic knowledge for am-
    biguous samples. Multimodal approaches introduce textual
    information as auxiliary cues. Insect-Foundation [24] con-
    structs the Insect-1M dataset with description-consistency
    supervision. AgroBench [28] evaluates vision-language
    models on pest tasks and highlights persistent challenges
    in fine-grained recognition. PestVL-Net [15] and Pest-
    MoE [17] further enable vision-text interaction and modal
    gating fusion. Although existing works augment visual fea-
    tures with text, they lack explicit modeling of the align-
    ment between textual descriptions and visible image con-
    tent. In this work, we dynamically learn text weights from
    cluster-level visual evidence, coupling discriminative visual
    features with fine-grained semantic weighting.
    2.2. Recurrent Weighted Key Value
    RWKV [25] supports linear-complexity sequence aggre-
    gation, parallel training, and recurrent inference, offer-
    ing a promising paradigm for efficient long-range visual
    modeling. Vision-RWKV [3] extends RWKV to visual
    tasks, and follow-up works such as ChangeRWKV [37] and
    CLUIE [7] validate its potential on remote sensing and un-
    derwater image tasks. Nevertheless, most of these models
    adopt fixed spatial scanning orders and struggle to group
    discriminative tokens with similar appearance but scattered
    spatial locations. For pest recognition, PestVL-Net [15]
    adopts saliency-guided windows to allocate computation.
    However, low-level saliency signals are prone to interfer-
    ence from textured backgrounds and lack pest-specific se-
    mantic grouping. To address this limitation, we propose a
    content-driven token scanning strategy with LSH initializa-
    tion and spherical clustering refinement. The learned cluster
    prototypes support both RWKV visual modeling and cross-
    modal text fusion.
  2. Method
    3.1. Locality-Sensitive Hashing
    Locality-Sensitive Hashing (LSH) maps feature vectors to
    discrete buckets such that nearby vectors have a higher col-
    lision probability than distant ones. We employ Euclidean
    LSH (E2LSH) [2] to initialize the grouping of visual tokens.
    ForNprojected visual tokensv i ∈R C, we first normalize
    each feature and compute its hash value as
    zi = vimax(∥vi∥2, ϵ), h ℓ(zi) =  ξ⊤ℓ zi +b ℓr  .(1)
    Here,ξ ℓ ∼ N(0, IC)is a random projection vector,b ℓ ∼
    U(0, r)is a random offset,r >0denotes the bucket width,
    andϵensures numerical stability. The floor operation quan-
    tizes the projected feature into an integer bucket index.
    We applyL h independently sampled hash functions and
    combine their outputs into an integer sorting key:
    q(0)i = 0, q (ℓ)i =β hq(ℓ−1)i +h ℓ(zi),(2)
    whereℓ= 1, . . . , Lh andβ h is a fixed integer base. The
    random projections and offsets are sampled once and re-
    main fixed during training. For center initialization, we sta-
    bly sort feature indices byq (Lh)i and selectK cl approxi-
    mately evenly spaced positions in the resulting order, where
    1≤K cl ≤Nis the number of visual groups. The cor-
    responding normalized features serve as initial centers for
    subsequent spherical refinement.
    3.2. Network Framework
    As illustrated in Fig. 2, PestWeave integrates LSH-based
    semantic scanning, tri-token augmentation, and evidence-
    guided vision–language fusion. The input pest image is first
    processed by a convolutional encoder and RWKV blocks,
    where LSH-initialized grouping organizes visual tokens for
    semantic scanning. Prototype, global, and register tokens
    provide complementary context for visual modeling. Mean-
    while, the paired caption is encoded by a frozen CLIP text
    encoder and compressed into latent semantic tokens. Visual
    prototypes guide the weighting and fusion of these text to-
    kens with visual features. Finally, the fused representations
    are processed by a Tail-Net and a subsequent classifier to
    produce pest recognition predictions.
    3.3. Semantic-Enhanced Vision RWKV
    To capture both spatial relationships and visual similar-
    ity, we introduce a semantic scanning branch into Vision
    RWKV . The module combines spatial and semantic in-
    teractions through a spatial mixer, followed by a channel
    mixer for feature transformation. Given an input feature
    mapF∈R H×W×C , we flatten it into a token sequence
    X∈R N×C , whereN=HW.
    3

Text Representation
Visual Modeling
Semantic Scanning
Paired Caption
Frozen CLIP
Text Encoder
Semantic Tokens
T Evidence-GuidedFusion
× NP Fv
Shared T, aj
Classifier
Prediction
ŷ1
ŷ2
ŷ3
Pest Image
Conv
Encoder
Visual
Tokens X
LN

  • Shift
    X̃
    Spatial
    RWKV
    Group
    Mean
    Visual Prototypes P
    ··· ···
    p1 p2 pKcl

V Projection

  • Norm
    X̃
    LSH Initialization
    Project · Hash · Seed
    ξ1
    ξ2
    ξ3
    Spherical
    Refinement
    Assign / Update
    Semantic
    Reordering
    1
    1
    2
    2
    3
    3
    4
    4
    5
    5
    6
    6
    7
    7
    8
    8
    ΠX̃
    X̃
    Tri-Token
    Augmentation
    [ ]
    ΠX̃ P grreg
    Global MeanX̃
    Semantic
    RWKV
    ×
    Discardyreg
    Semantic Integration
    ···

Weighted
Sum
λx
λp
λg
Yx
Yp
yg
Group
Broadcast
Bp
Global
Broadcast
Bg
Inverse
Reordering
Visual flow Text flow Prototype guidance Grouping indices Prototype Global Register
Last-block P
EvidenceGroups
µk(0)
zi Π
g
Semantic Correction
RWKV Block
A Spatial Mix Block (X → U)
X Layer
Norm
Token
Shift
σ
Spatial WKV
Horizontal →
Vertical
+Y +
X
Semantic
Correction
Rs
Ks
Vs
γsWO
Ysp
Π−1ΔΠ
B Channel Mix Block (U → X′ )
Layer
Norm
Token
Shift
σ
ReLU² +
U
X′
Rc
Kc γcWVc Vc YcU
Query
Compression
J = 4
Ec
Learnable queries Q0
ASpatial Mix (X → U)
Y
+
X (skip)
Uγs ChannelMixerB
σ Sigmoid Elementwise ReLU²Squared ReLU
Tail
-Net
Visual Tokens
Reorder
Restore
Figure 2. Overview of the proposed PestWeave framework. The visual branch integrates spatial modeling with semantic scanning and
tri-token augmentation. Visual prototypes further guide evidence-aware text modulation, enabling adaptive vision-language fusion for
fine-grained pest recognition.
Spatial RWKV Modeling.The input sequence is first nor-
malized and locally mixed through a token-shift operation
Ss, then projected into Receptance, Key, and Value:
eX=S s(LN(X)), R s = eXW R,(3)
Ks = eXW K, V s = eXW V .(4)
Bidirectional WKV aggregates information across the se-
quence using position-dependent weights. For a sequence
of lengthL, its standard formulation is
wkvt =
P
i̸=t e−(|t−i|−1)w/L+ki vi +e u+kt vtP
i̸=t e−(|t−i|−1)w/L+ki +e u+kt
,(5)
wkv =W L(K, V),(6)
wherek i andv i are thei-th Key and Value tokens,wandu
are learnable distance-weighting and self-token bias param-
eters, and all operations are applied channel-wise. The spa-
tial path performs successive horizontal and vertical scans:
Vh =W hN (Ks, Vs),(7)
Vsp =T −1[W vN (TK s,TV h)],(8)
Ysp =

σ(Rs)⊙V sp

WO,(9)
whereTconverts row-major to column-major order andσ
denotes sigmoid gating. The superscriptshandvdenote
horizontal and vertical scanning, respectively, with scan-
specific WKV parameters. These scans establish the spatial
representation on which semantic modeling builds.
LSH-Guided Semantic Grouping.Spatial proximity
alone does not fully characterize the relationships among
visually similar pest regions. Letz i = Norm(v s,i)denote
the normalizedi-th Value token. TheK cl centers initialized
by the LSH procedure in Section 3.1 are refined through
4

spherical clustering:
ℓ(ν)i = arg max1≤k≤Kcl z⊤i µ(ν)k ,(10)
µ(ν+1)k = Norm

 1
|C(ν)k |
X
i∈C(ν)k
zi

 ,(11)
whereνindexes refinement iterations,C (ν)k ={i:ℓ (ν)i =
k}, andNormdenotesℓ 2 normalization. The center up-
date applies to nonempty groups; empty groups retain their
previous centers. Final assignmentsℓ i are obtained using
the last updated centers, defining groupsC k ={i:ℓ i =k}.
These groups define a permutationΠthat places their mem-
bers contiguously, providing a content-adaptive order for
semantic scanning.
Tri-Token Semantic Scanning.To connect group-level ap-
pearance with image-wide context, we augment the seman-
tic sequence with three types of auxiliary tokens: prototype,
global, and register tokens. For each nonempty groupC k,
its prototype summarizes the corresponding visual features,
while the global token aggregates all spatial positions:
pk = 1|Ck| Xi∈Ck exi,(12)
g= 1N
NX
i=1
exi.(13)
An empty group uses the global token as its prototype. A
learnable register tokenr reg provides an additional context
slot for joint aggregation. WritingP= [p 1, . . . , pKcl ]⊤ ∈
RKcl×C, the augmented sequence is
Z= [Π eX;P;g ⊤;r ⊤reg].(14)
The sequence is processed through the same projection and
gating formulation as spatial RWKV:
Ye =

σ(ZW R)⊙ WeM (ZW K, ZWV )WO,(15)
whereM=N+K cl + 2is the augmented sequence length
and the superscriptedenotes semantic scanning. Within
each block, the spatial and semantic paths share the projec-
tion weightsW R,W K,W V , andW O, while using indepen-
dent WKV parameters. This joint scan enables interactions
among visual tokens, group prototypes, and global context.
Semantic Feature Integration.We first separate the se-
mantic scanning output according to the augmented se-
quence:
Ye = [Yx;Y p;y ⊤g ;y ⊤reg],(16)
whereY x contains the visual-token outputs in the reordered
sequence,Y p contains the prototype outputs, andy g, yreg ∈
Prototype Evidence
Evidence-Weighted Fusion Spatial Injection
Visual PrototypesP
Semantic TokensT
fp
ft
Match
ρjk
p̄∅ Context
ej
Null-aware Gate
σ
Token Contribution
a1 a2 a3 a4
Fv
Normalize

  • Attention

Image Self-Attention
Qhvis
Khtxt
Vhtxt
Attention
Ah
aj
Modulation
ωh
∑j
Concath
Normalize + Aggregate
Support
s
𝒫0
Project
ΔF

  • LN +FFN +
    Fout
    Fsa
    Null Evidence
    LNLayerNormalization
    FFNFeedForwardNetwork
    tj
    Text Value Embeddings
    t1 t2 t3 t4 High
    Low
    Ãh
    ρj∅
    Learnable
    Projections
    Flatten
    O
    Visual Text Prototype Evidence Contribution / Support
    Broadcast
    Row Index
    Figure 3. Overview of the proposed evidence-guided text modula-
    tion module. Visual prototypes estimate the support for textual se-
    mantics, guiding evidence-weighted cross-attention and spatially
    gated text injection for adaptive vision-language fusion.
    RC are the global and register outputs. In this reordered se-
    quence, the prototype outputs are broadcast to their group
    members to formB p, whiley g is broadcast to all visual
    positions to formB g. The semantic correction is then com-
    puted as:
    ∆Π =λ x ⊙Y x +λ p ⊙B p +λ g ⊙B g,(17)
    Y=Y sp + Π−1∆Π.(18)
    Here,Π −1 restores the original spatial arrangement after
    semantic integration. Forq∈ {x, p, g}, the channel weights
    are parameterized as:
    λq = tanh(θq), θ (0)q = 0,(19)
    whereθ q ∈R C, yielding weights in(−1,1)and an initially
    zero semantic correction. The register participates in the
    joint scan, while its output is not directly propagated. This
    residual formulation combines spatial structure with seman-
    tic relationships while allowing the semantic correction to
    enter gradually.
    Channel Mixing.The spatial–semantic representation is
    first integrated through a residual update:
    U=X+γ s ⊙Y.(20)
    The channel mixer then applies local mixing, nonlinear pro-
    jection, and Receptance gating:
    Xc =S c(LN(U)), R c =X cW cR,(21)
    Kc =X cW cK, V c =ϕ(K c)W cV ,(22)
    Yc =σ(R c)⊙V c, X ′ =U+γ c ⊙Y c,(23)
    whereϕ(·) = ReLU(·) 2,S c denotes token shifting, andγ s
    andγ c are learnable residual scales. The resulting features
    combine spatial context, semantic interactions, and channel
    transformations for subsequent multimodal learning.
    5

3.4. Evidence-Guided Vision-Language Fusion
Captions provide complementary semantic information for
pest recognition, while the visual support for these seman-
tics varies across images. As illustrated in Fig. 3, we
leverage visual prototypes to assess the contributions of
textual semantics and regulate their interactions with vi-
sual features. The resulting evidence guides both semantic
reweighting and spatially gated text injection.
Textual Semantic Encoding.Given the captioncpaired
with an image, a frozen CLIP text encoder extracts its con-
textual representations. A query-based compression mod-
ule then summarizes the encoded sequence into a compact
set of latent semantic tokens:
Ec =E text(c), T=Q(E c;Q 0),(24)
whereQ 0 contains learnable query tokens andT=
[t1, . . . , tJ ]⊤ ∈R J×d t. We useJ= 4semantic tokens
to represent the paired caption.
Prototype-Supported Evidence Estimation.The cluster-
mean prototypesPfrom the final RWKV block, con-
structed before semantic scanning as in Eq. 12, serve as vi-
sual support units for the textual semantics. We map text
tokens and visual prototypes into a common embedding
space:
¯tj = Norm(ft(tj)),¯p k = Norm(fp(pk)),(25)
Here,f t :R dt →R de andf p :R C →R de are learned
mappings into a commond e-dimensional space, andNorm
denotes feature-wiseℓ 2 normalization. A learnable normal-
ized null key¯p∅ ∈R de provides an unmatched alternative
when the visual prototypes offer limited support. For each
text token, support is distributed over the valid prototypes
and the null key:
ρjk = exp(τe¯t⊤j ¯pk)P
k′∈K∪{∅} exp(τe¯t⊤j ¯pk′) ,(26)
wherek∈ K ∪ {∅},K={k:|Ck|>0}indexes nonempty
groups of the final RWKV block, andτ e >0is a learnable
similarity scale. The support assigned to real prototypes
forms the visual context
ej =
X
k∈K
ρjk ¯pk.(27)
We combine the textual representation, its visual context,
their interaction, and the null support to predict a contribu-
tion weight:
aj = (1−ρ j∅)σ

MLPϑ

[¯tj;e j; ¯tj ⊙e j;ρ j∅] ,(28)
whereMLP ϑ :R 3de+1 →Ris a learnable prediction func-
tion ande j ∈R de. The weighta j ∈[0,1]controls the
contribution of thej-th semantic token according to its vi-
sual support.
Evidence-Weighted Cross-Attention.For each fusion
block, letF v ∈R N×C denote its input features; the first
block receives the output of the visual RWKV network. Im-
age self-attention first updates their visual representation:
Fsa =F v + SA(LN(Fv)).(29)
The visual and textual features then generate queries, keys,
and values for each attention headh:
Qvish =ψ hq (Fsa), Ktxth =ψ hk (T), Vtxth =ψ hv (T).(30)
Here,Q vish ∈R N×d h andK txth , Vtxth ∈R J×d h, where
dh is the feature dimension of each head. The projection
functions include feature normalization and learned map-
pings, followed by normalization across visual positions for
queries and across text tokens for keys and values. The
cross-attention distribution is
Ah = softmax

ηhQvish K txth ⊤ ,(31)
Here,A h ∈R N×J ,η h is a learnable head-wise scaling pa-
rameter, and softmax operates over text tokens. The contri-
bution weights modulate this distribution while retaining its
total support at each visual position:
ωhij =A hijaj, m hi =
JX
j=1
ωhij,(32)
whereiindexes visual positions. The normalized weights
and aggregated textual features are
eAhij = ωhijmax(mhi, ϵ),(33)
O= Concat Hah=1 eAhV txth ,(34)
Here,H a is the number of attention heads andϵensures
numerical stability. Concat joins head outputs along the
channel dimension, yieldingO∈R N×H adh. The nor-
malized attention determines the relative semantic contri-
butions, whilem hi preserves their overall support for sub-
sequent spatial modulation.
Spatially Gated Text Injection.We average the retained
support across attention heads to obtain a spatial injection
weight and use it to modulate the projected textual update:
si = 1Ha
HaX
h=1
mhi,∆F=s⊙ P 0(O),(35)
Here,s= [s 1, . . . , sN ]⊤ ∈R N×1 is broadcast across visual
channels, andP 0 maps each row ofOtoCvisual channels
with an initially zero output. Thus,∆F∈R N×C . The
6

Table 1. Quantitative comparison on three pest datasets. All metrics are percentages, with higher values indicating better performance.
Li dataset QianFSD AgriInsect
Method Acc. Prec. F1 GM Acc. Prec. F1 GM Acc. Prec. F1 GM
AlexNet [9] 60.80 59.50 59.42 60.57 54.87 55.95 54.87 46.64 64.14 65.16 64.33 62.31
VGG16 [29] 48.37 45.61 46.08 44.74 43.46 43.01 42.93 28.90 43.72 44.13 43.86 33.14
GoogLeNet [30] 54.89 53.87 54.26 54.44 48.76 50.21 49.15 46.91 52.19 53.72 52.74 52.92
ResNet-18 [5] 77.98 78.73 77.91 77.33 69.03 70.73 69.44 68.50 80.29 81.95 80.90 82.00
ResNet-50 [5] 71.48 71.74 71.15 69.58 68.09 69.74 68.68 67.12 80.34 81.68 80.74 82.91
ResNeXt-50 [36] 71.48 72.11 71.45 70.51 67.22 68.93 67.86 65.71 79.20 80.35 79.54 81.95
Swin-T [20] 75.23 74.67 74.73 75.73 68.02 70.71 69.05 68.64 82.24 83.28 82.48 84.93
UniFormer [11, 12] 71.56 70.77 70.72 71.63 76.50 78.10 76.93 76.56 65.75 67.53 65.98 59.01
SeaFormer [33, 34] 77.81 77.99 77.52 77.22 72.90 74.13 73.11 73.92 83.66 84.71 83.95 85.08
DFL [6] 81.65 81.94 81.28 82.49 76.30 78.74 77.14 78.68 85.13 86.80 85.74 86.70
VMamba-B [19] 63.64 63.33 63.20 62.10 65.62 67.80 66.37 62.82 66.75 69.24 67.72 66.87
TransXNet [21] 76.90 76.31 76.27 76.59 79.44 80.36 79.56 81.86 80.67 81.81 81.04 81.95
LA ViT [31] 57.21 57.36 56.85 52.21 58.81 60.07 58.93 51.38 53.10 55.07 53.63 44.32
HIVE-ViT [8] 63.05 64.24 63.26 59.38 60.48 62.23 60.83 56.27 64.90 66.64 65.70 63.63
PestVL-Net [15] 88.49 89.36 88.52 88.56 86.72 87.53 86.86 87.14 90.15 90.88 90.19 90.51
Ours 93.66 93.41 93.27 94.25 89.65 89.00 89.32 90.28 93.28 93.19 92.64 94.55
Table 2. Ablation study of PestWeave on QianFSD. All metrics
are reported as percentages.
Variant Acc. Prec. F1 GM
(I) w/o Text Fusion 81.11 82.51 81.49 83.88
(II) Unit Text Weights 83.78 85.28 84.11 84.19
(III) w/o Semantic Correction 82.78 84.64 83.24 85.23
(IV) w/o Spherical Refinement 84.18 85.42 84.31 86.25
(V) w/o Tri-token Augmentation 84.85 86.36 85.18 87.62
(VI) w/o Null Option 85.11 86.28 85.33 87.75
Full Model 89.65 89.00 89.32 90.28
fused representation is obtained through residual injection
and feed-forward transformation:
Fmix =F sa +∆F, Fout =F mix +FFN(LN(F mix)).(36)
Preserving the support magnitude allows weak overall tex-
tual evidence to reduce the injected update even after at-
tention normalization. The same semantic tokens and con-
tribution weights guide two successive fusion blocks, each
computing its own attention and spatial injection weights.
In the following classification objective,F out denotes the
output of the second fusion block:
ˆy= softmax

Hcls

Ttail(Fout)

,L cls =−log ˆyy.
(37)
whereT tail denotes the Tail-Net,H cls is the classification
head, andyis the ground-truth class.
4. Experiments
4.1. Datasets
We evaluate our method on three crop pest datasets with dif-
ferent category scales. The Li dataset [18] contains 5,629
natural-scene images from ten pest categories. Its com-
plex backgrounds pose challenges to visual feature extrac-
tion and pest recognition, enabling evaluation under back-
ground interference. QianFSD [15] contains 7,054 im-
ages from 143 pest categories, while AgriInsect [15] com-
prises 9,452 images from 200 categories. These datasets
are partitioned into training, validation, and test sets with a
7:1:2 ratio. The latter two datasets encompass more diverse
pest species and appearances, posing greater challenges for
fine-grained recognition. For multimodal learning, we use
publicly available image-level captions paired with individ-
ual samples. To avoid label leakage, captions are prepro-
cessed to remove category names and other explicit label-
identifying information. The corresponding processed cap-
tions are also provided at test time, ensuring a consistent
multimodal evaluation protocol.
4.2. Baseline Methods and Evaluation Metrics
We compare PestWeave with 15 representative baselines on
the Li dataset, QianFSD, and AgriInsect, as summarized
in Table 1. The baselines include convolutional architec-
tures such as AlexNet [9], VGG16 [29], GoogLeNet [30],
ResNet-18/50 [5], and ResNeXt-50 [36]; attention-based
and hybrid models including Swin-T [20], UniFormer [11,
12], SeaFormer [33, 34], and TransXNet [21]; and the vi-
sual state-space model VMamba-B [19]. We also consider
pest-specific methods DFL [6], LA ViT [31], and HIVE-
7

Pest Image
Scanning OrderSemantic Cluster
Figure 4. Visualization of semantic clustering and content-
adaptive token scanning order.
ViT [8], alongside the multimodal PestVL-Net [15]. Perfor-
mance is assessed using accuracy (Acc.), precision (Prec.),
F1-score (F1), and geometric mean (GM).
4.3. Implementation Details
We implement our model in PyTorch and train it on a single
NVIDIA 4090 GPU. The model is optimized using stochas-
tic gradient descent (SGD) with a momentum of 0.9, a batch
size of 64, and an initial learning rate of 0.1. We adopt
the cross-entropy loss and train for 200 epochs on the Li
dataset and 400 epochs on QianFSD and AgriInsect. The
trainable components are initialized from scratch, while the
pre-trained CLIP [26] text encoder remains frozen.
4.4. Comparison with Baseline Methods
Table 1 presents the quantitative comparisons on three
pest datasets. PestWeave consistently outperforms general-
purpose architectures and pest-specific baselines across all
evaluation metrics, demonstrating its effectiveness in fine-
grained pest recognition. On the Li dataset, our method
achieves 93.66% accuracy and 94.25% GM, exceeding
PestVL-Net by 5.17 and 5.69 percentage points, respec-
tively. Similarly, on QianFSD and AgriInsect, PestWeave
improves accuracy by 2.93 and 3.13 percentage points, re-
spectively, while achieving notable gains in F1-score and
GM. These consistent improvements across datasets with
varying category scales highlight the effectiveness of com-
bining content-adaptive visual modeling with evidence-
guided text modulation for discriminating pests with subtle
morphological differences.
4.5. Ablation Studies
We conduct ablation studies on QianFSD to evaluate the
contributions of individual components, as summarized in
Table 2. All variants retain the image self-attention and
feed-forward layers in the fusion blocks to ensure consis-
tent visual modeling capacity.
PestImage
Slot–Cluster Support Matrix
Text Availability and Null Probability
Slot-1 Slot-2 Slot-3 Slot-4
Slot–Cluster Support Matrix
PestImage
Text Availability and Null Probability
Slot-1 Slot-2 Slot-3 Slot-4
(b) Null-Aware Text Gating
(a) Text–Visual Evidence Matching
Figure 5. Visualization of prototype-supported textual evidence.
(a) Learned semantic slots exhibit distinct support distributions
over visual clusters. (b) Null-aware gating reduces the contribu-
tion of weakly supported semantic slots.
Textual Information and Evidence Weighting.Variant
(I) disables text injection while retaining the visual process-
ing operations, reducing accuracy from 89.65% to 81.11%.
Variant (II) fixes all semantic contribution weights to one
while preserving text fusion, resulting in 83.78% accuracy.
These results demonstrate the benefits of incorporating tex-
tual information and regulating its contributions according
to visual evidence.
Semantic Visual Organization.Variant (III) removes se-
mantic WKV correction while retaining spatial scanning
and visual prototypes for text modulation, leading to a 6.87-
point accuracy drop. Variant (IV) retains LSH initializa-
tion and cosine assignment but removes iterative spherical
refinement, reducing accuracy to 84.18%. Variant (V) ex-
cludes prototype, global, and register tokens from semantic
scanning while preserving cluster prototypes for text evi-
dence estimation, achieving 84.85% accuracy. These results
highlight the contributions of semantic scanning, clustering
refinement, and tri-token augmentation to discriminative vi-
sual representation learning.
Unmatched Visual Evidence.Variant (VI) removes the
null-evidence option while retaining real-prototype match-
ing and the learned contribution gate. Accuracy decreases
to 85.11%, with corresponding declines in F1-score and
GM. This demonstrates the benefit of explicitly modeling
unmatched visual evidence to reduce the influence of un-
supported textual semantics.
4.6. Qualitative Analysis
Fig. 4 visualizes semantic cluster assignments and the
corresponding scanning orders on representative pest im-
8

ages. The results illustrate how content-adaptive group-
ing organizes visually related regions into semantic clus-
ters and brings their tokens closer in the scanning sequence.
Fig. 5 further visualizes prototype-supported textual evi-
dence through slot–cluster support matrices, spatial evi-
dence maps, and null-aware availability weights. Differ-
ent semantic slots exhibit distinct support distributions, with
lower null probabilities indicating stronger visual support.
Conversely, higher null probabilities correspond to reduced
availability, demonstrating adaptive regulation of textual
contributions. The spatial maps reflect cluster-level evi-
dence rather than word-level localization or actual text in-
jection strength.
5. Conclusion
In this work, we presented PestWeave, a multimodal frame-
work for fine-grained pest recognition that connects seman-
tic scanning with evidence-guided text modulation through
visual prototypes. By introducing LSH-assisted token
grouping and semantic scanning, PestWeave strengthens in-
teractions among visually related regions while preserving
spatial structure. We further incorporate cluster prototype,
global, and register tokens to enhance contextual modeling
and refine visual representations. For cross-modal fusion,
we employ prototype-supported evidence estimation with a
null-evidence option to assess the applicability of textual
semantics, jointly regulating their relative contributions and
overall injection strength to reduce interference from un-
supported descriptions. Extensive experiments on multiple
datasets demonstrate the effectiveness of PestWeave in fine-
grained pest learning, highlighting the complementary ben-
efits of content-adaptive visual organization and evidence-
guided text modulation.
References
[1] Azam Amiri and Ali R Bandani. Artificial intelligence for
pest identification and decision support in sustainable crop
protection: A critical review.European Journal of Agron-
omy, 176:128040, 2026.
[2] Mayur Datar, Nicole Immorlica, Piotr Indyk, and Vahab S
Mirrokni. Locality-sensitive hashing scheme based on p-
stable distributions. InProceedings of the twentieth an-
nual symposium on Computational geometry, pages 253–
262, 2004.
[3] Yuchen Duan, Weiyun Wang, Zhe Chen, Xizhou Zhu, Lewei
Lu, Tong Lu, Yu Qiao, Hongsheng Li, Jifeng Dai, and Wen-
hai Wang. Vision-RWKV: Efficient and scalable visual per-
ception with RWKV-like architectures. InInternational
Conference on Learning Representations, 2025.
[4] Hang Guo, Yong Guo, Yaohua Zha, Yulun Zhang, Wenbo
Li, Tao Dai, Shu-Tao Xia, and Yawei Li. Mambairv2: Atten-
tive state space restoration. In2025 IEEE/CVF conference
on computer vision and pattern recognition (CVPR), pages
28124–28133. IEEE, 2025.
[5] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun.
Deep residual learning for image recognition. InProceed-
ings of the IEEE Conference on Computer Vision and Pattern
Recognition, pages 770–778, 2016.
[6] Tao Hu, Jianming Du, Keyu Yan, Wei Dong, Jie Zhang,
Jun Wang, and Chengjun Xie. Causality-inspired crop pest
recognition based on Decoupled Feature Learning.Pest
Management Science, 80(11):5832–5842, 2024.
[7] Kui Jiang, Zefan Feng, Laibin Chang, Yan Luo, Junjun Jiang,
and Xiaopeng Fan. CLUIE: Clustering-aware recurrent
propagation with local structural compensation for underwa-
ter image enhancement.arXiv preprint arXiv:2607.21467,
2026.
[8] Minseong Kim, Jin Hyeok Choi, Junyoung Park, Olga
Frunze, Sungtek Kahng, Byoungjo Choi, Woochul Kang,
and Hyung Wook Kwon. HIVE: Hierarchical identification
in visual entomology for pest recognition.Ecological Infor-
matics, 97:103911, 2026.
[9] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton.
ImageNet classification with deep convolutional neural net-
works. InAdvances in Neural Information Processing Sys-
tems, 2012.
[10] Hankyeol Lee, Gawon Seo, Wonseok Choi, Geunyoung
Jung, Kyungwoo Song, and Jiyoung Jung. Enhancing vi-
sual classification using comparative descriptors. In2025
IEEE/CVF Winter Conference on Applications of Computer
Vision (WACV), pages 5274–5283. IEEE, 2025.
[11] Kunchang Li, Yali Wang, Peng Gao, Guanglu Song, Yu Liu,
Hongsheng Li, and Yu Qiao. UniFormer: Unified trans-
former for efficient spatiotemporal representation learning.
InInternational Conference on Learning Representations,
2022.
[12] Kunchang Li, Yali Wang, Junhao Zhang, Peng Gao, Guan-
glu Song, Yu Liu, Hongsheng Li, and Yu Qiao. UniFormer:
Unifying convolution and self-attention for visual recogni-
tion.IEEE Transactions on Pattern Analysis and Machine
Intelligence, 45(10):12581–12600, 2023.
[13] Qiuyu Li, Yushan Pan, Nan Xiang, Haiyang Zhang, Zuhe Li,
Xiaowei Huang, and Zhijie Xu. Clarif: clue alignment and
retrieval-informed fusion for fine-grained pest recognition.
Applied Intelligence, 56(15):474, 2026.
[14] Xueheng Li, Xuanhua He, Tao Hu, Jie Zhang, Man Zhou,
Chengjun Xie, Yingying Wang, and Bo Huang. Freq-
rwkv: Granularity-aware spatial-frequency synergy via dual-
domain recurrent scanning for pan-sharpening. InProceed-
ings of the 33rd ACM International Conference on Multime-
dia, pages 1890–1899, 2025.
[15] Xueheng Li, Tao Hu, Ke Cao, Runsheng Qi, Huixin Zhang,
Rui Li, Jie Zhang, and Chengjun Xie. PestVL-Net: Enabling
multimodal pest learning via fine-grained vision-language
interaction. InProceedings of the IEEE/CVF Conference on
Computer Vision and Pattern Recognition Findings, pages
8826–8835, 2026.
[16] Xuechen Li, Lang Qiao, Junxiong Zhou, Vera Krischik, and
Ce Yang. Pest-moe: A mixture-of-experts framework for
stage-aware multimodal few-shot pest recognition.Artificial
Intelligence in Agriculture, 2026.
9

[17] Xuechen Li, Lang Qiao, Junxiong Zhou, Vera Krischik, and
Ce Yang. Pest-MoE: A mixture-of-experts framework for
stage-aware multimodal few-shot pest recognition.Artificial
Intelligence in Agriculture, 2026. Available online 8 August
2026.
[18] Yanfen Li, Hanxiang Wang, L. Minh Dang, Abolghasem
Sadeghi-Niaraki, and Hyeonjoon Moon. Crop pest recog-
nition in natural scenes using convolutional neural net-
works.Computers and Electronics in Agriculture, 169:
105174, 2020.
[19] Yue Liu, Yunjie Tian, Yuzhong Zhao, Hongtian Yu, Lingxi
Xie, Yaowei Wang, Qixiang Ye, Jianbin Jiao, and Yunfan
Liu. VMamba: Visual state space model. InAdvances
in Neural Information Processing Systems, pages 103031–
103063, 2024.
[20] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng
Zhang, Stephen Lin, and Baining Guo. Swin Transformer:
Hierarchical vision transformer using shifted windows. In
Proceedings of the IEEE/CVF International Conference on
Computer Vision, pages 10012–10022, 2021.
[21] Meng Lou, Shu Zhang, Hong-Yu Zhou, Sibei Yang, Chuan
Wu, and Yizhou Yu. TransXNet: Learning both global and
local dynamics with a dual dynamic token mixer for visual
recognition.IEEE Transactions on Neural Networks and
Learning Systems, 36(6):11534–11547, 2025.
[22] Chun-Sen Ma, Bing-Xin Wang, Xue-Jing Wang, Qing-Cai
Lin, Wei Zhang, Xue-Fang Yang, Joan van Baaren, Daniel P
Bebber, Sanford D Eigenbrode, Myron P Zalucki, et al. Crop
pest responses to global changes in climate and land manage-
ment.Nature Reviews Earth & Environment, 6(4):264–283,
2025.
[23] Zehong Ma, Hao Chen, Wei Zeng, Limin Su, and Shiliang
Zhang. Multi-modal reference learning for fine-grained text-
to-image retrieval.IEEE Transactions on Multimedia, 27:
5009–5022, 2025.
[24] Hoang-Quan Nguyen, Thanh-Dat Truong, Xuan Bac
Nguyen, Ashley Dowling, Xin Li, and Khoa Luu. Insect-
Foundation: A foundation model and large-scale 1M dataset
for visual insect understanding. InProceedings of the
IEEE/CVF Conference on Computer Vision and Pattern
Recognition, pages 21945–21955, 2024.
[25] Bo Peng, Eric Alcaide, Quentin Anthony, Alon Albalak,
Samuel Arcadinho, Stella Biderman, Huanqi Cao, Xin
Cheng, Michael Chung, Leon Derczynski, Xingjian Du,
Matteo Grella, Kranthi Gv, Xuzheng He, Haowen Hou, Prze-
myslaw Kazienko, Jan Kocon, Jiaming Kong, Bartłomiej
Koptyra, Hayden Lau, Jiaju Lin, Krishna Sri Ipsit Mantri,
Ferdinand Mom, Atsushi Saito, Guangyu Song, Xiangru
Tang, Johan Wind, Stanisław Wo´ zniak, Zhenyuan Zhang,
Qinghua Zhou, Jian Zhu, and Rui-Jie Zhu. RWKV: Rein-
venting RNNs for the transformer era. InFindings of the
Association for Computational Linguistics: EMNLP 2023,
pages 14048–14077. Association for Computational Lin-
guistics, 2023.
[26] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya
Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry,
Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen
Krueger, and Ilya Sutskever. Learning transferable visual
models from natural language supervision. InProceedings
of the 38th International Conference on Machine Learning,
pages 8748–8763. PMLR, 2021.
[27] Serge Savary, Laetitia Willocquet, Sarah Jane Pethybridge,
Paul Esker, Neil McRoberts, and Andy Nelson. The global
burden of pathogens and pests on major food crops.Nature
ecology & evolution, 3(3):430–439, 2019.
[28] Risa Shinoda, Nakamasa Inoue, Hirokatsu Kataoka, Masaki
Onishi, and Yoshitaka Ushiku. AgroBench: Vision-language
model benchmark in agriculture. InProceedings of the
IEEE/CVF International Conference on Computer Vision,
pages 7634–7644, 2025.
[29] Karen Simonyan and Andrew Zisserman. Very deep convo-
lutional networks for large-scale image recognition. InInter-
national Conference on Learning Representations, 2015.
[30] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet,
Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent
Vanhoucke, and Andrew Rabinovich. Going deeper with
convolutions. InProceedings of the IEEE Conference on
Computer Vision and Pattern Recognition, pages 1–9, 2015.
[31] Canan Ta¸ stimur Temiz and V olkan Kaya. Lavit: Class-aware
vision transformer with learnable attention for pest recogni-
tion in agricultural fields.Journal of Agricultural Sciences,
32(2):474–497, 2026.
[32] Thanh-Dat Truong, Hoang-Quan Nguyen, Xuan-Bac
Nguyen, Ashley Dowling, Xin Li, and Khoa Luu. Insect-
foundation: A foundation model and large multimodal
dataset for vision-language insect understanding.Interna-
tional Journal of Computer Vision, 133(10):7128–7153,
2025.
[33] Qiang Wan, Zilong Huang, Jiachen Lu, Gang Yu, and Li
Zhang. SeaFormer: Squeeze-enhanced axial transformer for
mobile semantic segmentation. InInternational Conference
on Learning Representations, 2023.
[34] Qiang Wan, Zilong Huang, Jiachen Lu, Gang Yu, and Li
Zhang. SeaFormer++: Squeeze-enhanced axial transformer
for mobile visual recognition.International Journal of Com-
puter Vision, 133(6):3645–3666, 2025.
[35] Qianning Wang, Chenglin Wang, Zhixin Lai, and Yucheng
Zhou. InsectMamba: State space model with adaptive com-
posite features for insect recognition. InICASSP 2025 –
2025 IEEE International Conference on Acoustics, Speech
and Signal Processing, pages 1–5. IEEE, 2025.
[36] Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and
Kaiming He. Aggregated residual transformations for deep
neural networks. InProceedings of the IEEE Conference
on Computer Vision and Pattern Recognition, pages 1492–
1500, 2017.
[37] Zhenyu Yang, Gensheng Pei, Tao Chen, Xia Yuan, Haofeng
Zhang, Xiangbo Shu, and Yazhou Yao. Beyond quadratic:
Linear-time change detection with RWKV. InProceed-
ings of the AAAI Conference on Artificial Intelligence, pages
11811–11819, 2026.
10

论文原文与出版信息

arXiv
查看论文原文

继续探索