Phil 2.17.2023

Writing Essays With AI: A Guide

  • First, you don’t have to incorporate AI into your writing practice. If you want to keep writing longhand, that’s both fine and preferable in certain cases. The idea of this essay is to inspire you and help you experiment—not to give you the One True Way to write.
  • Second, you should know that everyone—including me—is making this up as we go. It’s a whole new frontier, so there isn’t any standard or accepted way to write with these tools. All I can share is what I’ve seen work for me and other people.
  • Third, there are many ways to misuse this tool to make crap. AI is not a panacea for lack of taste or bad intentions. If you’re skilled, though, you can use it to make stuff you love.

Tasks

  • Send in AI Ethics review – done
  • Send in Camera Ready – done. Minor hiccup
  • Take care of book approvals – done? Found one problem

SBIRs

  • To the summary table, add a project “source” field and an “origins” field that has a list of all rows that were used to create the summary. These will accumulate as the summaries are combined. And add a “level” field that shows the summary level easily
    • Done! Everything works!
  • Whoops! Not so fast, need to handle timeouts like with getting embeddings.
  • I also think that all questions can be answered using the summary table. Should be faster and more useful
  • 3:00 FOM meeting – Loren thinks we have some unusual data in the 25% runs. We’ll tray that as holdout
  • Reworking NarrativeExplorer to use a GPT3GeneratorFrame and a GPT3EmbeddingFrame. First, it’s cleaner. Second, I should be able to re-use those components.

Phil 2.16.2023

Tasks

  • Review AI/Ethics paper
  • Review book requests

SBIRs

  • Set up app. I want to create a series of components in their own files so the App file isn’t so unmanagable
  • Try compressing 2-n sentences into one, and build a hierarchical synthesis of a book. Moby-dick, at about 10,000 lines would compress at a 4:1 ratio like this (=B$1/POWER($E$1,A2)):
  • Trying that out with text-davinci-003 gives good results (temp 0, presence penalty 0.8):
  • That should keep drift at bay and allow for a better ability to look back rather than just using the closest prompts. We use each level of compression in the prompt, with the last line in the prompt from the uncompressed source, and then trace our sources through the levels of indirection.
  • Didn’t like the line splits. That makes the training text inconsistent. Switching to words. That seems to be working!
Summarize the following into a single sentence:
 ETYMOLOGY. Supplied by a Late Consumptive Usher to a Grammar School. The pale Usher—threadbare in coat, heart, body, and brain; I see him now. He was ever dusting his old lexicons and grammars, with a queer handkerchief, mockingly embellished with all the gay flags of all the known nations of the world.

Summary: A pale, threadbare Usher at a Grammar School was often seen dusting his old lexicons and grammars with a handkerchief decorated with flags from different nations.
  • The recursive summarization is crazy good. Need to run it on the full book. I think I need to add an int that shows the “level” of the abstraction. Thinking that the the summary out of the number of summaries would be good
  • 9:15 standup
  • 11:00 ChatGPT working session – went well!

Phil 2.14.2023

GPT Agents

  • Submit paper
  • Switch Tweet Embedding over to binary and list-based embedding retrieval
  • Add cluster labeling Done! With GPT response. Still need to use average center of cluster and roll that into the update callback:
  • Cluster -1 doesn’t make much sense because those are non-clustered points

SBIRs

  • Thinking about the document explorer. I think that taking the average of the embeddings in a cluster and then sorting the list to produce either extracting keywords, summarizing, or something that does a version for extracting topics should work.
  • To get narrative mappings to work, there may need to multiple “summaries plus implications to xxx” that might be needed. Then the same process as the NarrativeExplorer should work.
  • There needs to be a single-parent, multi-children relationship to a hierarchical clustering of a document set. Sentence->paragraph->chapter->book->collection, etc. in each case, there can be an embedding from the actual text (up to the max tokens?), and then generated text/embedding from the GPT.
  • Reading in a book is a multi-level process, that should then make returning results faster and better.

Phil 2.13.2023

