-
Min P Sampling: Balancing Creativity and Coherence at High Temperature
Authors:
Minh Nguyen,
Andrew Baker,
Andreas Kirsch,
Clement Neo
Abstract:
Large Language Models (LLMs) generate longform text by successively sampling the next token based on the probability distribution of the token vocabulary at each decoding step. Current popular truncation sampling methods such as top-$p$ sampling, also known as nucleus sampling, often struggle to balance coherence and creativity in generating text, particularly when using higher temperatures. To ad…
▽ More
Large Language Models (LLMs) generate longform text by successively sampling the next token based on the probability distribution of the token vocabulary at each decoding step. Current popular truncation sampling methods such as top-$p$ sampling, also known as nucleus sampling, often struggle to balance coherence and creativity in generating text, particularly when using higher temperatures. To address this issue, we propose min-$p$, a dynamic truncation sampling method, that establishes a minimum base percentage threshold for tokens, which the scales according to the probability of the top candidate token. Through experiments on several benchmarks, such as GPQA, GSM8K and AlpacaEval Creative Writing, we demonstrate that min-$p$ improves the coherence and quality of generated text even at high temperatures, while also facilitating more creative and diverse outputs compared to top-$p$ and other sampling methods. As of writing, min-$p$ has been adopted by multiple open-source LLM implementations, and have been independently assessed by members of the open-source LLM community, further validating its practical utility and potential.
△ Less
Submitted 1 July, 2024;
originally announced July 2024.
-
Interpreting Context Look-ups in Transformers: Investigating Attention-MLP Interactions
Authors:
Clement Neo,
Shay B. Cohen,
Fazl Barez
Abstract:
In this paper, we investigate the interplay between attention heads and specialized "next-token" neurons in the Multilayer Perceptron that predict specific tokens. By prompting an LLM like GPT-4 to explain these model internals, we can elucidate attention mechanisms that activate certain next-token neurons. Our analysis identifies attention heads that recognize contexts relevant to predicting a pa…
▽ More
In this paper, we investigate the interplay between attention heads and specialized "next-token" neurons in the Multilayer Perceptron that predict specific tokens. By prompting an LLM like GPT-4 to explain these model internals, we can elucidate attention mechanisms that activate certain next-token neurons. Our analysis identifies attention heads that recognize contexts relevant to predicting a particular token, activating the associated neuron through the residual connection. We focus specifically on heads in earlier layers consistently activating the same next-token neuron across similar prompts. Exploring these differential activation patterns reveals that heads that specialize for distinct linguistic contexts are tied to generating certain tokens. Overall, our method combines neural explanations and probing isolated components to illuminate how attention enables context-dependent, specialized processing in LLMs.
△ Less
Submitted 22 February, 2024;
originally announced February 2024.
-
Increasing Trust in Language Models through the Reuse of Verified Circuits
Authors:
Philip Quirke,
Clement Neo,
Fazl Barez
Abstract:
Language Models (LMs) are increasingly used for a wide range of prediction tasks, but their training can often neglect rare edge cases, reducing their reliability. Here, we define a stringent standard of trustworthiness whereby the task algorithm and circuit implementation must be verified, accounting for edge cases, with no known failure modes. We show that a model can be trained to meet this sta…
▽ More
Language Models (LMs) are increasingly used for a wide range of prediction tasks, but their training can often neglect rare edge cases, reducing their reliability. Here, we define a stringent standard of trustworthiness whereby the task algorithm and circuit implementation must be verified, accounting for edge cases, with no known failure modes. We show that a model can be trained to meet this standard if built using mathematically and logically specified frameworks. In this paper, we fully verify an auto-regressive transformer model for n-digit integer addition. To exhibit the reusability of verified modules, we insert the trained integer addition model into a larger untrained model and train the combined model to perform both addition and subtraction. We find extensive reuse of the addition circuits for both tasks, easing verification of the more complex subtractor model. We discuss how inserting verified task modules into LMs can leverage model reuse to improve verifiability and trustworthiness of language models built using them. The reuse of verified circuits reduces the effort to verify more complex composite models which we believe to be a significant step towards safety of language models.
△ Less
Submitted 11 July, 2024; v1 submitted 4 February, 2024;
originally announced February 2024.
-
Beyond Training Objectives: Interpreting Reward Model Divergence in Large Language Models
Authors:
Luke Marks,
Amir Abdullah,
Clement Neo,
Rauno Arike,
Philip Torr,
Fazl Barez
Abstract:
Large language models (LLMs) fine-tuned by reinforcement learning from human feedback (RLHF) are becoming more widely deployed. We coin the term $\textit{Implicit Reward Model}$ (IRM) to refer to the changes that occur to an LLM during RLHF that result in high-reward generations. We interpret IRMs, and measure their divergence from the RLHF reward model used in the fine-tuning process that induced…
▽ More
Large language models (LLMs) fine-tuned by reinforcement learning from human feedback (RLHF) are becoming more widely deployed. We coin the term $\textit{Implicit Reward Model}$ (IRM) to refer to the changes that occur to an LLM during RLHF that result in high-reward generations. We interpret IRMs, and measure their divergence from the RLHF reward model used in the fine-tuning process that induced them. By fitting a linear function to an LLM's IRM, a reward model with the same type signature as the RLHF reward model is constructed, allowing for direct comparison. Additionally, we validate our construction of the IRM through cross-comparison with classifications of features generated by an LLM based on their relevance to the RLHF reward model. Better comprehending IRMs can help minimize discrepencies between LLM behavior and training objectives, which we believe to be an essential component of the $\textit{safety}$ and $\textit{alignment}$ of LLMs.
△ Less
Submitted 7 February, 2024; v1 submitted 12 October, 2023;
originally announced October 2023.
-
Silicon Nanoantenna Mix Arrays for a Trifecta of Quantum Emitter Enhancements
Authors:
Zhaogang Dong,
Sergey Gorelik,
Ramón Paniagua-Dominguez,
Johnathan Yik,
**fa Ho,
Febiana Tjiptoharsono,
Emmanuel Lassalle,
Soroosh Daqiqeh Rezaei,
Darren C. J. Neo,
** Bai,
Arseniy I. Kuznetsov,
Joel K. W. Yang
Abstract:
Dielectric nanostructures have demonstrated optical antenna effects due to Mie resonances. Preliminary investigations on dielectric nanoantennas have been carried out for a trifecta of enhancements, i.e., simultaneous enhancements in absorption, emission directionality and radiative decay rates of quantum emitters. However, these investigations are limited by fragile substrates or low Purcell fact…
▽ More
Dielectric nanostructures have demonstrated optical antenna effects due to Mie resonances. Preliminary investigations on dielectric nanoantennas have been carried out for a trifecta of enhancements, i.e., simultaneous enhancements in absorption, emission directionality and radiative decay rates of quantum emitters. However, these investigations are limited by fragile substrates or low Purcell factor, which is extremely important for exciting quantum emitters electrically. In this paper, we present a Si mix antenna array to achieve the trifecta enhancement of ~1200 fold with a Purcell factor of ~47. The antenna design incorporates ~10 nm gaps within which fluorescent molecules strongly absorb the pump laser energy through a resonant mode. In the emission process, the antenna array increases the radiative decay rates of the fluorescence molecules via Purcell effect and provides directional emission through a separate mode. This work could lead to novel CMOS compatible platforms for enhancing fluorescence for biological and chemical applications.
△ Less
Submitted 10 October, 2023;
originally announced October 2023.
-
Cloud Classification with Unsupervised Deep Learning
Authors:
Takuya Kurihana,
Ian Foster,
Rebecca Willett,
Sydney Jenkins,
Kathryn Koenig,
Ruby Werman,
Ricardo Barros Lourenco,
Casper Neo,
Elisabeth Moyer
Abstract:
We present a framework for cloud characterization that leverages modern unsupervised deep learning technologies. While previous neural network-based cloud classification models have used supervised learning methods, unsupervised learning allows us to avoid restricting the model to artificial categories based on historical cloud classification schemes and enables the discovery of novel, more detail…
▽ More
We present a framework for cloud characterization that leverages modern unsupervised deep learning technologies. While previous neural network-based cloud classification models have used supervised learning methods, unsupervised learning allows us to avoid restricting the model to artificial categories based on historical cloud classification schemes and enables the discovery of novel, more detailed classifications. Our framework learns cloud features directly from radiance data produced by NASA's Moderate Resolution Imaging Spectroradiometer (MODIS) satellite instrument, deriving cloud characteristics from millions of images without relying on pre-defined cloud types during the training process. We present preliminary results showing that our method extracts physically relevant information from radiance data and produces meaningful cloud classes.
△ Less
Submitted 30 September, 2022;
originally announced September 2022.
-
Hybrid Dielectric-Plasmonic Nanoantenna with Multiresonances for Subwavelength Photon Sources
Authors:
Pavel A. Dmitriev,
Emmanuel Lassalle,
Lu Ding,
Zhenying Pan,
Darren C. J. Neo,
Vytautas Valuckas,
Ramón Paniagua-Dominguez,
Joel K. W. Yang,
Hilmi Volkan Demir,
Arseniy I. Kuznetsov
Abstract:
The enhancement of the photoluminescence of quantum dots induced by an optical nanoantenna has been studied considerably, but there is still significant interest in optimizing and miniaturizing such structures, especially when accompanied by an experimental demonstration. Most of the realizations use plasmonic platforms, and some also use all-dielectric nanoantennas, but hybrid dielectric-plasmoni…
▽ More
The enhancement of the photoluminescence of quantum dots induced by an optical nanoantenna has been studied considerably, but there is still significant interest in optimizing and miniaturizing such structures, especially when accompanied by an experimental demonstration. Most of the realizations use plasmonic platforms, and some also use all-dielectric nanoantennas, but hybrid dielectric-plasmonic (subwavelength) nanostructures have been very little explored. In this paper, we propose and demonstrate single subwavelength hybrid dielectric-plasmonic optical nanoantennas coupled to localized quantum dot emitters that constitute efficient and bright unidirectional photon sources under optical pum**. To achieve this, we devised a silicon nanoring sitting on a gold mirror with a 10 nm gap in-between, where an assembly of colloidal quantum dots is embedded. Such a structure supports both (radiative) antenna mode and (nonradiative) gap mode resonances, which we exploit for the dual purpose of out-coupling the light emitted by the quantum dots into the far-field with out-of-plane directivity, and for enhancing the excitation of the dots by the optical pump. Moreover, almost independent control of the resonance spectral positions can be achieved by simple tuning of geometrical parameters such as the ring inner and outer diameters, allowing us to conveniently adjust these resonances with respect to the quantum dots emission and absorption wavelengths. Using the proposed architecture, we obtain experimentally average fluorescence enhancement factors up to $654\times$ folds mainly due to high radiative efficiencies, and associated with a directional emission of the photoluminescence into a cone of $\pm 17\degree$ in the direction normal to the sample plane. We believe the solution presented here to be viable and relevant for the next generation of light-emitting devices.
△ Less
Submitted 28 February, 2023; v1 submitted 27 June, 2022;
originally announced June 2022.
-
Map** micron-scale wetting properties of superhydrophobic surfaces
Authors:
Dan Daniel,
Chee Leng Lay,
Anqi Sng,
Corryl **g Jun Lee,
Darren Chi ** Neo,
Xing Yi Ling,
Nikodem Tomczak
Abstract:
There is a huge interest in develo** super-repellent surfaces for anti-fouling and heat transfer applications. To characterize the wetting properties of such surfaces, the most common approach is to place a millimetric-sized droplet and measure its contact angles. The adhesion and friction forces can then be indirectly inferred from the Furmidge's relation. While easy to implement, contact angle…
▽ More
There is a huge interest in develo** super-repellent surfaces for anti-fouling and heat transfer applications. To characterize the wetting properties of such surfaces, the most common approach is to place a millimetric-sized droplet and measure its contact angles. The adhesion and friction forces can then be indirectly inferred from the Furmidge's relation. While easy to implement, contact angle measurements are semi-quantitative and cannot resolve wetting variations on a surface. Here, we attach a micrometric-sized droplet to an Atomic Force Microscope cantilever to directly measure adhesion and friction forces with nanonewton force resolutions. We spatially map the micron-scale wetting properties of superhydrophobic surfaces and observe the time-resolved pinning-depinning dynamics as a droplet detaches from or moves across the surface.
△ Less
Submitted 9 September, 2019;
originally announced September 2019.