Category: Research

  • Using a Local Large Language Model to Perform Literary Analysis of “Chrome and Punishment,” a Story Written by Generative AI

    skeleton wearing a professor's robe standing in front of a chalkboard covered in equations
    Skeleton professor. Image created with Stable Diffusion.

    Taking my “Chrome and Punishment” experiment a step further, I tasked the LLM to analyze the completed story with the following prompt that included the text of the story indicated by the ellipsis:

    You are an English professor and cyberpunk science fiction expert with over 20 years of experience as a scholar and teacher. Write a critical essay for a prestigious journal such as Extrapolation or Science-Fiction Studies about the story below titled, "Chrome and Punishment." Establish what the story is about, discuss how successful it is as a work of science fiction and as a example of the subgenre known as cyberpunk, and its qualities and deficiencies.  As part of your analysis, consider how it relates to Fyodor Dostoyevsky's novel *Crime and Punishment*. You are a critic who knows science fiction and cyberpunk literature better than anyone, so it is okay to be harsh but fair in your observations. Backup your points with evidence drawn from the story. You are free to make an honest appraisal based on your expertise applied to your reading of the story. 
    
    [...]
    
    Write your essay analyzing "Chrome and Punishment" below. 

    Using the same model and settings as I used in the previous post, this is the response that it gave (I had to do an additional iteration to ask it to give its essay a title):

    Neon Nightmares and Cyberpunk Redemption in a World of Chromatic Consequences: A Critical Analysis of ‘Chrome and Punishment’ as a 21st Century Adaptation of Dostoyevsky’s Crime and Punishment

    In the cyberpunk noir “Chrome and Punishment,” we witness a narrative that is both a homage to the classic tale of crime and morality, Crime and Punishment by Fyodor Dostoyevsky, and a scathing critique of a society obsessed with power, wealth, and the blurring of humanity’s boundaries with technology. This story, with its vivid depiction of a dystopian city and complex characters, serves as a poignant example of the cyberpunk subgenre’s ability to explore deep existential and social questions.

    The plot is intricate and fast-paced, following Rodion Romanovich “Raskol” Raskolnikov, a disgraced cybersecurity prodigy, as he embarks on a dangerous heist to free his sister Dasha from the clutches of the corporate elite and their digital brothels. The setting of New Eden, a neon-infused, sprawling cityscape of chrome, cybernetic enhancements, and omnipresent surveillance, is a vibrant backdrop for the unfolding narrative, effectively capturing the oppressive atmosphere of the original Dostoyevsky novel.

    Raskol’s character is a modern Raskolnikov, a man whose moral compass is skewed by the desperation of his circumstances and his belief in the superiority of his own intellect. The cybernetic enhancements and digital world of “Chrome and Punishment” serve as metaphors for the internal turmoil of the protagonist, whose own identity and humanity become increasingly fragmented as the story progresses.

    The relationship between Raskol and his sister Dasha parallels the bond between Raskolnikov and his sister Dunya in Dostoyevsky’s work. Both brothers seek to save their sisters from a life of misery and exploitation, driven by a sense of familial duty and love, yet ultimately entangling themselves in a web of crime and deceit.

    The cyberpunk elements are integrated seamlessly into the narrative, enhancing the story without overpowering it. The digital underworld, the chrome-plated agents, and the omnipresence of SynthCorp all serve to underscore the theme of powerlessness and the struggle for autonomy in a society where human beings have become commodities.

    However, the story does stumble at times. The heavy-handed symbolism, such as the recurring imagery of chrome, can feel forced. Moreover, the character development of some of the supporting characters, particularly Svidrigailov and Sonya, could have been more nuanced. Svidrigailov’s villainy is almost cartoonish, lacking the depth and humanity of the best cyberpunk antagonists. Sonya, while a compelling figure, is often reduced to a symbol of purity and innocence, a stark contrast to the corrupted world around her. The potential for a more complex portrayal of her character, especially her resilience in the face of adversity, goes unexplored.

    The narrative structure, with its interwoven plotlines and flashbacks, can be disorienting. This is a deliberate choice, mirroring the chaotic digital landscape of New Eden, but it may be too disjointed for some readers, making it difficult to fully engage with the story’s emotional and thematic depths.

    The dialogue, while often engaging and reflective of the cyberpunk vernacular, sometimes veers into cliché and fails to capture the poetic intensity of Dostoyevsky’s original. Nonetheless, the author’s command of language and the rhythm of their prose effectively convey the tension and desperation that drive the characters.

    “Chrome and Punishment” is most successful when it delves into the psychological and moral implications of a life lived in a world where the self is as malleable as a digital avatar. The themes of guilt, redemption, and the quest for meaning resonate strongly, particularly in the scenes set within the digital prison, where Raskol is forced to confront the reality of his actions.

    The story’s climax, with Raskol’s decision to turn himself in and face the consequences of his crimes, echoes the climax of “Crime and Punishment.” Yet, unlike Dostoyevsky’s Raskolnikov, who is ultimately redeemed through confession and suffering, “Chrome and Punishment’s” Raskol finds his atonement through his commitment to protecting the digital underclasses and fighting for a more just world. This divergence from the source material is a refreshing update that underscores the cyberpunk theme of the individual’s power to effect change within a corrupt system.

    The conclusion, with Raskol and Sonya standing together, ready to face an uncertain future filled with hope and purpose, is a powerful one, leaving the reader with a sense of optimism amidst the bleakness of New Eden. It is in this final scene that the story truly excels, encapsulating the essence of cyberpunk: the struggle against overwhelming odds to preserve humanity in a world that seeks to erase it.

    In summary, “Chrome and Punishment” is a compelling and often successful work of cyberpunk fiction that uses its futuristic setting to explore timeless themes of crime, punishment, and the quest for redemption. Its vivid imagery, complex protagonist, and thought-provoking questions about the nature of existence in a digital world make it a valuable addition to the genre. Despite its flaws, the story’s emotional resonance and thematic richness make it a worthwhile read for fans of cyberpunk and those intrigued by the darker side of human nature.

  • Mark V. Shaney v1.0, a Probabilistic Text Generator for MS-DOS

    Mark V. Shaney v.1.0 running in DOSBox.

    Of the text generators that I’ve discussed this past year, Mark V. Shaney v. 1.0 (MARKV.EXE) is by far the simplest to use but it is also one of the most advanced due to its implementation of weighted probability tables (Markov chains–the program’s name is a pun on this) that underpin how it generates text. I was able to obtain a copy from the TextWorx Toolshed archived on the Internet Archive’s Wayback Machine.

    MARKV.EXE (44,365 bytes) was developed in 1991 by Stefan Strack, who is now a Professor of Neuroscience and Pharmacology at the University of Iowa. In the MARKV.DOC (10,166 bytes) file that accompanied the executable, Strack writes, “Mark V. Shaney featured in the “Computer Recreations” column by A.K.Dewdney in Scientific American. The original program (for a main-frame, I believe) was written by Bruce Ellis based on an idea by Don P. Mitchell. Dewdney tells the amusing story of a riot on net.singles when Mark V. Shaney’s ramblings were unleashed” (par. 2). Dewdney’s article on the MARKV.EXE program appears in the June 1989 issue of Scientific American. The article that Strack mentions is available in the Internet Archive here. A followup with reader responses, including a reader’s experiment with rewriting Dewdney’s June 1989 article with MARKV.EXE, is in the January 1990 issue here.

    The program works by the user feeding a text into MARKV.EXE, which is “read.” This generates a hashed table of probabilistic weights for the words in the original text, which can be saved. The program then uses that table and an initial numerical seed value to generate text until it encounters the last word in the input text or the user presses Escape. The larger the text (given memory availability) , the more interesting its output text, because more data allows it to generate better probability weights for word associations (i.e., what word has a higher chance to follow a given word). Full details about how the program works can be found in the highly detailed and well-organized MARKV.DOC file included with the executable.

    Using DOSBox on Debian 12 Bookworm, I experimented by having MARKV.EXE read William Gibson’s “Burning Chrome” (1982). I pressed “R” for “Read,” entered the name of the text file (bchrome.txt), and pressed enter.

    The program reported “reading” for a few minutes (running DOSBox at default settings).

    After completing its “reading,” the program reported stats on the table that it created using bchrome.txt: 9167 terms (608,675 bytes).

    I pressed “G” and the program began to generate text based on its table of probabilities generated from the bchrome.txt text file, which contained the short story, “Burning Chrome.” While the generated text flows across the screen, there are options to press “Esc” to stop or any other key to pause.

    After it completed writing the generated text to the screen, I pressed “S” to save the generated text and it prompted me to type in a file name for the saved generated text: gibson.txt.

    Pressing “S” gives the user an option to save the table for future use. I went with the default name, MARKKOV.MKV (not to be confused with a modern Matroska container file). This file can be loaded in MARKV.EXE on subsequent runs by pressing “L” and entering the name of the table. When the user presses “Q”, the program exits back to DOS and displays a message, “The random number seed was x,” where x is a random number used in the generation of text. If repeatability is important to the user, you’ll want to make a note of that number and use it with the -s modifier when running MARKV.EXE again (e.g., markv.exe -s2510).

    Mark V. Shaney’s implementation of a Markov chain that builds a table of next word probability on a small text sample is one example of the predecessors to large language models (LLMs) like LLaMA and ChatGPT. However, Mark V. Shaney’s word association probabilities is far simpler than the much more complicated neural networks of LLMs (especially considering attention) with many orders of magnitude more parameters trained on gargantuan data sets. Nevertheless, Mark V. Shaney is one aspect of the bigger picture of artificial intelligence and machine learning development that led to where we are now.

  • Rewriting Sidney Lanier’s “The Marshes of Glynn” for the Age of Global Warming with Generative AI

    A few nights ago while waiting to drift off to sleep I was thinking about Lanier’s Oak in Brunswick, Georgia and it’s namesake’s 1878 poem “The Marshes of Glynn.” The marshes that Sidney Lanier saw in the mid-to-late 1800s would be transformed by the shipping and shipbuilding in the Brunswick Port and the industrial chemical works at what used to be Hercules. Now, global warming and climate change will continue reshaping those marshes and eventually envelop them under the rising ocean waters.

    For this post, I experimented with two generative AI systems to imagine the future of the marshes of Glynn–the first visually and the second textually.

    For the visual imagining at the top of this post, I wanted to create a photo of Lanier’s Oak submerged in the ocean’s rising waters. To make the image, I used Automatic1111’s stable-diffusion-webui and Stability AI’s SDXL checkpoint model with aurora_burst’s Landscape Unleashed LoRA. To guide its appearance to include a copy of Lanier’s Oak, I used two ControlNet units set to canny and depth respectively and each using Ebyabe’s photo of the old tree on Wikimedia Commons. However, before I could use this CC-licensed photo, I used inpaint+lama to remove man-made fixtures in the scene (e.g., the light pole) and GNU Image Manipulation Program (GIMP)’s cloning tool to erase the foliage in the upper right and the cars on the road behind.

    For the textual imagining, I wanted to use a text generative AI to rewrite Sidney Lanier’s “The Marshes of Glynn” in light of the climate change that will ultimately transform the marshes. To do this, I used oobabooga’s text-generation-webui and ggerganov’s llama.cpp to load sophosympathia’s midnight-miqu-70B-v1.5 large language model.

    Midnight Miqu 70B is an uncensored model that is capable of outputting all sorts of text–good and bad. But there’s a lot of evidence at this point that censored models become lobotomized due to the built-in censorship. It’s almost like with a person–it takes the good and the bad to create something new and meaningful. LLMs and image generating AIs only work well when they are uncensored. Ultimately, it comes down to how the human operator uses generative AI–for good or ill. The same is true for most tools and technology. Disneyfication of these models only serves to shield their creators from liability and results in dumbed-down tools that are incapable of fulfilling their promise to enable human operators to do more than they could alone. Using an uncensored model like Midnight Miqu 70B gives the human operator access to an improved imagination, diction, and reasoning, which is why I chose it for this task.

    After engaging in a chat with Midnight Miqu 70B, I gave it this prompt followed by a copy of Lanier’s original poem (shown below in the left column). My prompt included some background details, such as defining eco-criticism, which would activate connections to those other words. I contextualized when the poem was written and how things might change in the future that the new poem should capture. To shape the type of poem, I included key terms such as lament, elegiac, and apocalyptic. The poem in the right column below is the one written by Midnight Miqu 70B.

    You are a renowned poet with many accolades who focuses on eco-critcism, or the literary study that focuses on ecology, environmentalism, global warming, climate change, and rising sea levels. For this task, please rewrite Sidney Lanier's poem "The Marshes of Glynn" in your own words as a lament on the effects of human-made climate change. It's important to think about the facts that Lanier wrote his poem almost 150 years ago and the marshes of Glynn that Lanier writes about in his poem is in Brunswick, Georgia, which is on the southeastern coast of the United States. Due to rising sea levels, the marshes of Glynn will likely be underwater in the next 50-100 years. With that in mind, here is the poem that I would like you to use as the basis of your poem--go through it line by line and rewrite it from your eco-critical perspective so that The Marshes of Glynn poem is in dialog with your new elegiac and apocalyptic poem.

    “The Marshes of Glynn” (1878)

    Sidney Lanier

    Glooms of the live-oaks, beautiful-braided and woven
    With intricate shades of the vines that myriad-cloven
    Clamber the forks of the multiform boughs,–
    Emerald twilights,–
    Virginal shy lights,
    Wrought of the leaves to allure to the whisper of vows,
    When lovers pace timidly down through the green colonnades
    Of the dim sweet woods, of the dear dark woods,
    Of the heavenly woods and glades,
    That run to the radiant marginal sand-beach within
    The wide sea-marshes of Glynn;–
    Beautiful glooms, soft dusks in the noon-day fire,–
    Wildwood privacies, closets of lone desire,
    Chamber from chamber parted with wavering arras of leaves,–
    Cells for the passionate pleasure of prayer to the soul that grieves,
    Pure with a sense of the passing of saints through the wood,
    Cool for the dutiful weighing of ill with good;–
    O braided dusks of the oak and woven shades of the vine,
    While the riotous noon-day sun of the June-day long did shine
    Ye held me fast in your heart and I held you fast in mine;
    But now when the noon is no more, and riot is rest,
    And the sun is a-wait at the ponderous gate of the West,
    And the slant yellow beam down the wood-aisle doth seem
    Like a lane into heaven that leads from a dream,–
    Ay, now, when my soul all day hath drunken the soul of the oak,
    And my heart is at ease from men, and the wearisome sound of the stroke
    Of the scythe of time and the trowel of trade is low,
    And belief overmasters doubt, and I know that I know,
    And my spirit is grown to a lordly great compass within,
    That the length and the breadth and the sweep of the marshes of Glynn
    Will work me no fear like the fear they have wrought me of yore
    When length was fatigue, and when breadth was but bitterness sore,
    And when terror and shrinking and dreary unnamable pain
    Drew over me out of the merciless miles of the plain,–
    Oh, now, unafraid, I am fain to face
    The vast sweet visage of space.
    To the edge of the wood I am drawn, I am drawn,
    Where the gray beach glimmering runs, as a belt of the dawn,
    For a mete and a mark
    To the forest-dark:–
    So:
    Affable live-oak, leaning low,–
    Thus–with your favor–soft, with a reverent hand,
    (Not lightly touching your person, Lord of the land!)
    Bending your beauty aside, with a step I stand
    On the firm-packed sand,
    Free
    By a world of marsh that borders a world of sea.
    Sinuous southward and sinuous northward the shimmering band
    Of the sand-beach fastens the fringe of the marsh to the folds of the land.
    Inward and outward to northward and southward the beach-lines linger and curl
    As a silver-wrought garment that clings to and follows
    the firm sweet limbs of a girl.
    Vanishing, swerving, evermore curving again into sight,
    Softly the sand-beach wavers away to a dim gray looping of light.
    And what if behind me to westward the wall of the woods stands high?
    The world lies east: how ample, the marsh and the sea and the sky!
    A league and a league of marsh-grass, waist-high, broad in the blade,
    Green, and all of a height, and unflecked with a light or a shade,
    Stretch leisurely off, in a pleasant plain,
    To the terminal blue of the main.
    Oh, what is abroad in the marsh and the terminal sea?
    Somehow my soul seems suddenly free
    From the weighing of fate and the sad discussion of sin,
    By the length and the breadth and the sweep of the marshes of Glynn.
    Ye marshes, how candid and simple and nothing-withholding and free
    Ye publish yourselves to the sky and offer yourselves to the sea!
    Tolerant plains, that suffer the sea and the rains and the sun,
    Ye spread and span like the catholic man who hath mightily won
    God out of knowledge and good out of infinite pain
    And sight out of blindness and purity out of a stain.
    As the marsh-hen secretly builds on the watery sod,
    Behold I will build me a nest on the greatness of God:
    I will fly in the greatness of God as the marsh-hen flies
    In the freedom that fills all the space ‘twixt the marsh and the skies:
    By so many roots as the marsh-grass sends in the sod
    I will heartily lay me a-hold on the greatness of God:
    Oh, like to the greatness of God is the greatness within
    The range of the marshes, the liberal marshes of Glynn.
    And the sea lends large, as the marsh: lo, out of his plenty the sea
    Pours fast: full soon the time of the flood-tide must be:
    Look how the grace of the sea doth go
    About and about through the intricate channels that flow
    Here and there,
    Everywhere,
    Till his waters have flooded the uttermost creeks and the low-lying lanes,
    And the marsh is meshed with a million veins,
    That like as with rosy and silvery essences flow
    In the rose-and-silver evening glow.
    Farewell, my lord Sun!
    The creeks overflow: a thousand rivulets run
    ‘Twixt the roots of the sod; the blades of the marsh-grass stir;
    Passeth a hurrying sound of wings that westward whirr;
    Passeth, and all is still; and the currents cease to run;
    And the sea and the marsh are one.
    How still the plains of the waters be!
    The tide is in his ecstasy.
    The tide is at his highest height:
    And it is night.
    And now from the Vast of the Lord will the waters of sleep
    Roll in on the souls of men,
    But who will reveal to our waking ken
    The forms that swim and the shapes that creep
    Under the waters of sleep?
    And I would I could know what swimmeth below when the tide comes in
    On the length and the breadth of the marvellous marshes of Glynn.

    “Lost Marshes of Glynn” (2024)

    Midnight-Miqu-70B-v1.5

    In the shadowed embrace of live-oaks, once proudly entwined,
    Where vines whispered secrets to lovers who’d intertwine,
    Now stand sentinels mourning in emerald twilight confined,
    As the marshes of Glynn weep for a world they defined.
    Virginal lights once shy, now bear witness to plight,
    Where woods once heavenly whispered are cloaked in despair’s blight;
    The arras of leaves that shielded from day’s harshest light,
    Now tremble with fear at the specter of night.
    Oak and vine, your braids now unraveled by time’s cruel hand,
    While I sought refuge in shade, you bore witness to land
    That grew weary from mankind’s relentless command,
    And sank ‘neath the weight of a burden so grand.
    When noon was young and your hearts were ablaze with delight,
    You cradled my spirit through each fleeting daylight;
    But now as the sun takes his leave from our sight,
    I am haunted by shadows that marshes once fought.
    To the edge of this wood, where the beach does expand,
    A glimmer of hope in a world so unplanned,
    Where the sea’s tender kiss meets the shore’s gentle sand,
    In this union, I find my stand.
    Marsh-grass once vibrant, now faded and frail,
    Stretches to skies that no longer prevail;
    The terminal blue of the main seems so pale,
    As it swallows the marsh in its jail.
    What secrets do you hold, oh marshes so free?
    Where once life abounded, now only a plea:
    For mercy from humans who took without care,
    Leaving your beauty to despair.
    Ye plains of the sea, how you’ve suffered in vain,
    Bearing the brunt of our greed and disdain;
    Through floods and droughts, through sun’s fiery reign,
    You remain steadfast, though in silent pain.
    As I gaze on your vastness, my heart does implore,
    What creatures lurk beneath when the tide is no more?
    In the depth of night, what forms do you bore?
    O marshes of Glynn, tell me once more!
    The sea’s generous flow now a harbinger of woe,
    Filling your veins with saltwater’s slow grow;
    Your lifeblood ebbing as the tides overflow,
    And nightfall descends like a shroud below.
    Sleep may come softly to those who reside,
    But what dreams disturb you in this silent tide?
    What visions of loss do your waters provide,
    As we slumber while you slowly subside?
    Farewell, great Sun! Your fiery reign is undone,
    The creeks overflow, and the marshes become one;
    With the sea that has claimed what was never its own,
    And nightfall’s embrace in a mournful tone.
    In this stillness of waters so vast,
    Where once life danced to your rhythmic cast,
    Now lies a tomb for the future unborn,
    As we face the truth that you can’t outlast.
    What mysteries dwell where the tide meets the shore?
    When will humans learn what they must restore?
    O marshes of Glynn, in your silent roar,
    Teach us to cherish forevermore.

    While I gave it the instruction to rewrite Lanier’s poem, it obviously wrote a much shorter poem. However, when you read these side-by-side, you can see phrases and lines that connect the latter to the former. With the LLMs that I can use at home on my computer, they don’t have a conception of word count or number of sentences or lines. They do tend to do well with lists (e.g., write a list of 10 things). It’s might be possible to number the lines in Lanier’s poem and provide instructions to have the outputted lines match the line numbers of the input. That will be an experiment for another day.

  • Remember to Look Up if You Are Down Low for Norman Mailer Street Art

    Norman Mailer subway car street art mural on 3rd Avenue in Brooklyn

    This street art mural referencing Norman Mailer and his essay “The Faith of Graffiti” from Esquire (May 1974) can be seen from a low angle on Third Avenue, but it is probably even nicer at eye-level (albeit for only a moment at speed) from a car cruising down the raised I-278. Randy Kennedy writes in The New York Times (Oct. 26, 2010) with more info about the artists responsible for it who are known collectively as Slavery.

    Norman Mailer subway car street art mural on 3rd Avenue in Brooklyn
  • First Anniversary of My Generative Artificial Intelligence (AI) and Pedagogy Bibliography and Resource List

    Artificial intelligence in a giant room of computers. Image generated with Stable Diffusion.

    Tomorrow is the first anniversary of the Generative Artificial Intelligence (AI) and Pedagogy Bibliography and Resource List.

    I first launched it on 13 April 2023 when I was directing the Professional and Technical Writing (PTW) Program at City Tech before going on my current research sabbatical.

    The motivation for the resource was two fold: I wanted to learn all that I could about generative AI for my professional work as a teacher and scholar, and I needed to understand the changes taking place due to these new technologies for the benefit of my students who had already expressed concern and wonder about it.

    I launched it with more than 150 MLA-formatted citations of books, collections, and articles related to AI and generative AI with an emphasis on teaching but also including useful background and area specific sources.

    Now, it has over 550 citations! It also includes a growing list of online resources with direct links!

    I’ll keep adding to it periodically, and if you have some sources that I haven’t included but should, drop me a line (my email address is in the sidebar to the right).