GPT Agents

  • Switch the ManifoldReduction class over to use binary and adjust the parsed text tables to be BLOBs. Done for OpenAIEmbeddings and NarrativeExplorer
  • Submit Camera ready article – nope, got a delay

SBIRs

  • 9:00 Sprint Demos
  • 2:00 MDA Meeting
  • 1:30 NSWCDD meeting
  • Had a good discussion about creating a NeuralNarativeChat app

Phil 2.10.2022

And the Twitter API still seems to be working?

Tasks

  • Schedule physical, dammit! Done!
  • Meet Brian at 7:00

GPT Agents

  • Tweaked the IUI paper by adding two more citations and rewording the conclusions to include some ethics

SBIRs

  • More embedding. Truncate the parsed text table since it’s broken. Change the embeddings fields to blobs and get storing and retrieving numpy arrays working. Then re-run using batch. Yay! Got all the parts running! Need to tweak and pull down embeddings again
OpenAIEmbeddings.load_project_data(): pulling text for 'moby-dick'
	Processing 100 lines
	Done
Question: [what are best ways to hunt whales]

Answer:
The best way to hunt whales is to approach them quietly and cautiously, so as not to startle them. Once close enough, the hunter can aim for the whale's head and attempt to harpoon it.
Supporting top 5 text:
	row [94] distance = 0.1636398939632252 text = [Sail on the whale]
	row [82] distance = 0.18950594057765602 text = [By this motion the whale must best and most comprehensively view whatever objects may be encircling him]
	row [78] distance = 0.20914296907545515 text = [*This motion is peculiar to the sperm whale]
	row [67] distance = 0.20936119635052464 text = [Through and through; through every plank and each rib, it thrilled for an instant, the whale obliquely lying on his back, in the manner of a biting shark, slowly and feelingly taking its bows full within his mouth, so that the long, narrow, scrolled lower jaw curled high up into the open air, and one of the teeth caught in a row-lock]
	row [71] distance = 0.21534657261964962 text = [And now, while both elastic gunwales were springing in and out, as the whale dallied with the doomed craft in this devilish way; and from his body being submerged beneath the boat, he could not be darted at from the bows, for the bows were almost inside of him, as it were; and while the other boats involuntarily paused, as before a quick crisis impossible to withstand, then it was that monomaniac Ahab, furious with this tantalizing vicinity of his foe, which placed him all alive and helpless in the very jaws he hated; frenzied with all this, he seized the long bone with his naked hands, and wildly strove to wrench it from its gripe]
	row [65] distance = 0.2178196008073503 text = [Now, by reason of this timely spinning round the boat upon its axis, its bow, by anticipation, was made to face the whale’s head while yet under water]
	row [49] distance = 0.2199429899371017 text = [Yet calm, enticing calm, oh, whale]

Process finished with exit code 0
  • Next, get embeddings for all of Moby-dick (Sunday morning)and see what the load times are. If they seem better (and the should be), switch the ManifoldReduction class over to use binary and adjust the parsed text tables to be BLOBs
  • Submitted MORS abstract!
  • ACM Reimbursement

Phil 2.9.2023

Grounding Large Language Models in Interactive Environments with Online Reinforcement Learning

  • Recent works successfully leveraged Large Language Models’ (LLM) abilities to capture abstract knowledge about world’s physics to solve decision-making problems. Yet, the alignment between LLMs’ knowledge and the environment can be wrong and limit functional competence due to lack of grounding. In this paper, we study an approach to achieve this alignment through functional grounding: we consider an agent using an LLM as a policy that is progressively updated as the agent interacts with the environment, leveraging online Reinforcement Learning to improve its performance to solve goals. Using an interactive textual environment designed to study higher-level forms of functional grounding, and a set of spatial and navigation tasks, we study several scientific questions: 1) Can LLMs boost sample efficiency for online learning of various RL tasks? 2) How can it boost different forms of generalization? 3) What is the impact of online learning? We study these questions by functionally grounding several variants (size, architecture) of FLAN-T5.

