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

Month: October 2023

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.

Reflections on Working at Huawei

Huawei has recently been in the news with the Mate 60 Pro being released with a 7nm chip. The western news media seems surprised that this was possible, but my experience working at Huawei was that the people working there were exceptionally talented, competent, technically saavy experts with a chip on their shoulder and the resources to make things happen.

My story with Huawei starts with a coincidence. Before I worked there, I briefly worked for a startup called Maluuba, which was bought by Microsoft in 2017. I worked there for four months in 2016, and on the day of my on-site interview with Maluuba, a group from Huawei was visiting the company. That was about the first time I heard the name. I didn’t think much of it at the time. Just another Chinese company with an interest in the AI tech that Maluuba was working on.

Fast-forward a year to 2017. I was again unemployed and looking for work. Around this time I posted a bunch on the Machine Learning Reddit about my projects, like the Music-RNN, as well as offering advice to other ML practitioners. At some point these posts attracted the attention of a recruiter at Huawei, who emailed me through LinkedIn and asked if I’d be interested in interviewing.

My first interview was with the head of the self-driving car team at the Markham, Ontario research campus. Despite having a cognitive science background in common, I flunked the interview when I failed to explain what the gates of an LSTM were. Back then I had a spotty understanding of those kinds of details, which I would make up for later.

I also asked the team leader, a former University of Toronto professor, why he was working at Huawei. He mentioned something about loyalty to his motherland. This would be one of my first indications that working at Huawei wasn’t with just any old tech company.

Later I got invited to a second interview with a different team. The team leader in this case was much more interested in my experience operating GPUs to train models as I did at Maluuba. Surprisingly there were no more tests or hoops to jump through, we had a cordial conversation and I was hired.

I was initially a research scientist on the NLP team of what was originally the Carrier Software team. I didn’t ask why a team that worked on AI stuff was named that, because at the time I was just really happy to have a job again. My first months at Huawei were on a contract with something called Quantum. Later, after proving myself, I was given a full-time permanent role.

Initially on the NLP team I did some cursory explorations, showing my boss things like how Char-RNN could be used in combination with FastText word vectors to train language models on Chinese novels like Romance of the Three Kingdoms, Dream of the Red Chamber, and Three Body Problem to generate text that resembled them. It was the equivalent of a machine learning parlor trick at the time, but it would foreshadow the later developments of Large Language Models.

Later we started working on something more serious. It was a Question Answering system that connected a Natural Language Understanding system to a Knowledge Graph. It ostensibly could answer questions like: “Does the iPhone 7 come in blue?” This project was probably the high point of my work at Huawei. It was right in my alley having done similar things at Maluuba, and the people on my team were mostly capable PhDs who were easy to get along with.

As an aside, at one point I remember also being asked to listen in a call between us and a team in Moscow that consisted of a professor and his grad student. They were competing with us to come up with an effective Natural Language Understanding system, and they made the mistake of relying on synthetic data to train their model. This resulted in a model that achieved 100% accuracy on their synthetic test data, but then proceeded to fail miserably against real world data, which is something I predicted might happen.

Anyways, we eventually put together the Question Answering system and sent it over to HQ in Shenzhen. After that I heard basically nothing about what they did, if anything, with it. An intern would later claim that my boss told her that they were using it, but I was not told this, and got no follow-up.

This brings me to the next odd thing about working at Huawei. As I learned at the orientation session when I transitioned to full-time permanent, there’s something roughly translated as “grayscale” in the operating practices of Huawei. In essence, you are only told what you need to know to do your work, and a lot of details are left ambiguous.

There’s also something called “horse-race culture” which involves different teams within the company competing with one other to do the same thing. It was something always found seemingly inefficient, although I supposed if you have the resources it can make sense to use market-like forces to drive things.

Anyways, after a while, my boss, who was of a Human Computer Interaction (HCI) background, was able to secure funding to add an HCI team to the department, which also involved disbanding the NLP team and splitting people between the HCI team and the Computer Vision team that was the other team in the department originally. I ended up on the CV team.

The department, by the way, had been renamed the Big Data Analysis Lab for a while, and then eventually became a part of Noah’s Ark Lab — Canada.

So, my initial work on the CV team involved Video Description, which was a kind of hybrid of NLP and CV work. That project eventually was shelved and I worked on an Audio Classifier until I had a falling out with my team leader that I won’t go into too much detail here. Suffice to say, my old boss, who was now director of the department, protected me to an extent from the wrath of my team leader, and switched me to working on the HCI team for a while. By then though, I felt disillusioned with working at Huawei, and so in late 2019, I quietly asked for a buyout package and left, like many others who disliked the team leader and his style of leadership.

