Love.Law.Robots. by Ang Hou Fu

tech

Feature image

In 2021, I discovered something exciting — an application of machine learning that was both mind-blowing and practical.

The premise was simple. Type a description of the code you want in your editor, and GitHub Copilot will generate the code. It was terrific, and many people, including myself, were excited to use it.

🚀 I just got access to @github Copilot and it's super amazing!!! This is going to save me so much time!! Check out the short video below! #GitHubCopilot I think I'll spend more time writing function descriptions now than the code itself :D pic.twitter.com/HKXJVtGffm

— abhishek (@abhi1thakur) June 30, 2021

The idea that you can prompt a machine to generate code for you is obviously interesting for contract lawyers. I believe we are getting closer every day. I am waiting for my early access to Spellbook.

As a poorly trained and very busy programmer, it feels like I am a target of Github Copilot. The costs was also not so ridiculous. (Spellbook Legal costs $89 a month compared to Copilot's $10 a month) Even so, I haven't tried it for over a year. I wasn’t comfortable enough with the idea and I wasn’t sure how to express it.

Now I can. I recently came across a website proposing to investigate Github Copilot. The main author is Matthew Butterick. He’s the author of Typography for Lawyers and this site proudly uses the Equity typeface.

GitHub Copilot investigation · Joseph Saveri Law Firm & Matthew ButterickGitHub Copilot investigation

In short, the training of GitHub Copilot on open source repositories it hosts probably raises questions on whether such use complies with its copyright licenses. Is it fair use to use publicly accessible code for computational analysis? You might recall that Singapore recently passed an amendment to the Copyright Act providing an exception for computational data analysis. If GitHub Copilot is right that it is fair use, any code anywhere is game to be consumed by the learning machine.

Of course, the idea that it might be illegal hasn’t exactly stopped me from trying.

The key objection to GitHub Copilot is that it is not open source. By packaging the world’s open-source code in an AI model, and spitting it out to its user with no context, a user only interacts with Github Copilot. It is, in essence, a coding walled garden.

Copi­lot intro­duces what we might call a more self­ish inter­face to open-source soft­ware: just give me what I want! With Copi­lot, open-source users never have to know who made their soft­ware. They never have to inter­act with a com­mu­nity. They never have to con­tribute.

For someone who wants to learn to code, this enticing idea is probably a double-edged sword. You could probably swim around using prompts with your AI pair programmer, but without any context, you are not learning much. If I wanted to know how something works, I would like to run it, read its code and interact with its community. I am a member of a group of people with shared goals, not someone who just wants to consume other people’s work.

Matthew Butterick might end up with enough material to sue Microsoft, and the legal issues raised will be interesting for the open-source community. For now, though, I am going to stick to programming the hard way.

#OpenSource #Programming #GitHubCopilot #DataMining #Copyright #MachineLearning #News #Newsletter #tech #TechnologyLaw

Author Portrait Love.Law.Robots. – A blog by Ang Hou Fu

Feature image

One can have a variety of opinions about the pandemic but I will insist on this one. It made everyone treat online not as a cute sideshow, but as an essential part of working life.

While stuck at home, I made it a point to attend any conference or talk online that seemed adjacent to my interests. I attended talks on machine learning and AI. I even learnt a bit of linguistics.

One of the more life-changing seminars I attended was the first Bucerius Legal Tech Essentials in 2020. In short, I highly recommend it for someone who doesn't have much time but needs to dive deep and swim wide in this field. They lived up to their taglines: “ Curated. Intense. Remote.

You swim wide because they cover a wide gamut of speakers, from academics, thought leaders and entrepreneurs with their own LegalTech companies.

You dive deep mainly because the speakers are talking about their expertise (this isn't a panel show). I recalled that many speakers took questions, so you can engage with them.

The only bad thing was that since all the speakers were based on both sides of the Atlantic, the timing was horrendous for the other side of the world. I remember falling asleep in front of my desk, trying to figure out the Six Sigma rule around 1 in the morning.

Nevertheless, I didn't think I was the only person from South East Asia attending the talks. During the customary roll call of various attendees at the start of each session, you would get a taste of how global interest in LegalTech was.

People in Singapore would also get a taste of Bucerius Legal Tech Essentials when Prof Daniel Katz, one of the “hosts” of Legal Tech Essentials, gave a lecture in 2021 at SMU, Singapore. It was a whirlwind of 500 slides in 60 minutes. Note that there are no certifications or brownie points for attending or interacting. These people stayed up late for the LegalTech.

It seems that being in Singapore has borne other fruit. 2022's Legal Tech Essentials would feature timings more convenient for this part of the world. This means 8:30 pm here... which I reckon is a marked improvement over 1 am.

Legal Tech Essentials 2022Curated, Intense, Remote.You can sign up for updates at their site.

So if you're interested in the field but don't know where to start, I strongly recommend this. I didn't enjoy it as much in 2021 since I found most topics less effective a second time. Maybe I will give this another try.

At the end of 2021, I repeatedly feared that online seminars would be buried and in-person conferences would be back in vogue. I'm glad that Legal Tech Essentials is back and still remote. It was a light in a very dark time of the pandemic, but now I hope it will still light a few light bulbs to anyone interested in Legal and Technology.

#Newsletter #LegalTech #Lawyers #News #tech #TechnologyLaw #Training #Presentation

Author Portrait Love.Law.Robots. – A blog by Ang Hou Fu

Feature image

A recent disciplinary case in Singapore, [Law Society of Singapore v Mohammed Lutfi bin Hussin](https://www.elitigation.sg/gd/s/2022SGHC182) , highlights a common pitfall in legal practice. A lawyer failed to witness the signing of conveyancing documents personally but attested to doing so. Few people may pay attention to a routine conveyancing transaction. Still, this time, the transaction was tainted by fraud: a mortgagor had submitted false documents to a mortgagee to obtain a higher loan. The lawyer’s license was suspended for three years for claiming to have witnessed the signing when he didn’t.

There’s an uncharacteristic lack of remorse on the lawyer’s part compared to other disciplinary cases. Here’s how he described his practice, which seems rather ordinary at first glance:

This was a routine purchase of the Property by [a buyer] financed by a loan taken from a bank. The transaction could be carried out without my seeing [the Buyer]. My staff are fully capable of dealing with routine transactions such as [the Buyer’s] purchase of the Property. If anything out of the ordinary crops up, they will inform me and I will then see [the Buyer] and sort out whatever problem has arisen. There were no issues at all relating to [the Buyer’s] purchase and for that reason, I did not have to see him.

In contrast, here’s what the Court of 3 Judges (in charge of lawyer discipline) thought of that:

[The lawyer] had put in place a “system” pursuant to which he entrusted his non-legally trained staff to carry out conveyancing transactions, including witnessing the execution of conveyancing documents, so that he did not have to meet his own clients, unless he deemed it necessary. Under this “system”, he presupposed that everything was in order until and unless his staff flagged any issues. In relation to [the Buyer’s] conveyancing transaction, nothing out of the ordinary was brought to his attention. He therefore assumed that all was in order and never met [the Buyer], notwithstanding the fact that the latter had engaged him as his conveyancing solicitor.

It’s important to note that witnessing someone sign a document isn’t likely to have stopped the fraudulent transaction. The nub of the issue was that the lawyer had claimed to do something he did not. The Court recognized that some might call this “technical dishonesty”.

But what’s the point of witnessing someone sign a document? The main idea is that it prevents fraud. Anyone can put anyone’s signature anywhere. The lawyer ensures the signor’s identity, understands the document, and there are no signs of duress or misunderstanding.

Who wants to do an E-Will?COVID-19 offers an opportunity to relook at one of the oldest instruments in law — wills. Is it enough to make them an electronic transaction?Love.Law.Robots.HoufuA similar problem persists in the area of wills and testaments.

Post-pandemic, though, alternatives are apparent but with questionable legality. If a lawyer witnesses a signing through Zoom, does it count? If e-Signature can be used, what value does being in person add? Banks don’t use lawyers to prevent fraud all the time too. Document submission, such as income and particulars, can now be received directly through the relevant government agency and authenticated fairly securely by the applicant. The wonders of SingPass!

The question is, would the lawyer have escaped sanction if there was actually a “system” in place? The Court describes this as a “non-system” because the lawyer had abdicated his responsibilities to non-legally trained staff. But what if the lawyer had implemented a system to train his staff on when to escalate, use checklists, verify the work, and carry out audits? Would that be enough? Or is the point that no matter what, the lawyer must be physically present?

We aren’t going to find out because everyone understands that witnessing a signing has to be personal. Furthermore, this is a strict requirement promulgated by legislation, so it’s non-negotiable.

These issues are essential because conveyancing is a prime example of volume work in the legal profession. If a lawyer has to be physically present at every stage of the transaction, this would slow down the process and make it expensive. The practice would be harder to justify in the face of more efficient and cost-effective solutions. More people would believe its objective is to maintain a monopoly for lawyers. Even lawyers may be hard-pressed to find efficient ways to do business and inadvertently find themselves on the wrong side of the law.

For now, legal innovators trying to automate manual processes or implement a “system” would have to be careful if they involved any attestation. It’s the law; you can’t change it, and breaking it would get you in hot soup, no matter how dissatisfied you would be.

The Importance of Being AuthorisedA recent case shows that practising law as an unauthorised person can have serious effects. What does this hold for other people who may be interested in alternative legal services?Love.Law.Robots.HoufuAn earlier post explored another common pitfall.

#Law #Lawyers #E-signature #Employee #LawSociety #Singapore #SupremeCourtSingapore #tech

Author Portrait Love.Law.Robots. – A blog by Ang Hou Fu

I have been mulling over developing an extensive online database of free legal materials in the flavour of OpenLawNZ or an LII for the longest time. Free access to such materials is one problem to solve, but I'm also hoping to compile a dataset to develop AI solutions. I have tried and demonstrated this with PDPC's data previously, and I am itching to expand the project sustainably.

However, being a lawyer, I am concerned about the legal implications of scraping government websites. Would using these materials be a breach of copyright law? In other countries, people accept that the public should generally be allowed to use such public materials. However, I am not very sure of this here.

The text steps highlightedPhoto by Clayton Robbins / Unsplash

I was thus genuinely excited about the amendments to the Copyright Act in Singapore this year. According to the press release, they will be operational in November, so they will be here soon.

Copyright Bill – Singapore Statutes OnlineSingapore Statutes Online is provided by the Legislation Division of the Singapore Attorney-General’s ChambersSingapore Statutes OnlineThe Copyright Bill is expected to be operationalised in November 2021.

[ Update 21 November 2021: The bill has, for the most part, been operationalised.]

Two amendments are particularly relevant in my context:

Using publicly disclosed materials from the government is allowed

In sections 280 to 282 of the Bill, it is now OK to copy or communicate public materials to facilitate more convenient viewing or hearing of the material. It should be noted that this is limited to copying and communicating it. Presumably, this means that I can share the materials I collected on my website as a collection.

Computational data analysis is allowed.

The amendments expressly say that using a computer to extract data from a work is now permitted. This is great! At some level, the extraction of the material is to perform some analysis or computation on it — searching or summarising a decision etc. I think some limits are reasonable, such as not communicating the material itself or using it for any other purpose.

However, one condition stands out for me — I need “lawful access” to the material in the first place. The first illustration to explain this is circumventing paywalls, which isn’t directly relevant to me. The second illustration explains that obtaining the materials through a breach of the terms of use of a database is not “lawful access”.

That’s a bit iffy. As you will see in the section surveying terms, a website’s terms are not always clear about whether access is lawful or not. The “terms of use” of a website are usually given very little thought by its developers or implemented in a maximal way that is at once off-putting and misleading. Does trying to beat a captcha mean I did not get lawful access? Sure, it’s a barrier to thwart robots, but what does it mean? If a human helps a robot, would it still be lawful?

A recent journal article points to “fair use” as the way forward

I was amazed to find an article in the SAL Journal titled “Copying Right in Copyright Law” by Prof David Tan and Mr Thomas Lee, which focused on the issue that was bothering me. The article focuses on data mining and predictive analytics, and it substantially concerns robots and scrapers.

Singapore Academy of Law Journale-First MenuLink to the journal article on E-First at SAL Journals Online.

On the new exception for computational data analysis, the article argues that the two illustrations I mentioned earlier were “inadequate and there is significant ambiguity of what lawful access means in many situations”. Furthermore, because the illustrations were not illuminating, it might create a situation where justified uses are prohibited. With much sadness, I agree.

More interestingly, based on some mathematics and a survey, the authors argue that an open-ended general fair use defence for data mining is the best way forward. As opposed to a rule-based exception, such a defence can adapt to changes better. Stakeholders (including owners) also prefer it because it appeals to their understanding of the economic basis of data mining.

You can quibble with the survey methodology and the mathematics (which I think is very brave for a law journal article). I guess it served its purpose in showing the opinion of stakeholders in the law and the cost analysis very well. I don’t suspect it will be cited in a court judgement soon, but hopefully, it sways someone influential.

We could use a more developer-friendly approach.

Photo by Mimi Thian / Unsplash

There was a time when web scraping was dangerous for a website. In those times, websites can be inundated with requests by automated robots, leading them to crash. Since then, web infrastructure has improved, and techniques to defeat malicious actors have been developed. The great days of “slashdotting” a website has not been heard of for a while. We’ve mostly migrated to more resilient infrastructure, and any serious website on the internet understands the value of having such infrastructure.

In any case, it is possible to scrape responsibly. Scrapy, for example, allows you to queue requests regularly or identify yourself as a robot or scraper, respecting robots.txt. If I agreed not to degrade a website’s performance, which seems quite reasonable, shouldn’t I be allowed to use it?

Being more developer-friendly would also help government agencies find more uses for their works. For now, most legal resources appear to cater exclusively for lawyers. Lawyers will, of course, find them most valuable because it’s part of their job. However, others may also need such resources because they can’t afford lawyers or have a different perspective on how information can be helpful. It’s not easy catering to a broader or other audience. If a government agency doesn’t have the resources to make something more useful, shouldn’t someone else have a go? Everyone benefits.

Surveying the terms of use of government websites

RTK survey in quarryPhoto by Valeria Fursa / Unsplash

Since “lawful access” and, by extension, “terms of use” of a website will be important in considering the computational data analysis exceptions, I decided to survey the terms of use of various government agencies. After locating their treatment of the intellectual property rights of their materials, I gauge my appetite to extract them.

In all, I identified three broad categories of terms.

Totally Progressive: Singapore Statutes Online 👍👍👍

Source: https://sso.agc.gov.sg/Help/FAQ#FAQ_8 (Accessed 20 October 2021)

Things I like:

  • They expressly mention the use of “automated means”. It looks like they were prepared for robots!
  • Conditions appear reasonable. There’s a window for extraction and guidelines to help properly cite and identify the extracted materials.

Things I don’t like:

  • The Singapore Statutes Online website is painful to extract from and doesn’t feature any API.

Comments:

  • Knowing what they expect scrapers to do gives me confidence in further exploring this resource.
  • Maybe the key reason these terms of use are excellent is that it applies to a specific resource. If a resource owner wants to make things developer-friendly, they should consider their collections and specify their terms of use.

Totally Bonkers: Personal Data Protection Commission 😖😖😖

Source: https://www.pdpc.gov.sg/Terms-and-Conditions (Accessed 20 October 2021)

Things I like:

  • They expressly mention the use of “robots” and “spiders”. It looks like they were prepared!

Things I don’t like:

  • It doesn’t allow you to use a “manual process” to monitor its Contents. You can’t visit our website to see if we have any updates!
  • What is an automatic device? Like a feed reader? (Fun fact: The PDPC obliterated their news feed in the latest update to their website. The best way to keep track of their activities is to follow their LinkedIn)
  • PDPC suggests that you get written permission but doesn’t tell you what circumstances they will give you such permission.
  • I have no idea what an unreasonable or disproportionately large load is. It looks like I have to crash the server to find out! (Just kidding, I will not do that, OK.)

Comments:

  • I have no idea what happened to the PDPC, such that it had to impose such unreasonable conditions on this activity (I hope I am not involved in any way 😇). It might be possible that someone with little knowledge went a long way.
  • At around paragraph 6, there is a somewhat complex set of terms allowing a visitor to share and use the contents of the PDPC website for non-commercial purposes. This, however, still does not gel with this paragraph 20, and the confusion is not user or developer-friendly, to say the least.
  • You can’t contract out fair use or the computational data analysis exception, so forget it.
  • I’m a bit miffed when I encounter such terms. Let’s hope their technical infrastructure is as well thought out as their terms of use. (I’m being ironic.)

Totally Clueless: Strata Titles Board 🎈🎈🎈

Materials, including source code, pages, documents and online graphics, audio and video in The Website are protected by law. The intellectual property rights in the materials is owned by or licensed to us. All rights reserved. (Government of Singapore © 2006).
Apart from any fair dealings for the purposes of private study, research, criticism or review, as permitted in law, no part of The Website may be reproduced or reused for any commercial purposes whatsoever without our prior written permission.

Source: https://www.stratatb.gov.sg/terms-of-use.html# (Accessed 20 October 2021)

Things I like:

  • Mentions fair dealing as permitted by law. However, they have to update to “fair use” or “permitted use” once the new Copyright Act is effective.

Things I don’t like:

  • Not sure why it says “Government of Singapore ©️ 2006”. Maybe they copied this terms of use statement in 2006 and never updated it since?
  • You can use the information for “commercial purposes” if you get written permission. It doesn’t tell you in what circumstances they will give you such permission. (This is less upsetting than PDPC’s terms.)
  • It doesn’t mention robots, spiders or “automatic devices”.

Comments:

  • It’s less upsetting than a bonkers terms of use, but it doesn’t give me confidence or an idea of what to expect.
  • The owner probably has no idea what data mining, predictive analytics etc., are. They need to buy the new “Law and Technology” book.

Conclusion

One might be surprised to find that terms of using a website, even when supposedly managed by lawyers, feature unclear, problematic, misleading, and unreasonable terms. As I mentioned, very little thought goes into drafting such terms most of the time. However, they provide obstacles to others who may want to explore new uses of a website or resource. Hopefully, more owners will proactively clean up their sites once the new Copyright Act becomes effective. In the meantime, this area provides lots of risks for a developer.

#Law #tech #Copyright #DataScience #Government #WebScraping #scrapy #Singapore #PersonalDataProtectionCommission #StrataTitlesBoard #DataMining

Author Portrait Love.Law.Robots. – A blog by Ang Hou Fu

Feature image

A string of high profile acquittals seemed to have shaken the public confidence in Singapore's criminal justice system. First, Parti Liyani's case obtained a parliamentary hearing on what is essentially its fairness. (I wrote about this earlier in the blog) Now, an acquittal of a doctor in a molest case highlights the pain the accused goes through to clear his name. Is there something wrong with the system?

A Focus on Prosecutors

Recently, an Op-Ed from a law professor was published arguing that we should not throw the baby out with the bathwater. I think it offers good insights on the early part of the criminal justice system because of the following reasons:

  • It gives a data-based illustration of how much work a public prosecutor in Singapore does — a prosecutor evaluates nearly 1.3 new cases a day. (Probably worse, because as he mentioned, prosecutors work in teams today).
  • A deeper study into process improvement is warranted. This is also true because criminal law (and the law generally) has become increasingly complex. Furthermore, the Attorney General's Chambers has already gone on a hiring spree, so putting more bodies on the line might have diminishing returns.
  • The ability to pay more attention to a case means that prosecutors have more time to think about whether a case should really move forward. I think that's reasonable.

The best thing about the article is that it highlights the prime importance of prosecutors in the system. Most criminal law students in Singapore quickly learn about the crime control model employed in Singapore. In this model, the accused's rights are less important, and we rely on the police and prosecutor to get the case right to proceed to punish offenders efficiently.

Here’s how Singapore can strengthen its legal processes in light of high-profile acquittalsRecently, Dr Yeo Sow Nam was acquitted of four charges of outrage of modesty, because the “victim” admitted in court that she lied about the allegations against Dr Yeo.TODAYonline

With heavier and complicated workloads and increased public scrutiny, this might indicate that the system needs help.

No Representation without Defence Counsel?

The article then suggests that defence counsel should get involved earlier in the process to make representations. A representation is essentially a letter to the prosecutor highlighting the facts and arguments in favour of the defence. When done correctly. It discourages prosecutors from bringing a case. Since you don't want to write rubbish to the prosecutor in charge of your case, defence counsel is highly recommended to pursue this.

Having early access to defence counsel can be unrealistic because only the savviest litigants will get defence counsel once they have an inkling that they will be charged (this category of people includes doctors and multinational companies). Furthermore, having defence counsel early might impede police investigations, so the authorities will not make this change lightly.

Many more people will take the plea bargain and try to get on with their lives instead of hiring some defence counsel and giving it a fight either using trial or representations. You never get to hear these stories because they have chosen to bear the consequences without considering whether the system got it right for them. If you cared about the fairness of the system, then this would not be comforting.

A New Perspective with Technology

At this point, I wondered what alternatives are available. It was not obvious to me for a long time, but this is a similar problem that DoNotPay was created to solve. In its earliest version, DoNotPay wrote letters to appeal against a parking fine by fashioning a better appeal. A more recent example features CourtFormsOnline.org preparing eviction letters for tenants to make use of the eviction moratorium.

Digital Curb Cuts: Towards an Inclusive Open Forms EcosystemIn this paper we focus on digital curb cuts created during the pandemic: improvements designed to increase accessibility that benefit people beyond the populatiSee all articles by Quinten SteenhuisThis paper deserves far more space on this blog.

The main idea is to provide an online form that asks an accused questions to find potential points which can assist his case and process these reasons into a representation to be sent to a prosecutor. A criminal defence attorney would probably be beneficial in deciding what points should be included in specific cases. Otherwise, you would be repurposing content found in textbooks like Sentencing Principles in Singapore. (Note that the expert system will also have to consider factors going into conviction too.)

There might be problems with such an approach:

  • Defence counsel does lend an air of professionalism to a representation; if an accused sends a letter (whether it's automated using our solution or not), there are significant risks prosecutors would ignore it.
  • Unlike the traffic fine appeals and eviction moratoriums, determining the success rates of such letters is more difficult. At this stage, the prosecutor's powers are highly discretionary. Did the letter work if the prosecutor reduced the charges? Or if the prosecutor offered a plea bargain? If it's hard to sell this product like this. If people feel that it ain't effective, they are not going to use it.
  • I am not sure Singaporeans would pay $15 a month to access these forms (this is DoNotPay's subscription model). Then again, I paid nearly $800 a year for MediShield, so what's the difference, right?

Conclusion

This is an idea that popped up in my head. It would be interesting to hear if it might work. Feel free to let me know your thoughts!

#Law #Singapore #tech

Author Portrait Love.Law.Robots. – A blog by Ang Hou Fu