My Twitter tools still appear to be working…

Tasks

  • Schedule physical

SBIRs

  • 9:15 standup
  • FOM meeting today?
  • Continue with embedding work – the pull blew up on the second attempt, after I broke the first file. Added some error handling. This will work much better when I’m using the db
  • My embeddings appear to be wrong! there are just 10 distinct embeddings. Maybe it was a bug on OpenAI’s side. Need to do another pull.
  • Made a version of the embedding pull that uses lists of texts which should speed things up.
  • Since I have to wipe the embeddings, I’m going to try storing the np.arrays as blobs using dumps()
  • Get Orest’s help with signoff – sent an email

GPT-Agents

  • Respond to Alden’s invite
  • Find some additional cites for the paper, and something about how LLMs can generate toxic content, though in this case it may be a feature. If there is room, add something about the ethics of being able to better target minority groups and their views is a two-edged sword, and how the biases of LLMs may affect the generation of keywords.

Book

  • Starting the “Scale” paper, which will be part 2 of the new book: “Speed and Scale, Societal Defense in the age of the Singularity”
  • The Era of the Algorithm
    • The internet age has made democracies exploitable. As an act of societal self-defense, it is necessary to strengthen the critical thinking of the young generation.

Phil 2.8.2023

SambaNova Systems, the company that was first to market with domain-specific, pre-trained foundation models to underpin generative AI, announces a new program for startups to leverage these transformational capabilities. SambaNova is offering up to $1M dollars in free compute credits for generative AI to selected companies that have applied to the program to power and build generative AI applications running on SambaNova’s platform.

Generative AI: The Next Consumer Platform

  • We’ve entered the age of generative AI. The use cases are everywhere—from writing essays to creating comics to editing films—and adoption has outpaced every consumer tech trend of the past decade. Text generator ChatGPT surpassed 1 million users in just five days, and tens of millions of consumers have created AI avatars.
  • Whenever new technology captures consumer attention so quickly, it begs the question: is there real value here? We believe that the answer is undoubtedly yes. Generative AI will be the next major platform upon which founders build category-defining products. 
  • Much as the iPhone revolutionized our daily interaction with technology—spawning products like Uber, DoorDash, and Airbnb—generative AI will change everyday life. 
  • I think we’re entering the steep part of the singularity curve, and the paperclip function is “maximize revenue,” part of which is getting first mover advantage. So it’s going to be a centaur singularity.

Tasks

  • Schedule physical

GPT Agents

  • 2:00 Alden Dima
  • 4:00 UMBC Meeting
  • Add cites and a GPT ethics statement, then send to Jimmy

Phil 2.7.2023

Tasks

  • Schedule physical

GPT Agents

SBIRs

  • Get Mors abstract submitted by Feb 10
  • Got storing and loading of reduced embeddings and parameters in NarrativeExplorer
  • 9:15 standup – done
  • 1:00 Biweekly meeting – canceled
  • 3:00 New SBIR meeting – meh

Book

  • More proofing – done!

Phil 2.4.2023

OpenAi has been busy. First, they have some tutorials about interfacing with document collections using embeddings. Looks like a simpler version of GPT-Index

Second, they wrote up a report on using LLMs for misinformation and what to do about that:

Generative Language Models and Automated Influence Operations: Emerging Threats and Potential Mitigations

  • Generative language models have improved drastically, and can now produce realistic text outputs that are difficult to distinguish from human-written content. For malicious actors, these language models bring the promise of automating the creation of convincing and misleading text for use in influence operations. This report assesses how language models might change influence operations in the future, and what steps can be taken to mitigate this threat. We lay out possible changes to the actors, behaviors, and content of online influence operations, and provide a framework for stages of the language model-to-influence operations pipeline that mitigations could target (model construction, model access, content dissemination, and belief formation). While no reasonable mitigation can be expected to fully prevent the threat of AI-enabled influence operations, a combination of multiple mitigations may make an important difference.

