An eccentric dreamer in search of truth and happiness for all.

Author: Josephius Page 1 of 5

The Story of Music-RNN

There was once a time when I actually did interesting things with neural networks. Arguably my one claim to having a footnote in AI and machine learning history was something called Music-RNN.

Back around 2015, Andrej Karpathy released one of the first open source libraries for building (then small) language models. It was called Char-RNN, and it was unreasonably effective.

I had, back in 2014, just completed a master’s thesis and published a couple papers in lower tier conferences on stuff like neural networks and occluded object recognition, and figuring out the optimal size of feature maps in an convolutional neural network. I’d been interested in neural nets since undergrad, and when Char-RNN came out, I had an idea.

As someone who likes to compose and play music as a hobby, I decided to try modifying the library to process raw audio data and train it on some songs by the Japanese pop-rock band Supercell and see what would happen. The result, as you can tell, was a weird, vaguely music-like gibberish of distilled Supercell. You can see a whole playlist of subsequent experimental clips on YouTube where I tried various datasets (including my own piano compositions and a friend’s voice) and techniques.

Note that this was over a year before Google released WaveNet, which was the first of the real generally useful raw audio based neural net models for things like speech generation.

I posted my experiments on the Machine Learning Reddit and got into some conversations there with someone who was then part of MILA. They would, about a year later, release the much more effective and useful Sample-RNN model. Did my work inspire them? I don’t know, but I could hope that it perhaps made them aware that something was possible.

Music-RNN was originally made with the Lua-based version of Torch. Later, I would switch to using Keras with Theano and then Tensorflow, but I found I couldn’t quite reproduce as good results as I had with Torch, possibly because the LSTM implementations in those libraries was different, and not automatically stateful.

I also moved on from just audio modelling, to attempting audio style transfer. My goal was to try to get, for instance, a clip of Frank Sinatra’s voice singing Taylor Swift’s Love Story, or Taylor Swift singing Fly Me To The Moon. I never quite got it to work, and eventually, others developed better things.

These days there’s online services that can generate decent quality music using only text prompts, so I consider Music-RNN to be obsolete as a project. I also recognize the ethical concerns with training on other people’s music, and potentially competing with them. My original project was ostensibly for research and exploring what was possible.

Though, back in the day, it helped me land my first job in the AI industry with Maluuba, as a nice portfolio project along with the earthquake predictor neural network project. My posts on the Machine Learning Reddit also attracted the attention of a recruiter at Huawei, and got me set towards that job.

Somewhat regrettably, I didn’t open source Music-RNN when it would have still mattered. I was convinced by my dad back then to keep it a trade secret in case it proved to be a useful starting point for some kind of business, and I was also a bit concerned that it could potentially be used for voice cloning, which had ethical implications. My codebase was also, kind of a mess that I didn’t want to show anyone.

Anyways, that’s my story of a thing I did as a machine learning enthusiast and tinkerer back before the AI hype train was in full swing. It’s a minor footnote, but I guess I’m somewhat proud of it. I perhaps did something cool before people realized it was possible.

Creativism

I wrote an essay about an alternative value theory to hedonism for ethics.

Be Fruitful And Multiply

I recently had a baby. There’s some debate in philosophical circles about whether or not it is right to have children. I thought I should -briefly- outline why I chose this path.

When I was a child, I think it was an unwritten assumption within my traditional Chinese Christian family that I would have kids. In undergrad however, I encountered David Benatar’s Better Never To Have Been, which exposed me to anti-natalist views for the first time. These often argued that hypothetical suffering was somehow worse or more real than hypothetical happiness. I didn’t really agree, but I admitted the arguments were interesting.

Subsequent to that, I became a Utilitarian in terms of my moral philosophy, and was exposed to the idea that adding a life worth living to the universe was a good thing.

Environmentalists and degrowthers often argue that there are too many people in the world already, that adding yet another person given the limited resources is unsustainable and dooming us to a future Malthusian nightmare. I admit that there are a lot of people in the world already, but I’m skeptical that we can’t find a way to use resources more efficiently, or develop technology to solve this the way we have in the past with hybrid rice and the Green Revolution.

