SearcharxivSearch

arXiv subjects

Yan-Ru Chen

Publications and source records attributed to Yan-Ru Chen.

2 recordsLinked to original sources

WARP: Guaranteed Inner-Layer Repair of NLP Transformers

Transformer-based NLP models remain vulnerable to adversarial perturbations, yet existing repair methods face a fundamental trade-off: gradient-based approaches offer flexibility but lack verifiability and often overfit; methods that do provide repair guarantees are restricted to the final layer or small networks, significantly limiting the parameter search space available for repair. We present WARP (Weight-Adjusted Repair with Provability), a constraint-based repair framework that extends repair beyond the last layer of Transformer models. WARP formulates repair as a convex quadratic program derived from a first-order linearization of the logit gap, enabling tractable optimization over a high-dimensional parameter space. Under the condition that the first-order approximation holds, this formulation induces three per-sample guarantees: (i) a positive margin constraint ensuring correct classification on repaired inputs, (ii) preservation constraints over a designated remain set, and (iii) a certified robustness radius derived from Lipschitz continuity. To ensure feasibility across varying model architectures, we introduce a sensitivity-based preprocessing step that conditions the optimization landscape accordingly. We further show that the iterative optimization procedure converges to solutions satisfying all repair constraints under mild assumptions. Empirical evaluation on encoder-only Transformers with varying layer architectures validates that these guarantees hold in practice while improving robustness to adversarial inputs. Our results demonstrate that guaranteed, generalizable Transformer repair is achievable through principled constraint-based optimization.

cs.LG

Enhanced magneto-optical response due to the flat band in nanoribbons made from the $α-T_3$ lattice

We study the optical response of nanoribbons made from the $α-T_3$ lattice under a weak magnetic field in the terahertz to far-infrared regime. It is found that the magnetic field can open a gap in the band structure and induce a new absorption peak with much reduced frequency in metallic armchair ribbons and a class of zigzag ribbons with particular boundaries. This tunable magneto-optical modulation effect is attributed to the interband transitions between the flat band and the propagating bands. By contrast, this magnetic modulation of gap opening and optical conductance is much weaker in metallic armchair graphene ribbons (the case of $α=0$) in which the flat band is absent. The enhancement in the $α-T_3$ model is analytically investigated and explained within the perturbation theory for metallic armchair ribbons. The magnetic field induced valley degeneracy lifting and valley splitting of the absorption peak are also discussed in the case of zigzag ribbons. These findings pave the way for magneto-optics devices based on the $α-T_3$ model materials.

cond-mat.mes-hall