SearcharxivSearch

arXiv subjects

Sina Salimian

Publications and source records attributed to Sina Salimian.

3 recordsLinked to original sources

Bias Testing and Mitigation in Black Box LLMs using Metamorphic Relations

The widespread deployment of Large Language Models (LLMs) has intensified concerns about subtle social biases embedded in their outputs. Existing guardrails often fail when faced with indirect or contextually complex bias-inducing prompts. To address these limitations, we propose a unified framework for both systematic bias evaluation and targeted mitigation. Our approach introduces six novel Metamorphic Relations (MRs) that, based on metamorphic testing principles, transform direct bias-inducing inputs into semantically equivalent yet adversarially challenging variants. These transformations enable an automated method for exposing hidden model biases: when an LLM responds inconsistently or unfairly across MR-generated variants, the underlying bias becomes detectable. We further show that the same MRs can be used to generate diverse bias-inducing samples for fine-tuning, directly linking the testing process to mitigation. Using six state-of-the-art LLMs - spanning open-source and proprietary models - and a representative subset of 385 questions from the 8,978-item BiasAsker benchmark covering seven protected groups, our MRs reveal up to 14% more hidden biases compared to existing tools. Moreover, fine-tuning with both original and MR-mutated samples significantly enhances bias resiliency, increasing safe response rates from 54.7% to over 88.9% across models. These results highlight metamorphic relations as a practical mechanism for improving fairness in conversational AI.

cs.SE

PCS: Perceived Confidence Scoring of Black Box LLMs with Metamorphic Relations

Zero-shot LLMs are now also used for textual classification tasks, e.g., sentiment and bias detection in a sentence or article. However, their performance can be suboptimal in such data annotation tasks. We introduce a novel technique that evaluates an LLM's confidence for classifying a textual input by leveraging Metamorphic Relations (MRs). The MRs generate semantically equivalent yet textually divergent versions of the input. Following the principles of Metamorphic Testing (MT), the mutated versions are expected to have annotation labels similar to the input. By analyzing the consistency of an LLM's responses across these variations, we compute a perceived confidence score (PCS) based on the frequency of the predicted labels. PCS can be used for both single and multiple LLM settings (e.g., when multiple LLMs are vetted in a majority-voting setup). Empirical evaluation shows that our PCS-based approach improves the performance of zero-shot LLMs by 9.3% in textual classification tasks. When multiple LLMs are used in a majority-voting setup, we obtain a performance boost of 5.8% with PCS.

cs.CL

Optimized Absorption of Light in Perovskite Nanowire Solar Cells

Metal halide perovskite nanowires (PrvNWs) have recently emerged as an interesting path for nanostructured solar cells. Here, we model the absorption of light in PrvNW arrays for varying diameter and length of the PrvNWs and period for the array by solving the Maxwell equations. For long enough bare PrvNW arrays, we find that the optimum diameter is fixed to that which places the absorption peak from the HE$_{11}$ waveguide mode in the PrvNWs to the vicinity of the bandgap wavelength. In contrast, when we include a transparent conductive oxide (TCO) top contact layer, the optimum diameter shifts to a larger value by 100 nm. The origin of this shift is traced to a reduced reflection at the interface between the TCO layer and the PrvNW array when the PrvNW's diameter is larger. Overall, we find that 1500 nm long PrvNWs can reach 90% of the broadband absorption potential, making this system of high interest for photovoltaics.

physics.optics