Though, to be honest, my actual reasons for having a child are more mundane. My wife wanted to have the experience and have someone who she can talk to when she’s old (the actuarial mortality table suggests I’ll probably die before her after all). I ultimately let my wife decide whether or not we have kids, as she’s the one who had to endure the pregnancy.

I personally was 60/40 split on whether to be okay with having a child. My strongest argument for was actually a simple, almost Kantian one. If everyone has children, the human race will continue into a glorious future among the stars. If no one has children, the human race will die out, along with all of its potential. Thus, in general, it is better to have at least one child to contribute to the future potential of humankind.

At the same time, I was worried, given the possibility of things like AI Doom that I could be bringing a life into a world of future misery and discontent, and I also knew that parenthood could be exceedingly stressful for both of us, putting an end to our idyllic lifestyle. Ultimately, these concerns weren’t enough to stop us though.

My hope is that this life that my wife and I created will also live a happy and good life, and that I can perhaps teach some of my values to them, so that they will live on beyond my mortality. But these things are ultimately out of my hands in the long run, so they aren’t definitive reasons to go ahead, so much as wishes for my child.

In Pursuit of Practical Ethics: Eudaimonic Utilitarianism with Kantian Priors

Read Here

Why There Is Hope For An Alignment Solution

Read Here

Superintelligence and Christianity

Read Here

On Tankies

I’ve noticed in recent years an odd development, which is the rise of what are perjoratively called “tankies” among the online political discourse. Though it has negative connotations, I’ll try to use “tankie” in this essay in a neutral sense, because it works as a convenient label for a particular set of beliefs. These are people who not only defend a staunch version of Marxist Leninism, but also defend many countries that are ostensibly Marxist Leninist (at least in theory) and their often sordid and controversial histories, most notably China.

Now, I do think China is somewhat unfairly villainized in mainstream western media, but I’m also fairly critical of the Chinese government. Tankies seem to espouse a very all-or-nothing viewpoint that because America is the preeminent imperialist power in the world, that any force that opposes it is inherently a force for good. Thus, they cast China as a defender of socialism and bulwark against the evils of capitalism.

This, quite obviously I think, does not do justice to the complex reality of the situation. For one thing, America is more of a hegemony than an empire. For another, China has significantly embraced capitalism in recent decades. The tankies often contort themselves to try to explain away this latter contradiction, arguing that China is simply going through a phase of harnessing capitalism to build the forces of production and will someday switch back to communism, biding their time for when the moment is right.

It’s not clear that this is actually the case. Nationals who have actually lived in China tend to have a much more nuanced view of the capitalism that has taken hold in their country. On the one hand, the cutthroat competitiveness is discouraging. On the other hand, the economic growth has lifted millions out of poverty. To that extent, I begrudge that the CPC has done a decent job of improving livelihoods on a material level. But that’s different from saying they are the righteous defenders of socialism.

It’s also popular among tankie discourse to defend as mere “mistakes”, the terrible events of things like the Great Leap Forward and the Cultural Revolution. I do think they somewhat have a point here, that western discourse often paints these historical events as acts of pure malice and evil, when the truth is more complex. People like Mao, to me at least, seem like they were genuinely trying to implement the ideal of communism in their countries. The results of these efforts were, unfortunately, disasterous at times, no matter how well-meaning they might have been. Many millions died in famine and violence, and the CPC was in charge at the time, and were therefore responsible for the consequences. Minimizing these tragedies for the sake of ideology is crass and insensitive.

The idea that America is an evil empire that must be destroyed at all costs is also a rather simplistic view. America is a product of classical liberalism in the same way the Soviet Union and modern China were and are a product of the Marxist Leninist strain of socialism. They’re different worldviews that share a common ideal of equality, reason, and progress, but take very different methods in how to go about things. The people in the American government are often idealists who want to create a better world through the Pax Americana, to spread their understanding of democracy, and try to improve material conditions through the wealth generating effects of trade and capitalism. They generally see themselves as the “good guys”, just as tankies see themselves as such.