Journalistic Lessons for the Algorithmic Age

  • At The Markup we pioneered an array of scientifically inspired methods that used automation and computational power to supercharge our journalism. Reflecting on our work, I came up with 10 of the most important lessons I’ve learned using this approach.

Book

  • Proofing chapters. Finished up to chapter 10. Minor tweaks

Phil 2.3.2023

Brr.

SBIRs

  • Meeting a 10:30 to discuss GPT with Isaac. Wide ranging and fun. He’s going to add some slides
  • Afternoon chat with Aaron. Also wide ranging and fun. 1) We are probably in the Singularity, and 2) The universe is probably not a simulation
  • After some struggling, got the dev branch of the binary encoding project set up with Rukan

Book

  • Working on the proofs

GPT Agents

  • The demo got accepted at IUI! I may be going to Australia?
  • Getting the clustering and embedding working

Phil 2.2.2023

Return glasses for less powerful prescription. I’ll do that after my 2:00 meeting

Looks like the end of academic access. Ah well, it was a nice run. Trained language models are more fun anyway

Extracting Training Data from Diffusion Models

  • Image diffusion models such as DALL-E 2, Imagen, and Stable Diffusion have attracted significant attention due to their ability to generate high-quality synthetic images. In this work, we show that diffusion models memorize individual images from their training data and emit them at generation time. With a generate-and-filter pipeline, we extract over a thousand training examples from state-of-the-art models, ranging from photographs of individual people to trademarked company logos. We also train hundreds of diffusion models in various settings to analyze how different modeling and data decisions affect privacy. Overall, our results show that diffusion models are much less private than prior generative models such as GANs, and that mitigating these vulnerabilities may require new advances in privacy-preserving training.

And I found the Trump campaign trip I’ve been looking for!

SBIRs

  • Finished the second draft! Need to send it out for some external sanity check. The SLT would like to see it too.
  • 9:15 standup – done
  • 11:30 CSC touch point
  • 2:00 MORS meeting with Aaron – done! Sent off to SLT
  • Send draft! Done!
  • Check out GPT-Index (github.com/jerryjliu/gpt_index) – done! Need to see if it will work with Python 3.7.4
  • Talk to Rukan and Aaron about making a separate repo for binary encoding project, notebooks, and results – done. Set up tomorrow maybe?

GPT-Agents

  • Copy over and wire up PCA, TSNE, and DBSCAN.

Book

  • Start proofing. I think downloading chapters to Word for grammar and spell checks is probably the way to go

Phil 2.1.2023

This is true! I’ve put together a spreadsheet so you can see for yourself

SBIRs

  • More FOM stuff. Maybe a meeting at 2:00?
  • MORS paper with Aaron. Nope, but did finish the second draft.

GPT Agents

  • 4:00 Meeting
  • Went on a bit of a tangent discussing Bostrom’s paperclip conjecture and how recommender algorithms could be that, but from a human/ai source, not agi. The problem is at the scales that these systems might have effects at, it is not clear what the objective function means, and if we are, in fact destroying the world by creating an algorithm that seeks to optimize for one thing, but does so in ways that are ultimately destructive to humans. Venue could be the 5th AAAI/ACM Conference on AI, Ethics, and Society Papers are due on March 5.

Book

Phil 1.31.2023

Tasks

  • Glasses! Sent an email
  • Physical! Message sent

Book

  • Got the SkyLatex link for review. Need to be done by Feb 10

SBIRs

  • 9:00 Sprint planning. Maybe get a chance to start with GPT-index? Done
  • Continue with second draft
  • Pre meeting with Aaron and Rukan
  • Meeting with Loren. Since the goal is for each ship to “imagine” what the other ships are seeing and their FOM predictions, we need a way to have a way of easily positioning the ship position with respect to the threat in some shared, generalizable frame. And wrt the HGV, propagation seems… hard. Does it make more sense to simply simulate if an interception occurs at any time in the (recorded) flight paths? Then we can train the models on that.

GPT Agents

  • Get embedding to work – done! Now I need to reduce and cluster
  • IUI response delayed a few days