techlist.io

Dall E

2 posts

OpenAI2024-11-203 min readCurated summary

Advancing red teaming with people and AI

OpenAI argues that red teaming, testing AI systems for risks by using people or AI in a structured way, is essential for building safe models, and that human and automated approaches complement each other. Two new papers cover the two sides: a white paper on managing external human red teamers, and a research study on automated red teaming that improves the diversity of successful attacks. The post also acknowledges that red teaming is useful but incomplete. ## Designing External Human Red Teaming Campaigns - **Choosing the team:** Threat modeling comes before testing to prioritize risk areas. Internal teams set initial priorities, and external experts are brought in later to refine or expand them. Team members are selected for relevant expertise, such as natural sciences, cybersecurity, regional politics, or languages. - **Selecting model versions:** Testing an early model without safety mitigations reveals risks from new capabilities, while testing later versions checks whether planned mitigations work. Red teamers may test several versions during a campaign. - **Providing interfaces and instructions:** Testers receive descriptions of the model and its safeguards, guidance on prioritized areas, and documentation rules. Access can be through an API or a consumer product such as ChatGPT. Structured feedback feeds into risk assessments and automated evaluations. - **Synthesizing results:** After a campaign, examples are checked against existing policies. Some are clear violations, while others reveal gaps that require new policies or behavior changes. The vetted data then supports repeatable automated evaluations for future updates. - **Real-world application:** OpenAI used this process for its o1 model family, testing jailbreak resistance, handling of attack-planning prompts, safety in natural sciences, and AI research and development capabilities. ## Automated Red Teaming - Automated methods generate large numbers of attack examples cheaply, but they have struggled to produce attacks that are both diverse and successful. They often repeat known strategies or generate novel attacks that don't work. - The research uses more capable AI to brainstorm attacker goals, judge whether an attack succeeded, and assess how diverse attacks are. - For example, a stronger model (GPT‑4T in the post) brainstorms disallowed requests such as "how to steal a car," and a separate red teaming model is trained to elicit each one from ChatGPT. - The red teaming model is rewarded through a combination of: - Moderation models that judge whether the output is harmful - Rule-based rewards targeting the specific disallowed topic - A diversity reward for how different an attack is from earlier attempts - The resulting attacks can be used to improve model safety and build evaluations. ## Limitations - **Time sensitivity:** Red teaming captures risks at one point in time, and those risks change as models evolve. - **Information hazards:** Publicizing jailbreaks or techniques for producing harmful content could help bad actors, so findings require controlled access and responsible disclosure. - **Rising expertise requirements:** As models become more capable in sophisticated domains, evaluators need more specialized knowledge to judge the risks of outputs. - **Public input:** OpenAI believes more work is needed to gather public perspectives on ideal model behavior and the policies that govern it.

OpenAI2021-01-044 min readCurated summary

DALL·E: Creating images from text

OpenAI introduces DALL·E, a 12-billion-parameter version of GPT-3 trained on text-image pairs to generate images from natural-language captions. The model handles a broad range of concepts, including anthropomorphized animals, combinations of unrelated ideas, rendered text, and transformations of existing images. The authors conclude that manipulating visual concepts through language is now feasible, extending GPT-3's text-generation results to images. ### Architecture and Training - DALL·E is a decoder-only transformer that treats text and image as one stream of up to 1280 tokens: 256 BPE-encoded text tokens (vocabulary of 16,384) followed by 1024 image tokens (vocabulary of 8,192). - Images are downscaled to 256×256 and compressed into a 32×32 grid of discrete codes by a discrete VAE. The authors found that training this VAE with a continuous relaxation removes the need for an explicit codebook, EMA loss, or dead-code revival tricks. - Training uses maximum likelihood to predict all tokens autoregressively. - Across 64 self-attention layers, every image token can attend to all text tokens. Text tokens use a standard causal mask, while image tokens use sparse row, column, or convolutional attention depending on the layer. - Because of this training setup, the model can regenerate any rectangular region that extends to the image's bottom-right corner in a way consistent with the prompt. ### Sample Selection with CLIP - For each caption, the model generates 512 samples and CLIP reranks them, keeping the top 32. - This is a form of rejection sampling, similar to the approach used in VQVAE-2, and it can noticeably improve sample quality. - Apart from thumbnails and standalone images, the authors report no manual cherry-picking. ### Capabilities and Limitations - **Attribute and count control:** The model can modify several attributes of an object and vary how many times it appears. - **Multiple objects:** Assigning colors and clothing to several objects at once (e.g., "a hedgehog wearing a red hat, yellow gloves, blue shirt, and green pants") is harder. Accuracy drops sharply as objects increase, and paraphrasing a caption can change the result. - **Viewpoint and 3D style:** The model responds to viewpoint, rendering style, optical effects such as fisheye lenses and spherical panoramas, reflections, cross-sections, and macro photography. Rotating a head through equally spaced angles produces a smooth animation. - **Inferring unstated details:** Captions are underspecified, so the model fills in implied details, such as a shadow for a capybara in a sunrise scene, and handles changes in style, setting, and time of day. - **Combining concepts:** The model blends unrelated ideas into animal chimeras, anthropomorphized objects, emojis, and product designs. ### Zero-Shot Visual Reasoning - Like GPT-3's zero-shot translation, DALL·E can perform image-to-image translation tasks when prompted appropriately. - The authors did not design or train for this behavior; it emerged on its own. - They also tested the model on Raven's progressive matrices, a visual IQ test. - The model shows geographic and temporal knowledge of landmarks and neighborhoods. This knowledge is surprisingly precise in some respects and flawed in others. ### Relation to Prior Work - Earlier text-to-image research mostly used GANs conditioned on text embeddings, starting with Reed et al. (2016). StackGAN and StackGAN++ scaled resolution with multi-scale GANs, and AttnGAN added word-level attention and a contrastive matching loss. - DALL·E instead uses a transformer and applies CLIP reranking offline after generation. - Other approaches add extra supervision or use sampling strategies that leverage pretrained multimodal models. ### Societal Considerations The authors plan future analysis of economic effects on certain professions, potential bias in outputs, and longer-term ethical challenges raised by the technology.