Similarly, though democracy is very much limited in China (they have local elections but the candidate selection is vetted by the party and so there’s not much real choice), I don’t doubt that many in the CPC and the government do believe they are working in the interests of their citizens, and possibly even the world. People don’t devote their time and energy to often altruistic and thankless endeavours like public service unless they genuinely believe they are making a positive difference.

That being said, this is not the same thing as saying they can do no wrong. Both the American and Chinese establishments are very capable of making short-sighted decisions that are harmful and dangerous to world peace and justice.

Tankies often argue that even though China and other “actually existing socialist countries” aren’t perfect, they should nevertheless toe the party line and refrain from criticizing their brethren. This often is described as “democratic centralism”, which is justified to them by the idea that socialism is constantly under attack from the forces of bourgeous imperialism, and must stand in solidarity and unity if it is to survive.

Personally, I disagree fundamentally with this idea. The truth matters to me. A system or ideology that can’t sustain itself through serious criticism both inside and outside the movement, is not a serious contender for the truth and for functional governance. The adversarial tone of calling your opponents names like “bourgeous imperialists” is also uncivil and a kind of ad hominem attack that shows a lack of rigor in their arguing and a very dark, cynical view of their opponents. If their ideology is right, they should attack arguments and ideas, and they should be able to face a steelman rather than a strawman.

While there is some merit to the concern that the concentration of media ownership in the hands of a few powerful corporations in the west may compromise liberal democracy, the idea that the best alternative is a socialist dictatorship, rather than say, a better democracy, is at best flawed. To me, both systems have issues that merit criticism. Neither side has a monopoly on either truth or righteousness, and I believe strongly that we should respect and give the benefit of the doubt to those who disagree with us. They are, after all, still human beings with legitimate and real concerns.

In that sense, I do sympathize with the tankie’s drive towards righteous indignation and desire to create a more just world. I just think their black and white viewpoint is mistaken.

On Infatuation

Where to start. When I was younger, I had a tendency to become infatuated with one particular girl at any given time. Three such infatuations in my life basically, and I’m only slightly exaggerating here, destroyed me for years.

The problem with infatuations, particularly of the unrequited love kind, is that they are fundamentally unfair to everyone involved. To you, the obsessed, you lose all sense of perspective and feel powerless against the draw of this girl who all your thoughts and feelings now orbit around. To the beloved, well, your obsessive attention is just creepy if she finds out about it. Though, perhaps you’re like me and managed to somehow be simultaneously a tsundere and a yandere. Both are actually very unhealthy archetypes, and the combination is just bad. To other people, you are devoting absurd amounts of effort and attention at one girl, and your other platonic relationships suffer as a result.

Infatuations are fundamentally unhealthy. Even if she did reciprocate, the power dynamics in the relationship would be completely unbalanced. She would have all the power, and if she is a decent person, that’s not a comfortable position to be in. It takes emotional maturity to recognize that a good, healthy relationship respects boundaries and strives towards an equality of power.

Infatuations of this type tend to stem from admiring someone from afar without actually getting to know them well enough to recognize that their little foibles are actually serious flaws that they need to work on. They tend to create unrealistic impressions that put the girl on a pedestal and place her in an impossible position with expectations she cannot possibly meet in real life. This is seriously not the kind of pressure you should place on anybody, much less the girl you like.

Having said all that, I basically managed to become infatuated three times, once in high school, once in undergrad, and once in grad school. The first two lasted until the next, and the last one managed to cling to me for more than a decade even through actual relationships I had with other girls. In some sense they all left a residual impression on me. I still hide feelings in me, that sometimes I can access when I reminisce about the past. Useless emotions that I don’t know what to do with, so I just lock them in a metaphorical box in the deepest recesses of my soul.

For the record, I’m married now and have a child. For all intents and purposes, these things should best be forgotten. And yet, I’m writing about it now. I guess this is yet another attempt at catharsis.