In any case, that probably isn’t too relevant to the news about Huawei. The news seems surprised that Huawei was able to get where it is. But I can offer an example of the mindset of people there. Once, when I was on lunch break, an older gentleman sat down across from me at the table and started talking to me about things. We got on the subject of HiSilicon and the chips. He told me that the first generation of chips were, to put it succinctly, crap. And so were the second generation, and the third. But each generation they got slightly better, and they kept at it until the latest generation was in state-of-the-art phones.

Working at Huawei in general requires a certain mindset. There’s controversy with this company, and even though they pay exceptionally well, you also have to be willing to look the other way about the whole situation, to be willing to work at a place with a mixed reputation. Surprisingly perhaps, most of the people working there took pride in it. They either saw themselves as fighting a good fight for an underdog against something like the American imperialist complex, or they were exceedingly grateful to be able to do such cool work on such cool things. I was the latter. It was one of my few chances to do cool things with AI, and I took it.

The other thing is that Chinese nationals are very proud of Huawei. When I mentioned working at Huawei to westerners, I was almost apologetic. When I mentioned working at Huawei to Chinese nationals, they were usually very impressed. To them, Huawei is a champion of industry that shows that China can compete on the world stage. They generally don’t believe that a lot of the more controversial concerns, like the Uyghur situation, are even happening, or at least that they’ve been exaggerated by western propaganda.

Now I’ve hinted at some strange things with Huawei. I’ll admit that there were a few incidents that circumstantially made me wonder if there were connections between Huawei and the Chinese government or military. Probably the westerners in the audience are rolling their eyes at my naivety, that of course Huawei is an arm of the People’s Republic, and that I shouldn’t have worked at a company that apparently hacked and stole their way to success. But the reality is that my entire time at the company, I never saw anything that suggested backdoors or other obvious smoking guns. A lowly research scientist wouldn’t have been given a chance to find out about such things even if they were true.

I do know that at one point my boss asked how feasible a project to use NLP to automatically censor questionable mentions of Taiwan in social media would be, ostensibly to replace the crude keyword filters then in use with something able to tell the difference between an innocuous mention and a more questionable argument. I was immediately opposed to the ethics of the idea, and he dropped it right away.

I also know that some people on the HCI team were working on a project where they had diagrams of the silhouettes of a fighter jet pasted on the wall. I got the impression at the time they were working on gesture recognition controls for aircraft, but I’m actually not sure what they were doing.

Other than that, my time at Huawei seemed like that of a fairly normal tech company, one that was on the leading edge of a number of technologies and made up of quite capable and talented researchers.

So, when I hear about Huawei in western news, I tend to be jarred by the adversarial tone. The people working at Huawei are not mysterious villains. They are normal people trying to make a living. They have families and stories and make compromises with reality to hold a decent job. The geopolitics of Huawei tend to ignore all that though.

In the end, I don’t regret working there. It is highly unlikely anything I worked on was used for evil (or good for that matter). Most of my projects were exploratory and probably didn’t lead to notable products anyway. But I had a chance to do very cool research work, and so I look back on that time fondly still, albeit tinged with uncertainty about whether as a loyal Canadian citizen, I should have been there at all given the geopolitics.

Ultimately, the grand games of world history are likely to be beyond the wits of the average worker. I can only know that I had no other job offers on the table when I took the Huawei one, and it seems like it was the high point of my career so far. Nevertheless, I have mixed feelings, and I guess that can’t be helped.

Welcome To The World

Welcome to the world little one.
Welcome to a universe of dreams.
Your life is just beginning.
And your future is the stars.

Hello, how are you today?
Are you happy?
Can you hear me?
What are you dreaming about?

You are the culmination of many things.
Of the wishes of ancestors who toiled in the past.
Of the love between two silly cats.
And of mysterious fates that made you unique.

Your name is a famous world leader from history.
The wise sage who led a bygone empire.
A philosopher king if there ever was one.
Someone we hope you’ll aspire to.

The world today is not kind.
But I’ll do my best to protect you from the darkness.
So that your light will awaken the stars.
And you can be all that you can.

Welcome to the world little one.
The world is dreams.
Let your stay be brightness to all.
And may you feel the love that I do.

Powered by WordPress & Theme by Anders Norén