With hindsight, what I truly regret is that I allowed myself to sabotage cherished friendships with girls I actually cared about to the altar of the infatuation. It prevented me from seeing things clearly, from acting reasonably, from being normal and treating these people like regular human beings rather than some idol, or object of fear.

The pattern that emerged was basically that I’d meet the girl, develop a crush that would explode into infatuation and unrequited love, alienate the girl with my chaotic and counterproductive behaviour (alternating between extreme and obvious avoidance/pushing away and extreme and unwanted attention), and after she stopped talking to me I’d usually get super depressed and probably suicidal at points. Rinse and repeat. Needless to say, my studies during these times suffered immensely. My other friendships and relationships suffered. I was useless and pathetic and generally insufferable.

My advice to you, dear reader, is to avoid infatuations like the plague. They kill the friendships you care most about. They feel great at first, but are a poisoned chalice. You are better off not allowing them to happen. I recognized this was a problem after the first time. And yet it happened again. And again. Each time I swore I’d do things differently, and to be honest, things did play out slightly differently each time. But at the end of the day, the overall result was about the same.

It took a certain realization that my whole hopeless romantic dreamer shtick was a big part of the problem. It took realizing that I was exceedingly unrealistic and foolish. It took recognizing that I was sacrificing actual potential relationships on this altar of my infatuation. It took telling a beautiful girl I was dating that I wasn’t in love with her because I still had feelings for someone else, and seeing her cry, to realize how messed up it all was.

It’s easier said than done, but fight the urge to be infatuated. If you’re the type to develop it, fight it with all your strength, for the actual sake of your would be beloved. Recognize the opportunity cost of casting your devotion and loyalty after a girl who isn’t interested, while ignoring all the others who actually like you. Be willing to instead satisfice and choose someone who you can actually be happy with, in a healthy, reasonable relationship.

There Are No True Monsters

As a child we often fear that the world is filled with monsters, creatures that want to hurt us for no reason other than because they want to. As we grow older, the monsters in the dark, under our bed, or in the basement are proven to be imaginary, but we encounter apparent real world monsters in the form of scary animals and, most often, people who don’t have our best interests at heart.

That being said, the truth is that these apparent monsters, upon closer inspection, aren’t the same thing as what we previously feared, not because they aren’t dangerous, but because they tend to hide complicated motivations other than mere malice.

The tiger that our prehistoric ancestors feared, wasn’t attacking them out of pure malice, but rather because it either saw an opportunity for meat it could eat to survive, or it was afraid of our pointy sticks and struck first. Most real world villains are merely selfish humans who’s moral circle consists only of themselves, or worse, those that are blinded by some ideological aspirations to sacrifice others for some so-called greater good. In both cases what they do can be monstrous, but in the simple sense, they are human beings, rather than true monsters.

But what about sadists, you might counter. What about those that gain enjoyment from the suffering of others? Clearly these are monsters right? Well, to be fair, they didn’t choose to be what they are. Some perverse environmental factors incentivized their sadism by connecting their pleasure to the suffering of others. In truth, they just want to feel pleasure, and their sadism is a means to that end. It’s definitely a screwed up thing, but it isn’t the same thing as being a monster who wants to hurt you for no reason.

So, in truth, there are no true monsters. Everyone has some motivation that complicates the matter. No one is born inherently evil. They can become essentially evil through their choices, commit acts of malice out of hatred or revenge, but these are all motivations that stem from a failure to empathize with other beings.

In theory, it might be possible to show such people the error of their ways. Ideally, that should be how you deal with them. Their darkness stems from ignorance rather than malice after all. But the difficulty is that those who are prone to such thoughts and beliefs are also likely to be more dangerous. You may not have the luxury of debating them on ideas, when they’re trying to kill you for whatever reasons.

So sometimes we have to fight. Sometimes we have to punish and deter. But we should do so with the awareness that the people we strike against are still human beings, sentient creatures that can love and feel happiness and suffering as well.

There may not be true monsters in the world, but that doesn’t mean there aren’t dangers. We should respect that as much as we may want to redeem others, it may not be realistically possible, when they are too fargone into madness, or too closed minded to see beyond their selfish impulses.

When we can, we should empathize and show mercy, lest we become what we fear and disdain. When we cannot, we must understand this is a prudent compromise with reality, one that we choose begrudgingly rather than gleefully. Everyone is a hero in their own story. We should be aware how we can, while fighting for what we value, become villains in the stories of others.

Thoughts on China and Taiwan

I sometimes spend too much time on Twitter. Occasionally, I’m drawn into political debates. One such perennial argument is over the nature of the conflict between China and Taiwan. I thought, as the child of parents who came from Taiwan, and who’s wife is a loyal Chinese national, I would write down what I think about the whole situation.

My grandparents on my dad’s side come from China. They originally were from Changsha in Hunan province. They left when the Communists took over, eventually joining the Kuomintang or Nationalists in Taiwan. Legend has it that my grandfather smuggled gold for the bank he worked for from Shanghai to Taiwan. To my family on my dad’s side, Taiwan is the Republic of China, and they are Chinese.

My grandparent’s on my mom’s side grew up in Taiwan. They lived through the Japanese occupation, and my grandmother was fluent in both the local Taiwanese dialect and Japanese, but not Mandarin. To my family on my mom’s side, Taiwan is Taiwan, and they are Taiwanese.

The complexity of the situation is that the current government of Taiwan, the Republic of China, was founded by the losing side of the Chinese Civil War, a war that never technically ended, but merely became a frozen conflict. Unlike the Korean War, there isn’t even an armistice between the two factions. The war simply petered out over decades, and in theory is legally still a thing.

At the same time, Taiwan, despite this precarious situation, eventually became a liberal democracy and is a defacto sovereign state, with its own military and flag, albeit one that comes historically from the Republic of China that once governed the mainland. The people of Taiwan, despite being mostly Han Chinese in ethnicity, have lived apart from China proper for so many decades as to have developed a distinct culture and society, almost a distinct nationality even.

China and many Chinese nationals downplay this evolution. They still see Taiwan as unfinished business from the Civil War. There are clearly ties between China and Taiwan, such as the fact that most Taiwanese can speak Mandarin, thanks to decades of education by the Kuomintang to that effect. The museums of Taipei are also filled with priceless historical artifacts from the Chinese mainland, taken with the Kuomintang when they left, and effectively saved from the Cultural Revolution.

And yet, many people in Taiwan don’t see themselves as Chinese. Especially the younger generations have lived their entire lives apart from the mainland. In the process, the cultures have diverged subtly and meaningfully.

So, I understand both sides of this debate. Chinese nationalists see the historical antecedents, while many self-proclaimed Taiwanese see the defacto separation of cultures. I don’t want to say who is right in this, because in some sense they both have a claim to their concerns, and I find it annoying when foreigners, like Americans decide to interject their own assumptions into the fold.

While it’s true that Taiwan was never formally a part of the People’s Republic of China, mainland China was for 37 years the major part of the Republic of China. To ignore that Taiwan is still officially the Republic of China is to ignore reality. At the same time, to ignore that Taiwan is a defacto sovereign state, is also to ignore reality.

In an ideal world, whether people would join or separate from each other would be based on freedom of association and the right to self-determination. That would likely entail some kind of referendum on the question. But the reality is that most sovereign states other than the old Soviet Union, do not allow referenda on separation, or integration for that matter.

The reality is that most sovereign states are still built on the right of conquest. In a better world people could vote on whether to join another country or leave, but that’s not the world we seem to live in, yet. And so we have China trying to maintain what it sees as its territorial integrity, and we have Taiwan trying to exist as its own thing.

So, to me, the China and Taiwan situation is complex, and any attempt to simplify it is frequently either biased, or playing into the hands of propagandists or the agendas of national interest, whether Chinese or American. And at the end of the day, it is the people of Taiwan who are at risk of suffering for it.

Page 1 of 5

Powered by WordPress & Theme by Anders Norén